flat assembler
Message board for the users of flat assembler.

Index > Main > Prefix codes

Author
Thread Post new topic Reply to topic
The_CodeMaster



Joined: 25 Jul 2005
Posts: 8
The_CodeMaster
Hi, I'm writing a ASM module (32bit), but when I look at the binary code I see the operand size override prefix (0x66) popping up at some places.

Is there a way to let the compiler compile without the use of any prefix codes? Since they are not realy needed in 32bit mode
Post 25 Jul 2005, 18:45
View user's profile Send private message Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 975
Location: Czechoslovakia
MazeGen
They are, of course, needed also in 32-bit mode. For instance, prefix 0x66 is needed almost always when you use 16-bit register operands.
Post 25 Jul 2005, 18:58
View user's profile Send private message Visit poster's website Reply with quote
The_CodeMaster



Joined: 25 Jul 2005
Posts: 8
The_CodeMaster
Ah, yes, 16 & 32 operands have the same opcode, didn't notice it earlier. Thx anyway.
Post 25 Jul 2005, 19:55
View user's profile Send private message Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
some SSE instructions require 66h preffix as well...
Post 25 Jul 2005, 20:25
View user's profile Send private message Visit poster's website Reply with quote
The_CodeMaster



Joined: 25 Jul 2005
Posts: 8
The_CodeMaster
I know, they are also used to perform string copying requiring 1 instruction (Have IA manuals), though I try to avoid them since I read somwhere that longer instuctions require more time to be prefetched by the instuction decoder.

The IA manual also says that using prefixes won't guaranty the same performance.
Post 25 Jul 2005, 21:35
View user's profile Send private message Reply with quote
MazeGen



Joined: 06 Oct 2003
Posts: 975
Location: Czechoslovakia
MazeGen
The_CodeMaster wrote:
I know, they are also used to perform string copying requiring 1 instruction (Have IA manuals)


What exactly do you mean?

_________________
x86asm.net
Post 25 Jul 2005, 21:58
View user's profile Send private message Visit poster's website Reply with quote
Ancient One



Joined: 28 Feb 2005
Posts: 55
Ancient One
maybe he means the 'rep' prefix
Post 26 Jul 2005, 01:51
View user's profile Send private message MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.