commit e2bc0ad3960769ba7a0f1223ac160b0d985fff35
parent 3a6cc4d0c0820319fc75cdde463eaf35d1731f4c
Author: Michael Forney <mforney@mforney.org>
Date: Sat, 27 Apr 2019 18:27:21 -0700
amd64: Use unordered compare for floating points
This prevents an FE_INVALID exception when comparing with NaN.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/amd64/emit.c b/amd64/emit.c
@@ -110,8 +110,8 @@ static struct {
{ Osign, Kw, "cltd" },
{ Oxdiv, Ki, "div%k %0" },
{ Oxidiv, Ki, "idiv%k %0" },
- { Oxcmp, Ks, "comiss %S0, %S1" },
- { Oxcmp, Kd, "comisd %D0, %D1" },
+ { Oxcmp, Ks, "ucomiss %S0, %S1" },
+ { Oxcmp, Kd, "ucomisd %D0, %D1" },
{ Oxcmp, Ki, "cmp%k %0, %1" },
{ Oxtest, Ki, "test%k %0, %1" },
#define X(c, s) \