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

            Bug ID: 33143
           Summary: CR16 storx abs always choses slow instruction variant
                    for high addresses
           Product: binutils
           Version: 2.46 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: Jomosoto at proton dot me
  Target Milestone: ---

CR16C has a storx abs20 instruction encoding for addresses 0x0-0xEFFFF and
0xFF0000-0xFFFFFF and a slower storx abs24 one. Gas currently uses the abs24
format also for addresses >= 0xFF0000.

Test case "test.S":

----
storb r0, 0xFF0000
storw r0, 0xFF0000
stord (r1,r0), 0xFF0000
----

Command: "as test.S"


objdump -D output:

---
Disassembly of section .text:

00000000 <.text>:
   0:   13 00 0f 7f     storb   r0,0xff0000:l
   4:   00 00 
   6:   13 00 0f ff     storw   r0,0xff0000:l
   a:   00 00 
   c:   13 00 0f bf     stord   (r1,r0),0xff0000:l
  10:   00 00
---


Expected objdump -D output:

---
Disassembly of section .text:

00000000 <.text>:
   0:   0F c8 00 00     storb   r0,0xff0000:m
   4:   0F c9 00 00     storw   r0,0xff0000:m
   8:   0F c7 00 00     stord   (r1,r0),0xff0000:m
---

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

Reply via email to