[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wrong machine code
From: |
Dong Jianxiong |
Subject: |
Wrong machine code |
Date: |
Tue, 15 Jul 2003 09:14:08 -0400 (EDT) |
Dear GNU community,
Recently I found a bug from GNU Assembler. It translates the
"fsubr %st, %st(1)" into the incorrect machine code. The bug summary is
given as follows:
-----------------------------------------------------------
Plat:
CPU: Pentium 4, 2.0Ghz
linux2.4.9
gcc: i686-pc-linux-gnu/ version 3.2.3
as: GNU Assembler 2.11.90.0.8. It is configured for a target of
'i386-redhat-linux'.
-------------------------------------------------------------
The above assembler translates the above instruction to the incorrect
machine code 'DC E9'.
The correct machine code should be 'DC E1'
You can visit Intel website and download the reference guide for P4
instruction set.
http://www.intel.com/design/pentium4/manuals/245471.htm
download the PDF file and use Acrobat to open it.
read the description of "fsubr" on the page 335.
---------------------------------------------------------------
Finally, I attach an assemble source code file "bug.s" which consists of
five instructions.
gcc -c bug.s //generate the object file bug.o
objdump -S bug.o //view the machine code for each instruction
Regard
Jianxiong Dong
--
//////////////////////////////////////////////////////////////
JIANXIONG DONG
Centre for Pattern Recognition and Machine Intelligence
GM606, Concordia University
1455 de Maisonneuve Blvd. West
Montreal Quebec H3G 1M8, Canada
Tel: (Office) (514)848-2854
Fax: (514)848-4522
E-mail: address@hidden
homepage: http://www.cenparmi.concordia.ca/~people/jdong
//////////////////////////////////////////////////////////////
bug.s
Description: Text document
- Wrong machine code,
Dong Jianxiong <=