vmkit on x86_64

Hello,

I'm trying to compile vmkit on a x86_64 linux box with gcc-4.1.2, but
I'm running into troubles because of various problems with casts
between pointers and integers. Is there anybody who succeeded in this
task? Az I see, some of the problems can be fixed with an appropriate
typedef/macro declaration, but in VMCore/JavaObject.cpp some lowlevel
bitmanipulation is used, to mark object references as locked - as I
believe.

BR,
Zsombor

p.s
this fixes a typo in the current svn trunk

$ svn diff VMCore/JavaJITOpcodes.cpp
Index: VMCore/JavaJITOpcodes.cpp

Hi Zsombor,

Thanks for the patch! Unfortunately I can't apply it because the llvm API has moved from BinaryOperator::create to BinaryOperator::Create. Are you using svn head?

Now on the x86_64 part. There has been very little work on porting vmkit on x86_64. If you're having compilation problems, I suppose it's in the garbage collector directory (GCMmap2). If you could make the GC code x86_64 clean, I think that would be a major step to execute vmkit on your box. There should be little code in the virtual machines that need to be rewritten.

For the JavaObject class, indeed, it's assuming the lock field is 32-bit. I plan to change that in order to store monitors in a hashtable. If you're willing to implement it, I'll be happy to help you out.

Also, I don't know what is the current status of linux/x86_64 exception handling support in llvm, but that may be also a stopper. The jit-generated dwarf tables were only tested on linux/x86 (I suppose vmkit is the only project using it).

Nicolas

Zsombor wrote:

It's been a while, but since r59525 of VMKit, the JVM implementation runs on linux/x86_64. The GC is not supported though, so each object is allocated with malloc (but you're on a 64bit, anyway :)).

Nicolas

Nicolas Geoffray wrote: