mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 05:31:06 +00:00
Prepare support of Itanium ABI on ARM as opposed to EHABI by
conditionally emitting .fnstart and friends only for EHABI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207718 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e4c1d49b1d
commit
6c0458d2b4
@ -57,6 +57,7 @@ void ARMException::endModule() {
|
||||
/// beginFunction - Gather pre-function exception information. Assumes it's
|
||||
/// being emitted immediately after the function entry point.
|
||||
void ARMException::beginFunction(const MachineFunction *MF) {
|
||||
if (Asm->MAI->getExceptionHandlingType() == ExceptionHandling::ARM)
|
||||
getTargetStreamer().emitFnStart();
|
||||
if (Asm->MF->getFunction()->needsUnwindTableEntry())
|
||||
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_begin",
|
||||
@ -104,6 +105,7 @@ void ARMException::endFunction(const MachineFunction *) {
|
||||
}
|
||||
}
|
||||
|
||||
if (Asm->MAI->getExceptionHandlingType() == ExceptionHandling::ARM)
|
||||
ATS.emitFnEnd();
|
||||
}
|
||||
|
||||
|
@ -993,6 +993,7 @@ void ARMAsmPrinter::EmitUnwindingInstruction(const MachineInstr *MI) {
|
||||
RegList.push_back(SrcReg);
|
||||
break;
|
||||
}
|
||||
if (MAI->getExceptionHandlingType() == ExceptionHandling::ARM)
|
||||
ATS.emitRegSave(RegList, Opc == ARM::VSTMDDB_UPD);
|
||||
} else {
|
||||
// Changes of stack / frame pointer.
|
||||
@ -1038,6 +1039,7 @@ void ARMAsmPrinter::EmitUnwindingInstruction(const MachineInstr *MI) {
|
||||
}
|
||||
}
|
||||
|
||||
if (MAI->getExceptionHandlingType() == ExceptionHandling::ARM) {
|
||||
if (DstReg == FramePtr && FramePtr != ARM::SP)
|
||||
// Set-up of the frame pointer. Positive values correspond to "add"
|
||||
// instruction.
|
||||
@ -1051,6 +1053,7 @@ void ARMAsmPrinter::EmitUnwindingInstruction(const MachineInstr *MI) {
|
||||
// instruction.
|
||||
ATS.emitMovSP(DstReg, -Offset);
|
||||
}
|
||||
}
|
||||
} else if (DstReg == ARM::SP) {
|
||||
MI->dump();
|
||||
llvm_unreachable("Unsupported opcode for unwinding information");
|
||||
|
Loading…
Reference in New Issue
Block a user