mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
An option to selectively enable part of ARM EHABI support.
This change adds an new option --arm-enable-ehabi-descriptors that enables emitting unwinding descriptors. This provides a mode with a working backtrace() without the (currently broken) exception support. llvm-svn: 148800
This commit is contained in:
parent
06164017c0
commit
a0474f4619
@ -29,6 +29,7 @@
|
|||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/TargetOptions.h"
|
#include "llvm/Target/TargetOptions.h"
|
||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Dwarf.h"
|
#include "llvm/Support/Dwarf.h"
|
||||||
#include "llvm/Support/FormattedStream.h"
|
#include "llvm/Support/FormattedStream.h"
|
||||||
#include "llvm/ADT/SmallString.h"
|
#include "llvm/ADT/SmallString.h"
|
||||||
@ -36,6 +37,12 @@
|
|||||||
#include "llvm/ADT/Twine.h"
|
#include "llvm/ADT/Twine.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
cl::opt<bool>
|
||||||
|
EnableARMEHABIDescriptors("arm-enable-ehabi-descriptors", cl::Hidden,
|
||||||
|
cl::desc("Generate ARM EHABI tables with unwinding descriptors"),
|
||||||
|
cl::init(false));
|
||||||
|
|
||||||
|
|
||||||
ARMException::ARMException(AsmPrinter *A)
|
ARMException::ARMException(AsmPrinter *A)
|
||||||
: DwarfException(A),
|
: DwarfException(A),
|
||||||
shouldEmitTable(false), shouldEmitMoves(false), shouldEmitTableModule(false)
|
shouldEmitTable(false), shouldEmitMoves(false), shouldEmitTableModule(false)
|
||||||
@ -72,13 +79,15 @@ void ARMException::EndFunction() {
|
|||||||
Asm->OutStreamer.EmitPersonality(PerSym);
|
Asm->OutStreamer.EmitPersonality(PerSym);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map all labels and get rid of any dead landing pads.
|
if (EnableARMEHABIDescriptors) {
|
||||||
MMI->TidyLandingPads();
|
// Map all labels and get rid of any dead landing pads.
|
||||||
|
MMI->TidyLandingPads();
|
||||||
|
|
||||||
Asm->OutStreamer.EmitHandlerData();
|
Asm->OutStreamer.EmitHandlerData();
|
||||||
|
|
||||||
// Emit actual exception table
|
// Emit actual exception table
|
||||||
EmitExceptionTable();
|
EmitExceptionTable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Asm->OutStreamer.EmitFnEnd();
|
Asm->OutStreamer.EmitFnEnd();
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
; unfamiliar instructions.
|
; unfamiliar instructions.
|
||||||
; RUN: llc < %s -mtriple=thumbv7 -arm-enable-ehabi -disable-fp-elim
|
; RUN: llc < %s -mtriple=thumbv7 -arm-enable-ehabi -disable-fp-elim
|
||||||
; RUN: llc < %s -mtriple=thumbv7 -arm-enable-ehabi
|
; RUN: llc < %s -mtriple=thumbv7 -arm-enable-ehabi
|
||||||
|
; RUN: llc < %s -mtriple=thumbv7 -arm-enable-ehabi -arm-enable-ehabi-descriptors
|
||||||
|
|
||||||
define void @_Z1fv() nounwind {
|
define void @_Z1fv() nounwind {
|
||||||
entry:
|
entry:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user