mirror of
https://github.com/golang/go
synced 2024-09-25 03:10:12 -06:00
cmd/compile: repair MININT conversion bug in arm softfloat
Negative-case conversion code was wrong for minimum int32, used negate-then-widen instead of widen-then-negate. Test already exists; this fixes the failure. Fixes #15563. Change-Id: I4b0b3ae8f2c9714bdcc405d4d0b1502ccfba2b40 Reviewed-on: https://go-review.googlesource.com/22830 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
5f83bf6053
commit
6db98a3c51
@ -530,7 +530,7 @@ execute:
|
||||
case 0xeeb80ac0: // D[regd] = S[regm] (MOVWF)
|
||||
cmp := int32(m.freglo[regm])
|
||||
if cmp < 0 {
|
||||
fputf(regd, f64to32(fintto64(int64(-cmp))))
|
||||
fputf(regd, f64to32(fintto64(-int64(cmp))))
|
||||
m.freglo[regd] ^= 0x80000000
|
||||
} else {
|
||||
fputf(regd, f64to32(fintto64(int64(cmp))))
|
||||
@ -552,7 +552,7 @@ execute:
|
||||
case 0xeeb80bc0: // D[regd] = S[regm] (MOVWD)
|
||||
cmp := int32(m.freglo[regm])
|
||||
if cmp < 0 {
|
||||
fputd(regd, fintto64(int64(-cmp)))
|
||||
fputd(regd, fintto64(-int64(cmp)))
|
||||
m.freghi[regd] ^= 0x80000000
|
||||
} else {
|
||||
fputd(regd, fintto64(int64(cmp)))
|
||||
|
Loading…
Reference in New Issue
Block a user