Free JVM on Macintel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/20/06, Casey Marshall <csm@xxxxxxx> wrote:
> On Mar 20, 2006, at 2:07 PM, Christian Thalinger wrote:
>
> > On Mon, 2006-03-20 at 13:51 -0800, Casey Marshall wrote:
> >> Hi,
> >>
> >> Are any free VMs currently supported on OS X for Intel (natively)?
> >>
> >> Alternatively, if there's a concise description on what's needed to
> >> support jamvm or cacao (function call ABI hacks, I'd assume), I'd be
> >> happy to hack on it.
> >
> > I think it's quite easy (at least for me) to port cacao to i686-
> > darwin.
> > The ABI is the same as on linux, AFAIK.
> >
>
> I did blindly try the i386-linux ABI support in jamvm, but that was
> hitting some weird SIGILL.
>
> My understanding is that the Darwin-i386 ABI is very similar to the
> SYSV ABI, with some alignment changes. I did something like this for
> MIPS some time ago, so I'm no stranger to this stuff.
>

Most open-source VMs just rely on libffi to do the nasty
calling-convention stuff.  Therefore, if libffi is supported on your
os/architecture it's already done.

JamVM's a bit different in that it used to always use a "handcoded"
routine to construct the call-frame on each os/cpu as this tends to be
much faster.  You've obviously found the linux/i386 one...

But to ease porting of JamVM it can now also use libffi.  So, at least
with JamVM you have two choices :

1) code the calling-convention "by hand" for darwin/i386.  It's not
difficult, as i386 passes everything on the stack.  As you said, it's
probably alignment stuff, so the linux code should work with some
minor mods.

2) Just use libffi.  As Andrew Pinksi says it's ported, all you need
to do is have an empty platform init.c in darwin/i386, and use
--enable-ffi when configuring JamVM.

Apple tends to have good documentation, so it shouldn't be too hard to
find the differences.  Somebody else has also asked me to support
Intel Macs, so I'll see if I get time to look at it this week. 
However, testing will be difficult, as I don't have an Intel Mac, and
I don't intend to buy one :)

Rob.

> > IIRC we don't have anything like a porting guideline.  I could tell
> > you
> > what to do, or give me access to a box and you get a port in a half
> > day,
> > probably... :-)
> >
>
> It's a laptop, and as such moves around the Bay Area a lot. A little
> description (look at this code/do something similar for your CPU/ABI)
> would help.
>
>


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux