https://sourceware.org/bugzilla/show_bug.cgi?id=22049
            Bug ID: 22049
           Summary: PowerPC VLE: Lower 16 bit address offset not
                    calculated properly in some cases
           Product: binutils
           Version: 2.28
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: vincegeg83 at gmail dot com
  Target Milestone: ---

The following instruction sequence generates an invalid address offset:

    .org 0x100100

data0:
    .short 0x1234

    e_lis r4, data0@ha
    e_lhz r4, data0@l(r4)

... this will assemble to code that disassembles to:

    e_lis r4, word_0x100000@ha
    e_lhz r4, word_0x100000@l

In other words, it does not calculate the lower 16 bit offset correctly.  This
also fails:

    e_lis r4, data0@ha
    e_addi16 r4, r4, data0@l
    e_lhz r4, 0(r4)

Again, this assembles to reference address 0x100000 for data0.  However, the
following sequence WORKS correctly:

   e_lis r4, data0@ha
   e_ori r4, r4, data0@l
   e_lhz r4, 0(r4)

-- 
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