mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 20:32:19 +00:00
For ARM/Darwin, add a dwarf entry indicating whether a function is arm or thumb
rdar://8202967 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
908bafe6fa
commit
917290043f
@ -369,6 +369,10 @@ namespace llvm {
|
|||||||
/// operands.
|
/// operands.
|
||||||
virtual MachineLocation getDebugValueLocation(const MachineInstr *MI) const;
|
virtual MachineLocation getDebugValueLocation(const MachineInstr *MI) const;
|
||||||
|
|
||||||
|
/// getISAEncoding - Get the value for DW_AT_APPLE_isa. Zero if no isa
|
||||||
|
/// encoding specified.
|
||||||
|
virtual unsigned getISAEncoding() { return 0; }
|
||||||
|
|
||||||
//===------------------------------------------------------------------===//
|
//===------------------------------------------------------------------===//
|
||||||
// Dwarf Lowering Routines
|
// Dwarf Lowering Routines
|
||||||
//===------------------------------------------------------------------===//
|
//===------------------------------------------------------------------===//
|
||||||
|
@ -1336,6 +1336,10 @@ DIE *DwarfDebug::createSubprogramDIE(const DISubprogram &SP, bool MakeDecl) {
|
|||||||
if (SP.isOptimized())
|
if (SP.isOptimized())
|
||||||
addUInt(SPDie, dwarf::DW_AT_APPLE_optimized, dwarf::DW_FORM_flag, 1);
|
addUInt(SPDie, dwarf::DW_AT_APPLE_optimized, dwarf::DW_FORM_flag, 1);
|
||||||
|
|
||||||
|
if (unsigned isa = Asm->getISAEncoding()) {
|
||||||
|
addUInt(SPDie, dwarf::DW_AT_APPLE_isa, dwarf::DW_FORM_flag, isa);
|
||||||
|
}
|
||||||
|
|
||||||
// DW_TAG_inlined_subroutine may refer to this DIE.
|
// DW_TAG_inlined_subroutine may refer to this DIE.
|
||||||
SPCU->insertDIE(SP, SPDie);
|
SPCU->insertDIE(SP, SPDie);
|
||||||
|
|
||||||
|
@ -56,6 +56,15 @@ static cl::opt<bool>
|
|||||||
EnableMCInst("enable-arm-mcinst-printer", cl::Hidden,
|
EnableMCInst("enable-arm-mcinst-printer", cl::Hidden,
|
||||||
cl::desc("enable experimental asmprinter gunk in the arm backend"));
|
cl::desc("enable experimental asmprinter gunk in the arm backend"));
|
||||||
|
|
||||||
|
namespace llvm {
|
||||||
|
namespace ARM {
|
||||||
|
enum DW_ISA {
|
||||||
|
DW_ISA_ARM_thumb = 1,
|
||||||
|
DW_ISA_ARM_arm = 2
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
class ARMAsmPrinter : public AsmPrinter {
|
class ARMAsmPrinter : public AsmPrinter {
|
||||||
|
|
||||||
@ -196,6 +205,14 @@ namespace {
|
|||||||
void EmitStartOfAsmFile(Module &M);
|
void EmitStartOfAsmFile(Module &M);
|
||||||
void EmitEndOfAsmFile(Module &M);
|
void EmitEndOfAsmFile(Module &M);
|
||||||
|
|
||||||
|
virtual unsigned getISAEncoding() {
|
||||||
|
// ARM/Darwin adds ISA to the DWARF info for each function.
|
||||||
|
if (!Subtarget->isTargetDarwin())
|
||||||
|
return 0;
|
||||||
|
return Subtarget->isThumb() ?
|
||||||
|
llvm::ARM::DW_ISA_ARM_thumb : llvm::ARM::DW_ISA_ARM_arm;
|
||||||
|
}
|
||||||
|
|
||||||
MCSymbol *GetARMSetPICJumpTableLabel2(unsigned uid, unsigned uid2,
|
MCSymbol *GetARMSetPICJumpTableLabel2(unsigned uid, unsigned uid2,
|
||||||
const MachineBasicBlock *MBB) const;
|
const MachineBasicBlock *MBB) const;
|
||||||
MCSymbol *GetARMJTIPICJumpTableLabel2(unsigned uid, unsigned uid2) const;
|
MCSymbol *GetARMJTIPICJumpTableLabel2(unsigned uid, unsigned uid2) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user