Re: RIP relative adresses
- From: "Wolfgang Kern" <nowhere@xxxxxxxxxxx>
- Date: Sat, 28 Apr 2007 04:48:12 +0200
"cr88192" wrote:
just figured, maybe a few people can offer comments here:
some assemblers apparently make RIP-relative addressing the default in
long-mode, and others making absolute the default.
for example, in many assemblers:
mov rax, [foo]
...
foo dq 0x0123456789ABCDEF
handles this by making 'foo' by default accessed via a RIP-relative
address.
I'd consider this as a wrong interpretation.
RIP adressing is a special mode,
even the 05/0d defaults to RIP on certain instructions,
So any mov rax,[mem] should result in:
A1 xx xx xx xx xx xx xx xx ;absolute 64 bit
while only mov anyreg,[rip] should produce
8B "05/0D"... ;which then act with RIP-realative addressing
I think your way is the correct one.
__
wolfgang
.
- Follow-Ups:
- Re: RIP relative adresses
- From: cr88192
- Re: RIP relative adresses
- References:
- RFC: RIP relative adresses
- From: cr88192
- RFC: RIP relative adresses
- Prev by Date: Re: updated assembler
- Next by Date: Re: Where, oh where, is Frank
- Previous by thread: Re: RFC: RIP relative adresses
- Next by thread: Re: RIP relative adresses
- Index(es):
Relevant Pages
|