indirect array reference from interpreter

Manjiri Namjoshi manjiri.namjoshi at googlemail.com
Thu Nov 12 16:56:29 PST 2009


Hello,

I am trying to set a global array from the hotspot interpreter.
I am using x86 machine, so in the templateInterpreter_x86_32.cpp (on every
method entry) I have put following code :

__ mov32(ExternalAddress((address)(ptr_queue)),rdx);   // rdx contains the
value that I want to set in the array location that ptr_queue is currently
pointing

// following code increments the ptr_queue, so that it will point to the
next array index.
__ mov32(rax, ExternalAddress((address)&(ptr_queue)));
__ addl(rax, 4);
__ mov32(ExternalAddress((address)&(ptr_queue)),rax);


where,
int * ptr_queue = &profileQueue[0];
// profileQueue is the actual global array that I want to set.

But, this code is able to set only profileQueue[0] with the value in rdx.
All the other locations in the array are not getting set to rdx.

Basically, I need to do indirect array referencing from the interpreter.

Please let me know if my question is not clear.

Thank You.

Sincerely,
Manjiri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20091112/2526d4e8/attachment.html 


More information about the hotspot-dev mailing list