Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: pnacl/support/setjmp_mips32.S

Issue 2521263002: [MIPS] Remove explicit masks from assembly code (Closed)
Patch Set: Changes per Mark's comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/infoleak/test_infoleak_mips.S » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pnacl/support/setjmp_mips32.S
diff --git a/pnacl/support/setjmp_mips32.S b/pnacl/support/setjmp_mips32.S
index 3a906f47343a3fb4b115aefc7d818c9c30a1ceca..fd601b14821f690d467a943a1e35ffb82bf5aa13 100644
--- a/pnacl/support/setjmp_mips32.S
+++ b/pnacl/support/setjmp_mips32.S
@@ -17,74 +17,34 @@
/* int setjmp(jmp_buf env) */
setjmp:
- /* The code here is grouped by instruction bundle. */
-
/* NACL_CALLEE_SAVE_LIST BEGIN */
- and $a0, $a0, STORE_MASK
- sw $s0, 0($a0)
- and $a0, $a0, STORE_MASK
- sw $s1, 4($a0)
-
- and $a0, $a0, STORE_MASK
- sw $s2, 8($a0)
- and $a0, $a0, STORE_MASK
- sw $s3, 12($a0)
-
- and $a0, $a0, STORE_MASK
- sw $s4, 16($a0)
- and $a0, $a0, STORE_MASK
- sw $s5, 20($a0)
-
- and $a0, $a0, STORE_MASK
- sw $s6, 24($a0)
- and $a0, $a0, STORE_MASK
- sw $s7, 28($a0)
-
- and $a0, $a0, STORE_MASK
- sw $sp, 32($a0)
- and $a0, $a0, STORE_MASK
- sw $fp, 36($a0)
-
- and $a0, $a0, STORE_MASK
- sw $ra, 40($a0)
- and $a0, $a0, STORE_MASK
+ sw $s0, 0($a0)
+ sw $s1, 4($a0)
+ sw $s2, 8($a0)
+ sw $s3, 12($a0)
+ sw $s4, 16($a0)
+ sw $s5, 20($a0)
+ sw $s6, 24($a0)
+ sw $s7, 28($a0)
+ sw $sp, 32($a0)
+ sw $fp, 36($a0)
+ sw $ra, 40($a0)
swc1 $f20, 44($a0)
-
- and $a0, $a0, STORE_MASK
swc1 $f21, 48($a0)
- and $a0, $a0, STORE_MASK
swc1 $f22, 52($a0)
-
- and $a0, $a0, STORE_MASK
swc1 $f23, 56($a0)
- and $a0, $a0, STORE_MASK
swc1 $f24, 60($a0)
-
- and $a0, $a0, STORE_MASK
swc1 $f25, 64($a0)
- and $a0, $a0, STORE_MASK
swc1 $f26, 68($a0)
-
- and $a0, $a0, STORE_MASK
swc1 $f27, 72($a0)
- and $a0, $a0, STORE_MASK
swc1 $f28, 76($a0)
-
- and $a0, $a0, STORE_MASK
swc1 $f29, 80($a0)
- and $a0, $a0, STORE_MASK
swc1 $f30, 84($a0)
-
- and $a0, $a0, STORE_MASK
swc1 $f31, 88($a0)
/* NACL_CALLEE_SAVE_LIST END */
- move $v0, $zero
- nop
-
- and $ra, $ra, JUMP_MASK
+ move $v0, $zero
j $ra
- nop
- nop
+ nop /* delay slot */
.end setjmp
@@ -99,77 +59,38 @@ setjmp:
longjmp:
/* NACL_CALLEE_LOAD_LIST BEGIN */
- and $a0, $a0, STORE_MASK
- lw $s0, 0($a0)
- and $a0, $a0, STORE_MASK
- lw $s1, 4($a0)
-
- and $a0, $a0, STORE_MASK
- lw $s2, 8($a0)
- and $a0, $a0, STORE_MASK
- lw $s3, 12($a0)
-
- and $a0, $a0, STORE_MASK
- lw $s4, 16($a0)
- and $a0, $a0, STORE_MASK
- lw $s5, 20($a0)
-
- and $a0, $a0, STORE_MASK
- lw $s6, 24($a0)
- and $a0, $a0, STORE_MASK
- lw $s7, 28($a0)
-
- and $a0, $a0, STORE_MASK
- lw $sp, 32($a0)
- and $sp, $sp, STORE_MASK
- nop
-
- and $a0, $a0, STORE_MASK
- lw $fp, 36($a0)
- and $a0, $a0, STORE_MASK
- lw $ra, 40($a0)
-
- and $a0, $a0, STORE_MASK
+ lw $s0, 0($a0)
+ lw $s1, 4($a0)
+ lw $s2, 8($a0)
+ lw $s3, 12($a0)
+ lw $s4, 16($a0)
+ lw $s5, 20($a0)
+ lw $s6, 24($a0)
+ lw $s7, 28($a0)
+ lw $sp, 32($a0)
+ lw $fp, 36($a0)
+ lw $ra, 40($a0)
lwc1 $f20, 44($a0)
- and $a0, $a0, STORE_MASK
lwc1 $f21, 48($a0)
-
- and $a0, $a0, STORE_MASK
lwc1 $f22, 52($a0)
- and $a0, $a0, STORE_MASK
lwc1 $f23, 56($a0)
-
- and $a0, $a0, STORE_MASK
lwc1 $f24, 60($a0)
- and $a0, $a0, STORE_MASK
lwc1 $f25, 64($a0)
-
- and $a0, $a0, STORE_MASK
lwc1 $f26, 68($a0)
- and $a0, $a0, STORE_MASK
lwc1 $f27, 72($a0)
-
- and $a0, $a0, STORE_MASK
lwc1 $f28, 76($a0)
- and $a0, $a0, STORE_MASK
lwc1 $f29, 80($a0)
-
- and $a0, $a0, STORE_MASK
lwc1 $f30, 84($a0)
- and $a0, $a0, STORE_MASK
lwc1 $f31, 88($a0)
/* NACL_CALLEE_LOAD_LIST END */
bne $a1, $zero, 1f
- nop
+ nop /* delay slot */
ori $a1, $zero, 1
1:
move $v0, $a1
-
- and $ra, $ra, JUMP_MASK
j $ra
- nop
- nop
+ nop /* delay slot */
.end longjmp
« no previous file with comments | « no previous file | tests/infoleak/test_infoleak_mips.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698