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

            Bug ID: 33214
           Summary: sparc LDM/STM/LDMA/STMA etc. FAIL on Solaris/SPARC
           Product: binutils
           Version: 2.46 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: ro at gcc dot gnu.org
                CC: jose.marchesi at oracle dot com
  Target Milestone: ---
              Host: sparc*-sun-solaris2.11
            Target: sparc*-sun-solaris2.11
             Build: sparc*-sun-solaris2.11

Two gas tests FAIL on Solaris/SPARC (both 32 and 64-bit):

FAIL: sparc LDM/STM/LDMA/STMA
FAIL: sparc LDMF/STMF/LDMFA/STMFA

The problem is the same in both cases.  For the first (gas/sparc/ldm-stm.d),
there's

regexp_diff match failure
regexp "^   8:  c7 88 60 66     ldmsh  \[ %g1 \+ 0x66 \], %g3$"
line   "   8:   c7 88 60 66     ldmsh  [ 0x66 + %g1 ], %g3"

i.e. the order of the operands is reversed.

This doesn't occur on Linux/SPARC.

Via side-by-side debugging of Solaris vs. Linux objdump, I find that in
sparc-dis.c (print_insn_sparc) at l.557 (i.e. once a matching insn has been
found), there's

$21 = {name = 0x1001f8500 "ldmsh", match = 3246923776, lose = 7347200, 
  args = 0x1001f8510 "[j+1],d", flags = 0, hwcaps = 0, hwcaps2 = 131072, 
  architecture = 16384}

on Solaris while Linux has

$11 = {name = 0x2e30a8 "ldmsh", match = 3246923776, lose = 7347200, 
  args = 0x2e30b0 "[1+j],d", flags = 0, hwcaps = 0, hwcaps2 = 131072, 
  architecture = 16384}

instead.  So, the only difference is that args is reversed:

* Solaris: [j+1],d
* Linux:   [1+j],d

It seems that compare_opcodes, which already has special code to prefer 1+i
over i+1, needs similar code for j (and maybe others, I cannot tell).

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

Reply via email to