aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86FastISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-10-01 18:28:06 +0000
committerDan Gohman <gohman@apple.com>2008-10-01 18:28:06 +0000
commit01c9f7734ce4b06749c0b7c7bd324d373ea38d96 (patch)
tree71abdaf9863d88f5ea3710ebcd04d097cd9a2c4e /lib/Target/X86/X86FastISel.cpp
parentb98d7197d674a5435545acc691236f46eb2ee97b (diff)
downloadexternal_llvm-01c9f7734ce4b06749c0b7c7bd324d373ea38d96.zip
external_llvm-01c9f7734ce4b06749c0b7c7bd324d373ea38d96.tar.gz
external_llvm-01c9f7734ce4b06749c0b7c7bd324d373ea38d96.tar.bz2
Split x86's ADJCALLSTACK instructions into 32-bit and 64-bit forms.
This allows the 64-bit forms to use+def RSP instead of ESP. This doesn't fix any real bugs today, but it is more precise and it makes the debug dumps on x86-64 look more consistent. Also, add some comments describing the CALL instructions' physreg operand uses and defs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86FastISel.cpp')
-rw-r--r--lib/Target/X86/X86FastISel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp
index 74850da..59500ad 100644
--- a/lib/Target/X86/X86FastISel.cpp
+++ b/lib/Target/X86/X86FastISel.cpp
@@ -960,7 +960,8 @@ bool X86FastISel::X86SelectCall(Instruction *I) {
unsigned NumBytes = CCInfo.getNextStackOffset();
// Issue CALLSEQ_START
- BuildMI(MBB, TII.get(X86::ADJCALLSTACKDOWN)).addImm(NumBytes);
+ unsigned AdjStackDown = TM.getRegisterInfo()->getCallFrameSetupOpcode();
+ BuildMI(MBB, TII.get(AdjStackDown)).addImm(NumBytes);
// Process argumenet: walk the register/memloc assignments, inserting
// copies / loads.
@@ -1051,7 +1052,8 @@ bool X86FastISel::X86SelectCall(Instruction *I) {
}
// Issue CALLSEQ_END
- BuildMI(MBB, TII.get(X86::ADJCALLSTACKUP)).addImm(NumBytes).addImm(0);
+ unsigned AdjStackUp = TM.getRegisterInfo()->getCallFrameDestroyOpcode();
+ BuildMI(MBB, TII.get(AdjStackUp)).addImm(NumBytes).addImm(0);
// Now handle call return value (if any).
if (RetVT.getSimpleVT() != MVT::isVoid) {