shithub: riscv

Download patch

ref: 1a73b594e684623c9ea1b72141f4e70ee913740b
parent: 72aa2827920722b1c9b45a1376ae19beeee22ef8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jan 20 12:15:26 EST 2024

pc: use JMPF instead of indirect jump for going to syscall()

--- a/sys/src/9/pc/l.s
+++ b/sys/src/9/pc/l.s
@@ -1071,11 +1071,9 @@
 	MOVW	AX, DS
 	MOVW	AX, ES
 
-	MOVL	$syscall(SB), AX
-
 	PUSHL	SP			/* Ureg* argument to syscall */
 	PUSHL	$forkret(SB)		/* return pc */
-	JMP	*AX
+	JMPF	syscall(SB)
 
 TEXT vectortable(SB), $0
 	CALL _strayintr(SB); BYTE $0x00		/* divide error */