flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Main > address size override with near call in long mode

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 473
Location: Belarus
address size override with near call in long mode
Intel manual says:

Quote:

The use of the address-size prefix does not disable RIP-relative addressing. The effect of the address-size prefix is to truncate and zero-extend the computed effective address to 32 bits.



For control transfer instructions relative addressing is default.

CALL rel32 description says:

Quote:

Call near, relative, displacement relative to next instruction. 32-bit displacement sign extended to 64-bits in 64-bit mode


But rel32 is more immediate, than address as operand-size prefix overrides default value.

If apply address-override to near call, will it behave as in quote one (zero-extend address instead of sign-extending it)

How to do this in fasm? call dword <value> generates error, while call word <value> adds operand-size override (as expected)
Post 09 May 2017, 20:06
View user's profile Send private message Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 473
Location: Belarus
It turns out that address-size override is not applicable to this kind of instructions
Post 10 May 2017, 08:02
View user's profile Send private message 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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.