[llvm-dev] Can JIT be targeted to 32-bit in a 64-bit Wndows environment?

Kevin Frei via llvm-dev llvm-dev at lists.llvm.org
Fri Oct 30 14:01:39 PDT 2015

No, you really can't do this in any general purpose fashion. You can do some weird things that allow you to use 32 bit pointers while using the full  64 bit ISA, but that won't solve your problem (you still need unwind data).

The way to address the lack of stack unwinding is by adding capabilities to your runtime that use one of RtlAddFunctionTable, RtlAddGrowableFunctionTable, AddVectoredExceptionHandler, or RtlInstallFunctionTableCallback. I used to know a lot (way too much) about this stuff, but my brain has mercifully garbage collected most of it. You could try looking through some of my old MSDN blog found here: http://blogs.msdn.com/b/freik/archive/tags/x64+abi+info/ but it’s not going to be too informative, because most of it was written before I was involved with JIT compilation. I'd be happy to try to answer questions as they come up...


-----Original Message-----
From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Tim Northover via llvm-dev
Sent: Friday, October 30, 2015 7:32 AM
To: Reid Kleckner <rnk at google.com>
Cc: LLVM Developers Mailing List <llvm-dev at lists.llvm.org>; Reid Kleckner <reid at kleckner.net>
Subject: Re: [llvm-dev] Can JIT be targeted to 32-bit in a 64-bit Wndows environment?

On 29 October 2015 at 17:51, Reid Kleckner via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> You actually can mix 32 and 64 bit code in the same Windows process, 
> but only with great effort. Fixing PR24233 is probably easier. :)

How does that work? Some syscall that you make to switch modes and jump to a particular location?

LLVM Developers mailing list
llvm-dev at lists.llvm.org

More information about the llvm-dev mailing list