The ABI explains that %fs:(%eax) zero-extends %eax to 64 bits, and adds
that the TLS base address, but that the TLS base address need not be
at the start of the TLS block, TLS references may use negative offsets.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | ||
---|---|---|
1618 | Is there a better name that we can use than NoRegisters? |
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | ||
---|---|---|
1618 | I was thinking of something like AllowSegmentReg initially, but that would be a poor name, since except for X32, segment registers are always allowed. I picked NoRegisters to reflect that when NoRegisters is true, it is known that AM does not and will not refer to any registers other than what matchLoadInAddress does. I now see that that is not entirely true either, as AM may in theory already reference another segment register. NoBaseReg would be slightly more accurate, but still not very clear. Perhaps I should go back to what I originally had and change it to the slightly verbose but pretty clear AllowSegmentRegForX32? |
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | ||
---|---|---|
1618 | Something X32 specific would be better - so AllowSegmentRegForX32 would be fine. | |
llvm/test/CodeGen/X86/pic.ll | ||
339–340 | it doesn't look great to allow add or lea like this - maybe add an additional CHECK-X32-ISEL/CHECK-X32-FAST prefix and check them properly? |
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | ||
---|---|---|
1618 | Alright, done. | |
llvm/test/CodeGen/X86/pic.ll | ||
339–340 | My thinking was that the leal is just used as a three-operand add. This test does not check which registers get used, so it seemed odd to me to check that the add's output register is the same as one of its inputs, it seemed like either addl or leal would be fine for either I686 or X32. However, thinking about it some more, there is a difference, and it does make sense to restrict which instructions get accepted by the test: I686 gets addl, because that's the shorter instruction. X32 gets leal, because this prevents clobbering its inputs: for x32, both inputs are reused later on. So, done. |
llvm/test/CodeGen/X86/pic.ll | ||
---|---|---|
339–340 | Looking at the new diff: for consistency with the other checks, I should have put ({{%.*,%.*}}) here rather than ({{.*,.*}}). I missed this until after I had already submitted the updated version. It's a trivial change that does not affect anything, but will update nonetheless. |
Is there a better name that we can use than NoRegisters?