bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/22049] New: PowerPC VLE: Lower 16 bit address offset not calcul


From: vincegeg83 at gmail dot com
Subject: [Bug gas/22049] New: PowerPC VLE: Lower 16 bit address offset not calculated properly in some cases
Date: Wed, 30 Aug 2017 22:27:09 +0000

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, address@hidden
    e_lhz r4, address@hidden(r4)

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

    e_lis r4, address@hidden
    e_lhz r4, address@hidden

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

    e_lis r4, address@hidden
    e_addi16 r4, r4, address@hidden
    e_lhz r4, 0(r4)

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

   e_lis r4, address@hidden
   e_ori r4, r4, address@hidden
   e_lhz r4, 0(r4)

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