harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject [drlvm][mmtk] Offset.fromSigned() -- what are the semantics?
Date Fri, 06 Oct 2006 15:26:04 GMT
MMTk gurus!
I'm working on MMTk 'unboxed' package support in DRLVM. I hope I finished
the implementation, but because of the scant comments in JAVA docs (like
http://jikesrvm.sourceforge.net/api/org/vmmagic/unboxed/Offset.html)  I feel
that I do not completely understand the semantics of some operations.

Here is one of the issues I do not completely understand:

Look into this test:
long v1 = Offset.fromIntSignExtend(0xBABA).toLong()
long v2 =Offset.fromIntSignExtend(0xffffffff).toLong()

What result is expected after these transformations on IA32 platform?
The Offset by itself is an Integer of 32 or 64 bits (BTW is it signed?).
If the offset is 32 bit integer on IA32 platform the operations like
fromIntSignExtend or fromIntZeroExtend do nothing and just return the
integer value of the offset.
So, after the operations above
v1=0xBABA and v2=0xFFffFFff   for IA32 and
v1=0xBABA and v2=0xFFffFFffFFffFFff   for EM64T platforms.

Is it right?


-- 
Mikhail Fursov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message