• Keith Randall's avatar
    cmd/compile: stop using fucomi* ops for 387 builds · 3d01f28e
    Keith Randall authored
    The fucomi* opcodes were only introduced for the Pentium Pro.
    They do not exist for an MMX Pentium.  Use the fucom* instructions
    instead and move the condition codes from the fp flags register to
    the integer flags register explicitly.
    
    The use of fucomi* opcodes in ggen.go was introduced in 1.5 (CL 8738).
    The bad ops were generated for 64-bit floating-point comparisons.
    
    The use of fucomi* opcodes in gsubr.go dates back to at least 1.1.
    The bad ops were generated for float{32,64} to uint64 conversions.
    
    Fixes #13923
    
    Change-Id: I5290599f5edea8abf8fb18036f44fa78bd1fc9e6
    Reviewed-on: https://go-review.googlesource.com/18590Reviewed-by: 's avatarMinux Ma <minux@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    3d01f28e
float_test.go 1.96 KB