diff options
| author | Anthony Martin <ality@pbrane.org> | 2014-03-12 19:41:36 -0700 |
|---|---|---|
| committer | Anthony Martin <ality@pbrane.org> | 2014-03-12 19:41:36 -0700 |
| commit | b53d2f5ba7a09b60a3f3dda71a47149f41482290 (patch) | |
| tree | 2048112547f23f86d8d218fd17fa074727305151 /src | |
| parent | 189397df5855a35cd23c76becf5cd16b10bb4dce (diff) | |
| download | go-b53d2f5ba7a09b60a3f3dda71a47149f41482290.tar.xz | |
cmd/gc: make the fpu handle all exceptions on Plan 9
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/gc/lex.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cmd/gc/lex.c b/src/cmd/gc/lex.c index aeeac68a15..bc44145c7b 100644 --- a/src/cmd/gc/lex.c +++ b/src/cmd/gc/lex.c @@ -172,10 +172,6 @@ catcher(void *v, char *s) { 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(); @@ -211,6 +207,8 @@ main(int argc, char *argv[]) #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. |
