shithub: riscv

Download patch

ref: 3d73ccc000c6869a3956701e3540bef6a225e42e
parent: c45ffa6883b3a5a90ed712d60f3123f2fed07513
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jul 8 07:01:38 EDT 2023

pc64: avoid STI/CLI, touser() already called splhi()'d

--- a/sys/src/9/pc64/l.s
+++ b/sys/src/9/pc64/l.s
@@ -513,9 +513,8 @@
 
 	MOVQ	(SP), BX
 	MOVQ	BX, 8(RMACH) 			/* save PC in m->splpc */
-
-_alreadyhi:
 	CLI
+_alreadyhi:
 	RET
 
 TEXT spllo(SB), 1, $-4
@@ -526,9 +525,8 @@
 	JNZ	_alreadylo			/* use CMOVLEQ etc. here? */
 
 	MOVQ	$0, 8(RMACH)			/* clear m->splpc */
-
-_alreadylo:
 	STI
+_alreadylo:
 	RET
 
 TEXT splx(SB), 1, $-4
@@ -901,7 +899,6 @@
 /*
  */
 TEXT touser(SB), 1, $-4
-	CLI
 	SWAPGS
 
 	MOVL	$0, RMACH