Summary: | Negative immediate for vmov fails on 32-bit host | ||
---|---|---|---|
Product: | binutils | Reporter: | Andrew Stubbs <ams> |
Component: | gas | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | normal | CC: | amodra |
Priority: | P2 | ||
Version: | 2.24 | ||
Target Milestone: | --- | ||
Host: | i686-pc-linux-gnu armv7l-unknown-linux-gnu | Target: | arm |
Build: | Last reconfirmed: | ||
Attachments: | patch |
Description
Andrew Stubbs
2012-03-14 12:07:29 UTC
Created attachment 6286 [details]
patch
This hack works by virtue of X_unsigned only being false when the expression parser sees a unary negate. So -65536 can be distinguished from 0xffff0000 even on a 32-bit host.
I can confirm that the patch fixes the -65536 case, but it still fails for -262144 and -1048576, etc. It ought to be possible to represent any 64-bit number in which each byte consists of either 0x00 or 0xff. What makes you think -262144 and -1048576 are valid? Neither match "each byte consists of either 0x00 or 0xff" or any of the other valid immediates specified in the arm architecture manual for vmov as far as I can see. Ah, ok, it appears my maths is mysteriously broken. On a second inspection, the patch seems fine. |