llvm.org GIT mirror llvm / 6c0458d
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 Joerg Sonnenberger 6 years ago
2 changed file(s) with 20 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
5656 /// beginFunction - Gather pre-function exception information. Assumes it's
5757 /// being emitted immediately after the function entry point.
5858 void ARMException::beginFunction(const MachineFunction *MF) {
59 getTargetStreamer().emitFnStart();
59 if (Asm->MAI->getExceptionHandlingType() == ExceptionHandling::ARM)
60 getTargetStreamer().emitFnStart();
6061 if (Asm->MF->getFunction()->needsUnwindTableEntry())
6162 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_begin",
6263 Asm->getFunctionNumber()));
103104 }
104105 }
105106
106 ATS.emitFnEnd();
107 if (Asm->MAI->getExceptionHandlingType() == ExceptionHandling::ARM)
108 ATS.emitFnEnd();
107109 }
108110
109111 void ARMException::EmitTypeInfos(unsigned TTypeEncoding) {
992992 RegList.push_back(SrcReg);
993993 break;
994994 }
995 ATS.emitRegSave(RegList, Opc == ARM::VSTMDDB_UPD);
995 if (MAI->getExceptionHandlingType() == ExceptionHandling::ARM)
996 ATS.emitRegSave(RegList, Opc == ARM::VSTMDDB_UPD);
996997 } else {
997998 // Changes of stack / frame pointer.
998999 if (SrcReg == ARM::SP) {
10371038 }
10381039 }
10391040
1040 if (DstReg == FramePtr && FramePtr != ARM::SP)
1041 // Set-up of the frame pointer. Positive values correspond to "add"
1042 // instruction.
1043 ATS.emitSetFP(FramePtr, ARM::SP, -Offset);
1044 else if (DstReg == ARM::SP) {
1045 // Change of SP by an offset. Positive values correspond to "sub"
1046 // instruction.
1047 ATS.emitPad(Offset);
1048 } else {
1049 // Move of SP to a register. Positive values correspond to an "add"
1050 // instruction.
1051 ATS.emitMovSP(DstReg, -Offset);
1041 if (MAI->getExceptionHandlingType() == ExceptionHandling::ARM) {
1042 if (DstReg == FramePtr && FramePtr != ARM::SP)
1043 // Set-up of the frame pointer. Positive values correspond to "add"
1044 // instruction.
1045 ATS.emitSetFP(FramePtr, ARM::SP, -Offset);
1046 else if (DstReg == ARM::SP) {
1047 // Change of SP by an offset. Positive values correspond to "sub"
1048 // instruction.
1049 ATS.emitPad(Offset);
1050 } else {
1051 // Move of SP to a register. Positive values correspond to an "add"
1052 // instruction.
1053 ATS.emitMovSP(DstReg, -Offset);
1054 }
10521055 }
10531056 } else if (DstReg == ARM::SP) {
10541057 MI->dump();