Skip to content

Commit 58e643e

Browse files
committed
[Runtime] Tuple Comparable associated conformance is not evenly aligned
1 parent 13b5bf4 commit 58e643e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stdlib/public/runtime/BuiltinProtocolConformances.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,10 @@ __asm(
291291
" .long " COMPARABLE_BASE_CONFORMANCE_DESCRIPTOR "@GOTPCREL + 5\n"
292292
#endif
293293
// This is a direct relative reference to the associated conformance for
294-
// Equatable defined above in assembly.
294+
// Equatable defined above in assembly. NOTE: This is minus 23 because the
295+
// associated conformance structure is 1 aligned.
295296
" .long ((\"" TUPLE_COMPARABLE_ASSOCIATEDCONFORMANCE "\") - \
296-
(" TUPLE_COMPARABLE_CONF ")) - 24\n"
297+
(" TUPLE_COMPARABLE_CONF ")) - 23\n"
297298
#if defined(__ELF__)
298299
// This is an indirectable relative reference to the GOT equivalent for the
299300
// Comparable.< method descriptor, hence why we add 1 to indicate indirect.

0 commit comments

Comments
 (0)