https://sourceware.org/bugzilla/show_bug.cgi?id=31889

            Bug ID: 31889
           Summary: [GAS] Confuse operand types
           Product: binutils
           Version: 2.41
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: witbring at gmail dot com
  Target Milestone: ---

I noticed that AArch64 GAS accepts immediate values as the third operand for
tbz, tbnz, and adrp opcodes. However, according to the manual, these opcodes
should only accept labels as their third operand. Therefore, I believe GAS
should raise an error message for the following example code.


Buggy Code.
```
Bugs:
    tbz X0, [1], 1<<2
    tbnz X0, [1], 1<<2
    adrp X0, 1<<2
```

Compiled Code
```
Bugs:
 tbz    w0, #1, 4 <Bugs+0x4>
 tbnz   w0, #1, 8 <Bugs+0x8>
 adrp   x0, 0 <Bugs>
```

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

Reply via email to