[PATCH] Use ".arch_extension" ARM directive to support hwdiv

Renato Golin renato.golin at linaro.org
Wed Feb 25 09:26:52 PST 2015


================
Comment at: lib/Target/ARM/ARMAsmPrinter.cpp:709
@@ +708,3 @@
+  if (STI.isKrait() && (STI.hasDivide() || STI.hasDivideInARMMode()))
+    ATS.emitArchExtension("idiv");
+
----------------
sgundapa wrote:
> rengolin wrote:
> > I was looking around and emitting plain text of a hardcoded value here would be a bad idea.
> > 
> > I think you need to create/append an enum and do like FPU/CPU/ARCH.
> Renato, Can you be more specifc on this ?
> If you can point me to an existing implementation, it would be nice.
see emitFPU().

Valid values for name are the same as those accepted as architectural extensions by the -mcpu commandline option.

The same duplication that emitFPU has introduced (by adding the ARMFPUName.def) will need to be introduced, and that will all go away once we unify the parsers. For now, let's have it in the same way, so I can wipe them out all at once later.

http://reviews.llvm.org/D7819

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list