Issue 15 in jitasm: can 64-bit immediate addressing be through RIP relative addressing transparently ?

0 views
Skip to first unread message

jit...@googlecode.com

unread,
Oct 5, 2013, 6:12:23 PM10/5/13
to jitasm...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 15 by hlide.de...@gmail.com: can 64-bit immediate addressing be
through RIP relative addressing transparently ?
http://code.google.com/p/jitasm/issues/detail?id=15

I'm trying to use immediate address in a code I tried to make it work for
both 32-bit and 64-bit versions. In 64-bit, it fails to build with another
instruction else "mov". looking at jitasm I see no occurence of RIP (for
instruction relative address) which may be a good alternative to immediate
64-bit addressing.

addps(xmm0, xmmword_ptr[intptr_t(constants)]) -> addps xmm0,
xmmword_ptr[rip+intptr_t(constants)-$] where $ is the address of the next
instruction. Does jitasm has this facility to build such instruction with a
RIP-relative address ?




--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

jit...@googlecode.com

unread,
Oct 6, 2013, 3:28:21 PM10/6/13
to jitasm...@googlegroups.com

Comment #1 on issue 15 by hlide.de...@gmail.com: can 64-bit immediate
addressing be through RIP relative addressing transparently ?
http://code.google.com/p/jitasm/issues/detail?id=15

ok, it makes pretty evident to use rip is nearly impossible since the
offset tends to be beyond 32-bit range. Is that really impossible to have a
64-bit displacement ? I was under impression the displacement can be only 1
byte, 2 bytes or 4 bytes but I can read it : "A displacement value is a 1,
2, 4, or 8 byte offset added to the calculated address. When an 8 byte
displacement is used, no immediate operand is encoded." Now I'm puzzled.
Reply all
Reply to author
Forward
0 new messages