[hotspot-dev] JIT compiler generate x86 and x86_64 binary
erik.trimble at oracle.com
Sun Oct 3 13:51:14 PDT 2010
On 10/3/2010 4:33 AM, 邱筱惠 wrote:
> hi, all
> i built openjdk6 on x86_64 machine, and actually JIT compiler
> generated codes for x86_64,
> now i try to make JIT compiler can generate x86 32 bits codes. because
> x86_32 binary could run
> on x86_64 machine.
> Is this idea feasible? and any other hint to do this?
I _believe_ that what you want it to install the x86 version of the
server JRE on your x64 machine - its JIT will generate x86 instructions.
Naturally, you'll have to live with the memory (and other) restrictions
of x86, even through the OS/hardware may be x64.
Having a x64 systems generate "x86" codes isn't the right questions. x64
is an ISA (environment), and it's a general superset of the x86 ISA.
So, technically, you *are* generating x86 opcodes, they're just being
run in a x64 context. You *can't* switch the context a process runs in
- no program is able to do that.
If all you are looking to be able to do is build a 32-bit JDK on a x64
machine, that's entirely possible (indeed really simple on Solaris, a
bit more - but not much - difficult on Linux). The README instructions
should have the option you need to set in the build/make process to
produce a 32-bit JDK on a 64-bit machine/OS.
Note you can't use a 32-bit Hotspot with a 64-bit JDK, or vice versa.
Java System Support
Santa Clara, CA
More information about the hotspot-dev