[LLVMdev] Disabling x87 instructions for a sub-target

Murali, Sriram sriram.murali at intel.com
Fri Apr 6 14:30:22 PDT 2012


Thanks Chris, your response has been very helpful so far. I will try your solution, as opposed to the one that I have right now. (Disabling all the x87 instructions altogether).

Yours,
Ram

-----Original Message-----
From: Christoph Erhardt [mailto:christoph at sicherha.de] 
Sent: Thursday, April 05, 2012 7:08 PM
To: Murali, Sriram
Subject: Re: [LLVMdev] Disabling x87 instructions for a sub-target

Hi Ram,

of course I can share the patch with you as soon as I have put it up for
review. As far as I'm aware, the bugfix should be relatively
version-agnostic, so you should not have too much trouble backporting it.

The solution basically works like this:
* Model FPSW (the FPU status word) as a register.
* Add ISel patterns for the FCOM*, FNSTSW and SAHF instructions.
* During Legalize/Lowering, build a node sequence to transport the
comparison result from FPSW into EFLAGS.

The patch itself is already finished, but I want to add a few test cases
before submitting it (probably during the weekend if I find the time).

Cheers,
Christoph

Am 05.04.2012 19:39, schrieb Murali, Sriram:
> Hi Christoph,
> I am keen on learning how you are approaching this issue, and fixing the bug. It would be great if you can share the patch while it is being reviewed, or just give some directions on how to fix the issue. I am working on the llvm-3.0 branch, and the fix in the trunk (or 3.1) might not work for me.
> 
> Thanks for your time.
> Ram




More information about the llvm-dev mailing list