http://sourceware.org/bugzilla/show_bug.cgi?id=15649

            Bug ID: 15649
           Summary: ARM - Invalid constant after fixup with shifted
                    immediate values
           Product: binutils
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: m.lesniewski at samsung dot com

The ARM data processing instructions (e.g. add, mov, and, etc.) accept
immediate operators. The immediate values can be 8-bit values rotated by any
even number of bits in the range 0-30. For example, it is possible to use
immediate values like 0xab, 0xab000000 and 0x00ab, but not 0xa000b000.

gas accepts immediate operands in two forms: 
   insn rd, rm, imm, rot          @ rd := insn(rm, rot32(imm8, rot4))
   insn rd, rm, imm               @ rd := insn(rm, imm)

In the first case, the base value (imm) and the rotation are given explicitly.
In the second case, these values are calculated by gas. 

I found out that when using the second syntax, gas reports an error saying
"invalid constant (...) after fixup" when some valid immediate values are
given. 

Example instruction:
  add    r0, r1, #0xf000000f

Equivalent instruction (which is handled correctly): 
  add    r0, r1, #0xff, #4

-- 
You are receiving this mail because:
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to