Commit aa739b8d authored by Russ Cox's avatar Russ Cox

[dev.power64] cmd/9g: correct floating point comparison

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/129210043
parent ecbe6b9f
...@@ -1267,9 +1267,9 @@ bgen(Node *n, int true, int likely, Prog *to) ...@@ -1267,9 +1267,9 @@ bgen(Node *n, int true, int likely, Prog *to)
l = &n1; l = &n1;
r = &n2; r = &n2;
gins(optoas(OCMP, nr->type), l, r); gins(optoas(OCMP, nr->type), l, r);
if(isfloat[nr->type->etype] && (n->op == OLE || n->op == OGE)) { if(isfloat[nr->type->etype] && (a == OLE || a == OGE)) {
// To get NaN right, must rewrite x <= y into separate x < y or x = y. // To get NaN right, must rewrite x <= y into separate x < y or x = y.
switch(n->op) { switch(a) {
case OLE: case OLE:
a = OLT; a = OLT;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment