shithub: riscv

Download patch

ref: d3e54ff2d9039c67f6fe7d99349e1c83b696b7ae
parent: 743f65c87892adb12a7df0f91ac080e81cd77b21
author: cinap_lenrek <[email protected]>
date: Wed Jan 3 23:38:31 EST 2018

pc kernel: fix wrong simd exception mask (fixes go bootstrap)

--- a/sys/src/9/pc/main.c
+++ b/sys/src/9/pc/main.c
@@ -527,7 +527,7 @@
 	case FPinit:
 		fpinit();
 		if(fpsave == fpssesave)
-			ldmxcsr(0);	/* no simd exceptions on 386 */
+			ldmxcsr(0x1f80);	/* no simd exceptions on 386 */
 		while(up->fpsave == nil)
 			up->fpsave = mallocalign(sizeof(FPsave), FPalign, 0, 0);
 		up->fpstate = FPactive;