golang/go
Auf GitHub ansehencmd/compile: mips/mips64 floating point negation does not handle NaN correctly
Open
#58.466 geöffnet am 10. Feb. 2023
NeedsDecisionarch-mipscompiler/runtimehelp wanted
Repository-Metriken
- Stars
- (133.883 Stars)
- PR-Merge-Metriken
- (Keine gemergten PRs in 30 T)
Beschreibung
As discussed on https://github.com/golang/go/issues/56491#issuecomment-1426492508, on MIPS the gc compiler uses neg.d (which it calls NEGD) to negate a floating-point value. However, that instruction does not actually negate a NaN. That suggests that we should not use neg.d for floating point negation, but should instead xor with the high bit.
CC @randall77 @golang/mips @golang/runtime