The compilers expect to not be interrupted by floating
point exceptions. On Plan 9, every process starts with
interrupts enabled for invalid operation, stack overflow,
and divide by zero exceptions.
LGTM=rsc
R=rsc, 0intro
CC=golang-codereviews
https://golang.org/cl/
72750043
{
USED(v);
- if(strncmp(s, "sys: fp: invalid operation", 26) == 0) {
- noted(NCONT);
- return;
- }
if(strncmp(s, "sys: trap: fault read", 21) == 0) {
if(nsavederrors + nerrors > 0)
errorexit();
#ifdef PLAN9
notify(catcher);
+ // Tell the FPU to handle all exceptions.
+ setfcr(FPPDBL|FPRNR);
#endif
// Allow GOARCH=thestring or GOARCH=thestringsuffix,
// but not other values.