bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/15649] New: ARM - Invalid constant after fixup with shifted imm


From: m.lesniewski at samsung dot com
Subject: [Bug gas/15649] New: ARM - Invalid constant after fixup with shifted immediate values
Date: Wed, 19 Jun 2013 14:32:00 +0000

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]