[PATCH] Enable EHABI by default on non-Darwin ARM targets
Anton Korobeynikov
anton at korobeynikov.info
Tue Jan 28 09:53:09 PST 2014
================
Comment at: lib/Target/ARM/ARMAsmPrinter.cpp:1125
@@ -1124,2 +1124,3 @@
// Emit unwinding stuff for frame-related instructions
- if (EnableARMEHABI && MI->getFlag(MachineInstr::FrameSetup))
+ if (!Subtarget->isTargetMachO() && !DisableARMEHABI &&
+ MI->getFlag(MachineInstr::FrameSetup))
----------------
Renato Golin wrote:
> Anton Korobeynikov wrote:
> > Maybe we'd explicitly check for EABI subtarget here?
> That's a good point.
>
> I couldn't find any flag that would directly translate to EABI compatible on all systems (including gnueabi, android, freebsd), but I think this would do:
>
> bool isEHABICompatible = Subtarget->isTargetAEABI() ||
> Subtarget->isTargetELF() ||
> Subtarget->isTargetLinux();
> if (isEHABICompatible && !DisableARMEHABI &&
> MI->getFlag(MachineInstr::FrameSetup))
> EmitUnwindingInstruction(MI);
Hrm, should we really emit unwinding stuff for ELF targets w/o AEABI? And is it possible that isTargetAEABI() will be false and isLinux() will be true?
http://llvm-reviews.chandlerc.com/D2627
More information about the llvm-commits
mailing list