[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...

-Kev

-----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?

Tim.
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=CwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=4zbdR5ro-4Q70KzNlQEJGQ&m=aQp1Fpw9kqdA0zTLPW-VD2WUietCv1PbQwWpfy3hz_o&s=l47K1peXJebEjQgvcW0ebZYGtPYXPh-qxdgV1ihE-qI&e= 


More information about the llvm-dev mailing list