shithub: riscv

Download patch

ref: 2c1415277fb694e560bc4667ddfa4efcf9d5196a
parent: 108063bc3a1cba6a70d848a1c12cdd089e9ae4f3
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Mar 17 14:25:12 EDT 2018

pc64: fix _intrr(), avoid the linker moving _intrr() arround

--- a/sys/src/9/pc64/l.s
+++ b/sys/src/9/pc64/l.s
@@ -902,10 +902,6 @@
 
 	BYTE $0x48; SYSRET			/* SYSRETQ */
 
-TEXT noteret(SB), 1, $-4
-	CLI
-	JMP _intrestore
-
 /*
  * Interrupt/exception handling.
  */
@@ -951,8 +947,8 @@
 	PUSHQ	SP
 	CALL	trap(SB)
 
-_intrestore:
 TEXT _intrr(SB), 1, $-4
+_intrestore:
 	POPQ	AX
 
 	POPQ	AX
@@ -980,6 +976,10 @@
 _iretnested:
 	ADDQ	$40, SP
 	IRETQ
+
+TEXT noteret(SB), 1, $-4
+	CLI
+	JMP	_intrestore
 
 TEXT vectortable(SB), $0
 	CALL _strayintr(SB); BYTE $0x00		/* divide error */