]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/linux/386: set FPU to 64-bit precision
authorRuss Cox <rsc@golang.org>
Mon, 13 Dec 2010 15:04:53 +0000 (10:04 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 13 Dec 2010 15:04:53 +0000 (10:04 -0500)
Fixes #550.

R=r
CC=golang-dev
https://golang.org/cl/3469044

src/pkg/runtime/linux/386/rt0.s

index 223e6d2ea4f9ebf968b6b5733fd82eadc12d0cc3..0f82d6a1c77681233fd3bfca5c7fc783e9a3da39 100644 (file)
@@ -5,5 +5,13 @@
 // Darwin and Linux use the same linkage to main
 
 TEXT _rt0_386_linux(SB),7,$0
+       // Linux starts the FPU in extended double precision.
+       // Other operating systems use double precision.
+       // Change to double precision to match them,
+       // and to match other hardware that only has double.
+       PUSHL $0x27F
+       FLDCW   0(SP)
+       POPL AX
+
        JMP     _rt0_386(SB)