bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/14338] New: ssat instruction saturate_to field incorrectly


From: robiniddon at googlemail dot com
Subject: [Bug binutils/14338] New: ssat instruction saturate_to field incorrectly disassembled
Date: Sun, 08 Jul 2012 09:12:38 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=14338

             Bug #: 14338
           Summary: ssat instruction saturate_to field incorrectly
                    disassembled
           Product: binutils
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified


Created attachment 6517
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6517
Assembled object that disassembles incorrectly.

Assemble test-case.s:

$ cat test-case.s
.syntax unified
.arch armv7-m
.text
  ssat  r12,#16,r12

$ arm-none-eabi-gcc -march=armv7-m -mthumb -c test-case.s -o test-case.o

Now disassemble test-case.o (attached):

$ arm-none-eabi-objdump -d test-case.o

test-case.o:     file format elf32-littlearm

Disassembly of section .text:

00000000 <.text>:
   0:    f30c 0c0f     ssat    ip, #15, ip


Note that the ssat instruction encodes the saturate_to field as one less than
the target so on disassembly we ought to add one to it.  I think correct
disassembly would have been:

00000000 <.text>:
   0:    f30c 0c0f     ssat    ip, #16, ip


This is using 2.21 - I don't have a later version available to test (x86_64,
Fedora 17 host cross compiling to ARM7-M).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]