mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148800 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e697b4f486
commit
53fa1ae510
@ -29,6 +29,7 @@
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Dwarf.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
@ -36,6 +37,12 @@
|
||||
#include "llvm/ADT/Twine.h"
|
||||
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)
|
||||
: DwarfException(A),
|
||||
shouldEmitTable(false), shouldEmitMoves(false), shouldEmitTableModule(false)
|
||||
@ -72,13 +79,15 @@ void ARMException::EndFunction() {
|
||||
Asm->OutStreamer.EmitPersonality(PerSym);
|
||||
}
|
||||
|
||||
// Map all labels and get rid of any dead landing pads.
|
||||
MMI->TidyLandingPads();
|
||||
if (EnableARMEHABIDescriptors) {
|
||||
// Map all labels and get rid of any dead landing pads.
|
||||
MMI->TidyLandingPads();
|
||||
|
||||
Asm->OutStreamer.EmitHandlerData();
|
||||
Asm->OutStreamer.EmitHandlerData();
|
||||
|
||||
// Emit actual exception table
|
||||
EmitExceptionTable();
|
||||
// Emit actual exception table
|
||||
EmitExceptionTable();
|
||||
}
|
||||
}
|
||||
|
||||
Asm->OutStreamer.EmitFnEnd();
|
||||
|
@ -2,6 +2,7 @@
|
||||
; unfamiliar instructions.
|
||||
; 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 -arm-enable-ehabi-descriptors
|
||||
|
||||
define void @_Z1fv() nounwind {
|
||||
entry:
|
||||
|
Loading…
Reference in New Issue
Block a user