Do not randomize the FPU control word in x87_read_environment.
authorMatt Birkholz <puck@birchwood-abbey.net>
Tue, 5 Jan 2016 23:09:04 +0000 (16:09 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Tue, 5 Jan 2016 23:09:04 +0000 (16:09 -0700)
Looks like a typo: eax not replaced by rdi.

src/microcode/cmpauxmd/x86-64.m4

index fb2929452f83e92a7c31d0745f380a1aeef418f1..04993adeb8828242b4958fcd204e3b7eebd46238 100644 (file)
@@ -999,7 +999,7 @@ define_c_label(x87_read_environment)
        fnstenv         IND(REG(rdi))
        # fnstenv masks all exceptions (go figure), so we must load
        # the control word back in order to undo that.
-       fldcw           IND(REG(eax))
+       fldcw           IND(REG(rdi))
        ret
 
 define_c_label(x87_write_environment)