[PATCH] Enable EHABI by default on non-Darwin ARM targets
Renato Golin
renato.golin at linaro.org
Tue Jan 28 11:31:47 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))
----------------
Anton Korobeynikov wrote:
> 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?
Yes, for gnueabi, that's the norm. AEABI is only enabled with the target is *explicitly* "EABI".
I'm fine with removing the ELF flag, since that was just a guess, but Linux generally means gnueabi, and in fact, if the triple is gnueabi, that won't generate the tables.
I could also add a Subtarget->hasEHABISupport() and do some fiddling with the triples...
http://llvm-reviews.chandlerc.com/D2627
More information about the llvm-commits
mailing list