mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33489 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5e73d5bd2e
commit
7ac947d23d
@ -926,7 +926,8 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
|
||||
unsigned Opc = (Amount < 128) ?
|
||||
(Is64Bit ? X86::ADD64ri8 : X86::ADD32ri8) :
|
||||
(Is64Bit ? X86::ADD64ri32 : X86::ADD32ri);
|
||||
New = BuildMI(TII.get(Opc), StackPtr).addReg(StackPtr).addImm(Amount);
|
||||
New = BuildMI(TII.get(Opc), StackPtr)
|
||||
.addReg(StackPtr).addImm(Amount);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1044,7 +1045,8 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
||||
// If it's main() on Cygwin\Mingw32 we should align stack as well
|
||||
if (Fn->hasExternalLinkage() && Fn->getName() == "main" &&
|
||||
Subtarget->isTargetCygMing()) {
|
||||
MI= BuildMI(TII.get(X86::AND32ri), X86::ESP).addReg(X86::ESP).addImm(-Align);
|
||||
MI= BuildMI(TII.get(X86::AND32ri), X86::ESP)
|
||||
.addReg(X86::ESP).addImm(-Align);
|
||||
MBB.insert(MBBI, MI);
|
||||
|
||||
// Probe the stack
|
||||
@ -1104,12 +1106,14 @@ void X86RegisterInfo::emitEpilogue(MachineFunction &MF,
|
||||
unsigned Opc = (NumBytes < 128) ?
|
||||
(Is64Bit ? X86::ADD64ri8 : X86::ADD32ri8) :
|
||||
(Is64Bit ? X86::ADD64ri32 : X86::ADD32ri);
|
||||
BuildMI(MBB, MBBI, TII.get(Opc), StackPtr).addReg(StackPtr).addImm(NumBytes);
|
||||
BuildMI(MBB, MBBI, TII.get(Opc), StackPtr)
|
||||
.addReg(StackPtr).addImm(NumBytes);
|
||||
} else if ((int)NumBytes < 0) {
|
||||
unsigned Opc = (-NumBytes < 128) ?
|
||||
(Is64Bit ? X86::SUB64ri8 : X86::SUB32ri8) :
|
||||
(Is64Bit ? X86::SUB64ri32 : X86::SUB32ri);
|
||||
BuildMI(MBB, MBBI, TII.get(Opc), StackPtr).addReg(StackPtr).addImm(-NumBytes);
|
||||
BuildMI(MBB, MBBI, TII.get(Opc), StackPtr)
|
||||
.addReg(StackPtr).addImm(-NumBytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user