]> Cypherpunks repositories - gostls13.git/commit
runtime: fix floating point exception on Plan 9
authorAkshat Kumar <seed@mail.nanosouffle.net>
Tue, 10 Apr 2012 19:14:10 +0000 (15:14 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 10 Apr 2012 19:14:10 +0000 (15:14 -0400)
commit7056ec6bfd99e204ebf12dc20fe4c78ad623b581
tree9077d0dad4f33c58b25efe49fc646e322b3a0863
parentc9ad57ff2c1c00e6f4eadcea5e0be87de9733347
runtime: fix floating point exception on Plan 9

Change 5660047 moved an FLDCW instruction
that disables invalid operand traps into
runtime·asminit, which is called from
runtime·mstart. Thus, runtime·check is being
called prior to setting the appropriate control bits,
which on any QNaN comparison will cause Plan 9
to take an invalid operand trap. This change loads
the control bits (for Plan 9) prior to runtime·check.
Ideally, this should be done before the QNaN checks
on any system, but possibly other kernels simply
don't ever trap on invalid operands.

R=golang-dev, rminnich
CC=golang-dev, john, rsc
https://golang.org/cl/5939045
src/pkg/runtime/rt0_plan9_386.s