[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-hotspot-runtime-dev
Subject: x86 address generation / jump-targets
From: peter.helfer.java () gmail ! com (Peter Helfer)
Date: 2008-01-11 16:55:49
Message-ID: ee73e03b0801110855o7d824e2cn103dbf1f1621f328 () mail ! gmail ! com
[Download RAW message or body]
Hi all
I need to generate some return address, which is within a RuntimeStub I'm
creating. But the return address created as InternalAddress does show up as
0x00009BE9 - this seems not to be ok.. Is this the right approach ?
Regards, Peter
[do some stuff]
__ jmp(done) // jumps over next segment
//==============================================
Label exitadapter;
address returnpc_for_interpreter = __ pc();
__ jmp(exitadapter); // jump over next segment
//==============================================
__ bind(done);
__ mov32(rcx, InternalAddress(returnpc_for_interpreter)); // lets hope we've
got the right one
__ xchg(rcx, Address(rbp, frame::return_addr_offset * wordSize) // replace
current returnpc with new one
... stackdump done here
__ jmp(rcx); // but still go once into the old entry..
//==============================================
__ bind(exitadapter);
// stack dump
[AD759F30] = 0817BC00.%edi
[AD759F34] = 00000000.%esi
[AD759F38] = AD759F74.%ebp
[AD759F3C] = AD759F50.%esp before pushad
[AD759F40] = B7F7AFF4.%ebx
[AD759F44] = 0817BC00.%edx
[AD759F48] = B5C002B0.%ecx
[AD759F4C] = D00DFACE.%eax
[AD759F50] = ADBB36E8.
[AD759F54] = AD759F54.
[AD759F58] = B1D5506F.
[AD759F5C] = AD759FA0.
[AD759F60] = B1D55380.
[AD759F64] = 00000000.
[AD759F68] = B1D55188.
[AD759F6C] = 00000000.
[AD759F70] = B5C06752.
[AD759F74] = AD759FA8 <-- rbp
[AD759F78] = 00009BE9 <-- returnpc
.. and zeros after that..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20080111/b2f3840f/attachment.html \
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic