[PATCH] D55555: [LLD][ELF][ARM] Add support for architecture v6m thunks

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 11 12:21:48 PST 2018


efriedma added inline comments.


================
Comment at: ELF/Thunks.cpp:570
+  // to the stack to use as a scratch register. As we must maintain 8-byte
+  // stack alignment we use the second word for the destination address.
+  const uint8_t Data[] = {
----------------
IIRC the AAPCS requirement is only 4-byte alignment within a function/thunk (and 8 bytes at ABI boundaries).  But this sequence saves four bytes over using ip, I think.


================
Comment at: ELF/Thunks.cpp:594
+  // register to the stack to use as a scratch register. As we must maintain
+  // 8-byte stack alignment we use the second word for the destination address.
+  const uint8_t Data[] = {
----------------
We don't need to maintain 8-byte stack alignment here, and we don't use the second word for the destination address.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55555/new/

https://reviews.llvm.org/D55555





More information about the llvm-commits mailing list