[PATCH] Allow encoded 8-bit floating point constants in ARM vmov instructions

Renato Golin renato.golin at linaro.org
Fri Dec 20 13:39:02 PST 2013


On 20 December 2013 20:12, David Peixotto <dpeixott at codeaurora.org> wrote:

> To make things concrete, I have attached a patch that fixes issue #1 and
> adds the pre-UAL aliases. It only accepts encoded floats for the fconst
> aliases.
>

Hi David,

The patch looks good to me, and it doesn't introduce too many changes nor
obscure code, so it should be ok to let this in. The tests also look great,
thanks!

I'd still want Jim to share his opinion, though.

Two specific comments:

-    double RealVal = ARM_AM::getFPImmFloat(Val);
-    Val = APFloat(APFloat::IEEEdouble,
RealVal).bitcastToAPInt().getZExtValue();
+    float RealVal = ARM_AM::getFPImmFloat(Val);
+    Val = APFloat(RealVal).bitcastToAPInt().getZExtValue();

Nice catch, you don't need a double.

-        Mnemonic == "vfms" || Mnemonic == "vfnms" ||
+        Mnemonic == "vfms" || Mnemonic == "vfnms" || Mnemonic == "fconsts"
||

Was the fconstd already there?

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131220/2e95c8ac/attachment.html>


More information about the llvm-commits mailing list