Skip to content

Commit

Permalink
mips: use preferred asm mnemomic jr for better assembler compatibility
Browse files Browse the repository at this point in the history
The LLVM assembler reportedly assembles the form using the j mnemonic
incorrectly (see issue 107460). The jr form is canonical and avoids
this problem, so use it instead.
  • Loading branch information
alexrp authored and richfelker committed Oct 22, 2024
1 parent 4e6c827 commit bc5f816
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crt/mips/crtn.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
.section .init
lw $gp,24($sp)
lw $ra,28($sp)
j $ra
jr $ra
addu $sp,$sp,32

.section .fini
lw $gp,24($sp)
lw $ra,28($sp)
j $ra
jr $ra
addu $sp,$sp,32
4 changes: 2 additions & 2 deletions crt/mips64/crtn.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
.section .init
ld $gp,16($sp)
ld $ra,24($sp)
j $ra
jr $ra
daddu $sp,$sp,32

.section .fini
ld $gp,16($sp)
ld $ra,24($sp)
j $ra
jr $ra
daddu $sp,$sp,32
4 changes: 2 additions & 2 deletions crt/mipsn32/crtn.s
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
.section .init
ld $gp, 16($sp)
ld $ra, 24($sp)
j $ra
jr $ra
addu $sp, $sp, 32

.section .fini
ld $gp, 16($sp)
ld $ra, 24($sp)
j $ra
jr $ra
addu $sp, $sp, 32

0 comments on commit bc5f816

Please sign in to comment.