[PATCH] D68854: [X86] add mayRaiseFPException flag and FPCW registers for X87 instructions

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 14:34:17 PDT 2019


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86InstrFPStack.td:711
+let Defs = [FPSW] in {
+def FNINIT : I<0xDB, MRM_E3, (outs), (ins), "fninit", []>;
 // Clear exceptions
----------------
FNINIT also defs FPCW as far as I can tell. It reinitializes the entire X87 FPU.


================
Comment at: llvm/lib/Target/X86/X86InstrFPStack.td:719
+let Defs = [FPSW] in
 def FNOP : I<0xD9, MRM_D0, (outs), (ins), "fnop", []>, Sched<[WriteNop]>;
 
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68854/new/

https://reviews.llvm.org/D68854





More information about the llvm-commits mailing list