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

David Peixotto dpeixott at codeaurora.org
Wed Dec 18 11:47:13 PST 2013

On 12/18/2013 11:05 AM, Renato Golin wrote:
> On 18 December 2013 18:28, David Peixotto <dpeixott at codeaurora.org
> <mailto:dpeixott at codeaurora.org>> wrote:
>     Both gcc and armasm accept that syntax for the fconstd/fconsts
>     instructions, but reject it for the vmov.f* functions.
> I'm lost. I thought that we were discussing this because another
> assembler (GNU or ARM) accepted this syntax, while LLVM didn't. If the
> other assemblers don't accept the syntax, how did you find that code in
> the first place?

Ok, let me take a step back and try to explain how we got here :)

I started out by trying to implement support for fconstd, which I 
defined as an alias to vmov.f64. This instruction takes an encoded 
fp-constant as the operand. We already had support for parsing the 
encoded-fp constant as an operand to vmov.f64, but that code was broken 
from an earlier refactoring.

I made this first patch to fix the parsing of encoded fp constants for 
vmov.f* functions. I have a second patch that relies on the fix to 
implement the fconstd/s aliases.

> If neither GAS nor ARMASM support encoded FPs on vmov.f, I think we
> should refuse with a similar error message.

Yes, from my experiments neither gas nor armasm supports encoded fp 
constants for vmov.f functions.

> If the encoded FP problem stops us from supporting another instructions,
> we should fix that.

It prevents us from adding the fconstd/s aliases, but there was 
discussion that we should not support these anyway.

More information about the llvm-commits mailing list