mips: simplify longjmp

Submitted by info@mobile-stream.com on Sept. 11, 2019, 10:05 a.m.

Details

Message ID 20190911103224.1C6E65C44B@mx7.valuehost.ru
State New
Series "mips: simplify longjmp"
Headers show

Commit Message

info@mobile-stream.com Sept. 11, 2019, 10:05 a.m.
borrowed from the risc-v code.

OR (not ADDU) is intentional to please 74K* pipeline.
---
 src/setjmp/mips/longjmp.S | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/setjmp/mips/longjmp.S b/src/setjmp/mips/longjmp.S
index fdb6c95d..c3dd54ea 100644
--- a/src/setjmp/mips/longjmp.S
+++ b/src/setjmp/mips/longjmp.S
@@ -6,11 +6,6 @@ 
 .type   longjmp,@function
 _longjmp:
 longjmp:
-	move    $2, $5
-	bne     $2, $0, 1f
-	nop
-	addu    $2, $2, 1
-1:
 #ifndef __mips_soft_float
 	lwc1    $20, 56($4)
 	lwc1    $21, 60($4)
@@ -36,5 +31,7 @@  longjmp:
 	lw      $22, 32($4)
 	lw      $23, 36($4)
 	lw      $30, 40($4)
-	jr      $ra
 	lw      $28, 44($4)
+	sltiu	$2, $5, 1
+	jr      $ra
+	 or	$2, $5, $2
\ No newline at end of file