Commit 79a3b561 authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile/internal/gc: remove special handling for -0.0

Per the latest spec change, Go doesn't have -0 constants.

Change-Id: Ic2bcdc3bf507d121ed204f30f6744bb8764202c0
Reviewed-on: https://go-review.googlesource.com/16232Reviewed-by: default avatarChris Manghane <cmang@golang.org>
parent ae2f54a7
......@@ -713,20 +713,11 @@ func (p *exporter) value(x Val) {
}
func (p *exporter) float(x *Mpflt) {
// extract sign, treat -0 as < 0
// extract sign (there is no -0)
f := &x.Val
sign := f.Sign()
if sign == 0 {
// ±0
// TODO(gri) remove 'if' below if #12577 gets accepted
if f.Signbit() {
// -0 (uncommon)
p.int(-1)
p.int(0)
p.string("")
return
}
// +0
// x == 0
p.int(0)
return
}
......
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