[PATCH] D86942: x87 FPU state instructions do not use an f32 memory location

Eric Astor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 07:59:24 PDT 2020


epastor created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
epastor requested review of this revision.

These instructions actually use a 512-byte location, where bytes 464-511 are ignored.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86942

Files:
  llvm/lib/Target/X86/X86InstrFPStack.td


Index: llvm/lib/Target/X86/X86InstrFPStack.td
===================================================================
--- llvm/lib/Target/X86/X86InstrFPStack.td
+++ llvm/lib/Target/X86/X86InstrFPStack.td
@@ -392,13 +392,13 @@
 
 let SchedRW = [WriteMicrocoded] in {
 let Defs = [FPSW, FPCW], mayLoad = 1 in {
-def FLDENVm  : FPI<0xD9, MRM4m, (outs), (ins f32mem:$src), "fldenv\t$src">;
-def FRSTORm  : FPI<0xDD, MRM4m, (outs), (ins f32mem:$dst), "frstor\t$dst">;
+def FLDENVm  : FPI<0xD9, MRM4m, (outs), (ins anymem:$src), "fldenv\t$src">;
+def FRSTORm  : FPI<0xDD, MRM4m, (outs), (ins anymem:$src), "frstor\t$src">;
 }
 
 let Defs = [FPSW, FPCW], Uses = [FPSW, FPCW], mayStore = 1 in {
-def FSTENVm  : FPI<0xD9, MRM6m, (outs), (ins f32mem:$dst), "fnstenv\t$dst">;
-def FSAVEm   : FPI<0xDD, MRM6m, (outs), (ins f32mem:$dst), "fnsave\t$dst">;
+def FSTENVm  : FPI<0xD9, MRM6m, (outs), (ins anymem:$dst), "fnstenv\t$dst">;
+def FSAVEm   : FPI<0xDD, MRM6m, (outs), (ins anymem:$dst), "fnsave\t$dst">;
 }
 
 let Uses = [FPSW], mayStore = 1 in


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86942.289168.patch
Type: text/x-patch
Size: 1034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200901/4ae5c6e8/attachment.bin>


More information about the llvm-commits mailing list