bug-gnu-utils
[Top][All Lists]
Advanced

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

Invalid movzx instruction in GAS-2.11.2


From: Gero Kuhlmann
Subject: Invalid movzx instruction in GAS-2.11.2
Date: Mon, 8 Jul 2002 00:08:50 +0200
User-agent: Mutt/1.3.12i

Hello,

today I think I've found a bug in GAS, version 2.11.2. My GAS has been
compiled as a cross-assembler for a 'i386-unknown-msdos' target on a
Linux host system with Alpha processor. The code which produced this
bug is:

====================================================================
.intel_syntax noprefix
.arch i386
.code16
.text

label1:
        movzx   eax,word ptr [somevar]

somevar: .word 0
====================================================================

It should produce '66 0F B7 06 xx xx' with 'xx xx' being the address
referenced by [somevar]. But instead GAS produces '0F B7 06 xx xx',
e.g. it is missing out the data32 prefix while wihtin the .code16
segment. Even though there is just this one instruction with the '0F B6'
opcode, and it should always reference to a 32-bit destination register
according to the Intel documentation even without a prefix, in reality
the processor does need the prefix.

For your information: for assembling this example I did not use any
command line options except -o. Until this bug is fixed I'm explicitly
using the data32 prefix in front of all movzx instructions which require
it. I don't know if the movsx instruction is also affected, but I guess
so.

If you need any further information please don't hesitate to contact me.

Thank you very much for this great assembler.

gero.

-- 
Gero Kuhlmann                                 address@hidden
Tollenbrink 18          Groote Gracht 33      Tel. Hannover: 0511/6497525
30659 Hannover          26723 Emden           Tel. Emden:    04921/997561



reply via email to

[Prev in Thread] Current Thread [Next in Thread]