diff options
Diffstat (limited to 'contrib/llvm/lib/CodeGen/AsmPrinter')
| -rw-r--r-- | contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp | 23 | 
1 files changed, 14 insertions, 9 deletions
| diff --git a/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp b/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp index cf8e8c69bc2a..92df09b7d6a2 100644 --- a/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp +++ b/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp @@ -545,15 +545,17 @@ void WinException::emitCSpecificHandlerTable(const MachineFunction *MF) {        OS.AddComment(Comment);    }; -  // Emit a label assignment with the SEH frame offset so we can use it for -  // llvm.eh.recoverfp. -  StringRef FLinkageName = -      GlobalValue::dropLLVMManglingEscape(MF->getFunction().getName()); -  MCSymbol *ParentFrameOffset = -      Ctx.getOrCreateParentFrameOffsetSymbol(FLinkageName); -  const MCExpr *MCOffset = -      MCConstantExpr::create(FuncInfo.SEHSetFrameOffset, Ctx); -  Asm->OutStreamer->EmitAssignment(ParentFrameOffset, MCOffset); +  if (!isAArch64) { +    // Emit a label assignment with the SEH frame offset so we can use it for +    // llvm.eh.recoverfp. +    StringRef FLinkageName = +        GlobalValue::dropLLVMManglingEscape(MF->getFunction().getName()); +    MCSymbol *ParentFrameOffset = +        Ctx.getOrCreateParentFrameOffsetSymbol(FLinkageName); +    const MCExpr *MCOffset = +        MCConstantExpr::create(FuncInfo.SEHSetFrameOffset, Ctx); +    Asm->OutStreamer->EmitAssignment(ParentFrameOffset, MCOffset); +  }    // Use the assembler to compute the number of table entries through label    // difference and division. @@ -937,6 +939,9 @@ void WinException::emitEHRegistrationOffsetLabel(const WinEHFuncInfo &FuncInfo,    if (FI != INT_MAX) {      const TargetFrameLowering *TFI = Asm->MF->getSubtarget().getFrameLowering();      unsigned UnusedReg; +    // FIXME: getFrameIndexReference needs to match the behavior of +    // AArch64RegisterInfo::hasBasePointer in which one of the scenarios where +    // SP is used is if frame size >= 256.      Offset = TFI->getFrameIndexReference(*Asm->MF, FI, UnusedReg);    } | 
