This patch adds flag "mayRaiseFPException" , FPCW and FPSW for X87 instructions which could raise
float exception.
Details
Diff Detail
Event Timeline
Test cases?
llvm/lib/Target/X86/X86InstrFPStack.td | ||
---|---|---|
708 ↗ | (On Diff #224524) | Why did you change this? FFREE/FFREEP leave FPSW in an undefined state |
llvm/lib/Target/X86/X86InstrFPStack.td | ||
---|---|---|
708 ↗ | (On Diff #224524) | Thanks for your review. I have added 'let Defs = [FPSW]' in class FPI. |
The Diff 226855 has some problems. This one adds testcase to verify if x87 instructions use/def fpcw and fpcw registers.
llvm/lib/Target/X86/X86InstrFPStack.td | ||
---|---|---|
711 ↗ | (On Diff #226862) | FNINIT also defs FPCW as far as I can tell. It reinitializes the entire X87 FPU. |
719 ↗ | (On Diff #226862) | I don't think this instruction updates FPSW it appears to be a mistake in the Intel SDM, but since we never generate it it probably doesn't matter. |
commandeering so I can fix the FNINIT issue. And put FPCW/FPSW in consistent order in the Uses/Defs so we don't end up with two different Implicit defs lists in X86GenInstrInfo.inc
@LiuChen3 @craig.topper This has broken EXPENSIVE_CHECKS builds, please can you take a look? http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-ubuntu/builds/184/