[PATCH] D144941: [m68k] Add TLS Support
Sheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 02:19:08 PDT 2023
0x59616e added inline comments.
================
Comment at: llvm/test/CodeGen/M68k/TLS/tlsie.ll:10
+; CHECK-NEXT: ; %bb.0: ; %entry
+; CHECK-NEXT: suba.l #4, %sp
+; CHECK-NEXT: .cfi_def_cfa_offset -8
----------------
jrtc27 wrote:
> Why do we need the stack adjustment? We're not passing any arguments to __m68k_read_tp. Or is this some stack alignment issue to compensate for the implicit push of the return address?
This adjustment is the consequence of `M68kSubtarget::stackAlignment` [0]
The comment says:
```
/// The minimum alignment known to hold of the stack frame on
/// entry to the function and which must be maintained by every function.
unsigned stackAlignment = 8;
```
I don't know why it is set to 8 as the ABI only requires 2.
@myhsu do you have any clue ?
[0] https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/M68k/M68kSubtarget.h#L73
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144941/new/
https://reviews.llvm.org/D144941
More information about the llvm-commits
mailing list