Use $t9 for indirect calls from asm to C as PIC ABI requires.
This commit is contained in:
parent
0d8f04cd83
commit
6f4a19f59f
3 changed files with 11 additions and 7 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2013-11-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Use $t9 for indirect calls from asm to C as PIC ABI requires.
|
||||||
|
|
||||||
2013-11-22 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-11-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Remove -march=mips3 from TARGET_CCASFLAGS as it creates linking problem
|
Remove -march=mips3 from TARGET_CCASFLAGS as it creates linking problem
|
||||||
|
|
|
@ -265,16 +265,16 @@ cmdlinedone:
|
||||||
*/
|
*/
|
||||||
move $s6, $a3
|
move $s6, $a3
|
||||||
|
|
||||||
lui $t0, %hi(EXT_C(grub_decompress_core))
|
lui $t9, %hi(EXT_C(grub_decompress_core))
|
||||||
addiu $t0, $t0, %lo(EXT_C(grub_decompress_core))
|
addiu $t9, $t9, %lo(EXT_C(grub_decompress_core))
|
||||||
|
|
||||||
#ifdef GRUB_MACHINE_ARC
|
#ifdef GRUB_MACHINE_ARC
|
||||||
lui $sp, %hi(_start - 512)
|
lui $sp, %hi(_start - 512)
|
||||||
jalr $t0
|
jalr $t9
|
||||||
addiu $sp, $sp, %lo(_start - 512)
|
addiu $sp, $sp, %lo(_start - 512)
|
||||||
#else
|
#else
|
||||||
lui $sp, %hi(_start - 256)
|
lui $sp, %hi(_start - 256)
|
||||||
jalr $t0
|
jalr $t9
|
||||||
addiu $sp, $sp, %lo(_start - 256)
|
addiu $sp, $sp, %lo(_start - 256)
|
||||||
#endif
|
#endif
|
||||||
move $a0, $s1
|
move $a0, $s1
|
||||||
|
|
|
@ -116,10 +116,10 @@ bsscont:
|
||||||
bne $t3, $0, bsscont
|
bne $t3, $0, bsscont
|
||||||
nop
|
nop
|
||||||
|
|
||||||
lui $t1, %hi(grub_main)
|
lui $t9, %hi(grub_main)
|
||||||
addiu $t1, %lo(grub_main)
|
addiu $t9, %lo(grub_main)
|
||||||
|
|
||||||
lui $sp, %hi(GRUB_MACHINE_MEMORY_STACK_HIGH)
|
lui $sp, %hi(GRUB_MACHINE_MEMORY_STACK_HIGH)
|
||||||
jr $t1
|
jr $t9
|
||||||
addiu $sp, $sp, %lo(GRUB_MACHINE_MEMORY_STACK_HIGH)
|
addiu $sp, $sp, %lo(GRUB_MACHINE_MEMORY_STACK_HIGH)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue