Merging r257925, r257929, r257930, and r257997:
authorHans Wennborg <hans@hanshq.net>
Tue, 19 Jan 2016 18:53:02 +0000 (18:53 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 19 Jan 2016 18:53:02 +0000 (18:53 +0000)
commit1618eb04cdfdd3febf77bc67cdac5307e5528b96
treec0ffab4bbe7a7c7583411101d26e4d94a08c7118
parentaa96fb86c3304e81c2f53700223d0e795c302276
Merging r257925, r257929, r257930, and r257997:
------------------------------------------------------------------------
r257925 | mren | 2016-01-15 11:35:42 -0800 (Fri, 15 Jan 2016) | 10 lines

CXX_FAST_TLS calling convention: fix issue on X86-64.

When we have a single basic block, the explicit copy-back instructions should
be inserted right before the terminator. Before this fix, they were wrongly
placed at the beginning of the basic block.

I will commit fixes to other platforms as well.

PR26136
------------------------------------------------------------------------

------------------------------------------------------------------------
r257929 | mren | 2016-01-15 12:13:28 -0800 (Fri, 15 Jan 2016) | 10 lines

CXX_FAST_TLS calling convention: fix issue on AArch64.

When we have a single basic block, the explicit copy-back instructions should
be inserted right before the terminator. Before this fix, they were wrongly
placed at the beginning of the basic block.

I will commit fixes to other platforms as well.

PR26136
------------------------------------------------------------------------

------------------------------------------------------------------------
r257930 | mren | 2016-01-15 12:24:11 -0800 (Fri, 15 Jan 2016) | 8 lines

CXX_FAST_TLS calling convention: fix issue on ARM.

When we have a single basic block, the explicit copy-back instructions should
be inserted right before the terminator. Before this fix, they were wrongly
placed at the beginning of the basic block.

PR26136
------------------------------------------------------------------------

------------------------------------------------------------------------
r257997 | mren | 2016-01-16 08:39:46 -0800 (Sat, 16 Jan 2016) | 12 lines

CXX_FAST_TLS calling convention: fix issue on x86-64.

%RBP can't be handled explicitly. We generate the following code:
    pushq %rbp
    movq  %rsp, %rbp
    ...
    movq  %rbx, (%rbp)  ## 8-byte Spill
where %rbp will be overwritten by the spilled value.

The fix is to let PEI handle %RBP.
PR26136
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258162 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/X86/X86CallingConv.td
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/AArch64/cxx-tlscc.ll
test/CodeGen/ARM/cxx-tlscc.ll
test/CodeGen/X86/cxx_tlscc64.ll