[Bug binutils/10288] "objdump -D --target=binary -m arm7tdmi" shows non-ARM7TDMI instructions

2009-07-20 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-07-20 
12:11 ---
Subject: Bug 10288

CVSROOT:/cvs/src
Module name:src
Changes by: ni...@sourceware.org2009-07-20 12:11:18

Modified files:
opcodes: ChangeLog arm-dis.c 

Log message:
PR 10288
* arm-dis.c (arm_opcodes): Catch non-zero bits 8-11 in register
offset or indexed based addressing mode 3.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/opcodes/ChangeLog.diff?cvsroot=src&r1=1.1418&r2=1.1419
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/opcodes/arm-dis.c.diff?cvsroot=src&r1=1.104&r2=1.105



-- 


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10288] "objdump -D --target=binary -m arm7tdmi" shows non-ARM7TDMI instructions

2009-07-20 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2009-07-20 12:16 
---
Hi Chris,

  OK, I have checked in a patch to handle the SBZ field in addressing mode 3.

Cheers
  Nick


-- 


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/10419] New: nops[] in binutils/gold/x86_64.cc are not actually x86-64 NOPs

2009-07-20 Thread anders at kaseorg dot com
>From binutils-2.19/gold/x86_64.cc:
  // Nop sequences of various lengths.
  const char nop1[1] = { 0x90 };   // nop
  const char nop2[2] = { 0x66, 0x90 }; // xchg %ax %ax
  const char nop3[3] = { 0x8d, 0x76, 0x00 };   // leal 0(%esi),%esi
  const char nop4[4] = { 0x8d, 0x74, 0x26, 0x00};  // leal 0(%esi,1),%esi
  …

This table was copied from i386.cc.  However, most of these sequences are not
actually NOPs on x86-64!  For example, nop3, which actually disassembles to “lea
0(%rsi),%esi”, has the effect of clearing the high 32 bits of %rsi.  This can be
verified with a quick test program:
  unsigned long x = 0x12345678ABCDEF00;  
  printf("x=%lx\n", x);  
  asm volatile (".byte 0x8d, 0x76, 0x00" : "=S" (x) : "S" (x));  
  printf("x=%lx\n", x);  
Output:
  x=12345678abcdef00
  x=abcdef00

-- 
   Summary: nops[] in binutils/gold/x86_64.cc are not actually x86-
64 NOPs
   Product: binutils
   Version: 2.19
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: ian at airs dot com
ReportedBy: anders at kaseorg dot com
CC: bug-binutils at gnu dot org


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/10420] New: .p2align can generate non-NOPs on x86-64

2009-07-20 Thread anders at kaseorg dot com
By default on x86-64, gas uses 0f 1f 00 as a 3-byte NOP for alignment:

$ echo 'nop; .p2align 2' > test.s
$ as test.s -o test.o
$ objdump -d test.o | tail -n2
   0:   90  nop
   1:   0f 1f 00nopl   (%rax)

However, with some -mtune options, it can generate 8d 76 00 instead:

$ as -mtune=pentium test.s -o test.o
$ objdump -d test.o | tail -n2
   0:   90  nop
   1:   8d 76 00lea0x0(%rsi),%esi

This instruction is not actually a NOP on x86-64!  It has the effect of clearing
the high 32 bits of %rsi (see also bug #10419).  This could lead to incorrect
code generation, even though -mtune is only supposed to affect optimization
decisions and not correctness.

-- 
   Summary: .p2align can generate non-NOPs on x86-64
   Product: binutils
   Version: 2.19
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: anders at kaseorg dot com
CC: bug-binutils at gnu dot org


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/10419] nops[] in binutils/gold/x86_64.cc are not actually x86-64 NOPs

2009-07-20 Thread hjl dot tools at gmail dot com

--- Additional Comments From hjl dot tools at gmail dot com  2009-07-20 
19:21 ---
x86-64 should use multi-byte nops.

-- 


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/10419] nops[] in binutils/gold/x86_64.cc are not actually x86-64 NOPs

2009-07-20 Thread hjl dot tools at gmail dot com

--- Additional Comments From hjl dot tools at gmail dot com  2009-07-20 
19:25 ---
   0:   0f 1f 00nopl   (%rax)
   3:   0f 1f 40 00 nopl   0(%rax)


-- 


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/10419] nops[] in binutils/gold/x86_64.cc are not actually x86-64 NOPs

2009-07-20 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-07-21 
05:23 ---
Subject: Bug 10419

CVSROOT:/cvs/src
Module name:src
Changes by: i...@sourceware.org 2009-07-21 05:22:55

Modified files:
gold   : ChangeLog x86_64.cc 

Log message:
PR 10419
* x86_64.cc (Target_x86_64::do_code_fill): Correct nop sequences.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.258&r2=1.259
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/x86_64.cc.diff?cvsroot=src&r1=1.83&r2=1.84



-- 


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/10419] nops[] in binutils/gold/x86_64.cc are not actually x86-64 NOPs

2009-07-20 Thread ian at airs dot com

--- Additional Comments From ian at airs dot com  2009-07-21 05:26 ---
Thanks for noticing this.  I committed a patch to fix the problem.

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils