[PATCH] Enable EHABI by default on non-Darwin ARM targets

Renato Golin renato.golin at linaro.org
Tue Jan 28 09:32:54 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:
> 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);


http://llvm-reviews.chandlerc.com/D2627



More information about the llvm-commits mailing list