Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 11 Sep 2019 13:05:04 +0300
From: <info@...ile-stream.com>
To: musl@...ts.openwall.com
Subject: [PATCH] mips: simplify longjmp

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(-)

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
-- 
2.23.0.windows.1


Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.