diff --git a/lib/mips/relocator.c b/lib/mips/relocator.c index b0fb4b2a5..4a67418c4 100644 --- a/lib/mips/relocator.c +++ b/lib/mips/relocator.c @@ -71,9 +71,9 @@ write_call_relocator_bw (void *ptr0, void *src, grub_uint32_t dest, { void *ptr = ptr0; int i; - write_reg (2, (grub_uint32_t) src, &ptr); - write_reg (3, dest, &ptr); - write_reg (4, size, &ptr); + write_reg (8, (grub_uint32_t) src, &ptr); + write_reg (9, dest, &ptr); + write_reg (10, size, &ptr); grub_memcpy (ptr, &grub_relocator32_backward_start, RELOCATOR_SRC_SIZEOF (backward)); ptr = (grub_uint8_t *) ptr + RELOCATOR_SRC_SIZEOF (backward); @@ -89,9 +89,9 @@ write_call_relocator_fw (void *ptr0, void *src, grub_uint32_t dest, { void *ptr = ptr0; int i; - write_reg (2, (grub_uint32_t) src, &ptr); - write_reg (3, dest, &ptr); - write_reg (4, size, &ptr); + write_reg (8, (grub_uint32_t) src, &ptr); + write_reg (9, dest, &ptr); + write_reg (10, size, &ptr); grub_memcpy (ptr, &grub_relocator32_forward_start, RELOCATOR_SRC_SIZEOF (forward)); ptr = (grub_uint8_t *) ptr + RELOCATOR_SRC_SIZEOF (forward); diff --git a/lib/mips/relocator_asm.S b/lib/mips/relocator_asm.S index 5503b4032..6f6108edc 100644 --- a/lib/mips/relocator_asm.S +++ b/lib/mips/relocator_asm.S @@ -28,32 +28,32 @@ VARIABLE (grub_relocator32_forward_start) copycont1: - lb $5,0($2) - sb $5,0($3) - addiu $2, $2, 0x1 - addiu $3, $3, 0x1 - addiu $4, $4, 0xffff - subu $5,$4,$0 - bne $5, $0, copycont1 + lb $11,0($8) + sb $11,0($9) + addiu $8, $8, 0x1 + addiu $9, $9, 0x1 + addiu $10, $10, 0xffff + subu $11,$10,$0 + bne $11, $0, copycont1 #if __mips >= 2 sync #endif VARIABLE (grub_relocator32_forward_end) VARIABLE (grub_relocator32_backward_start) - addu $3, $3, $4 - addu $2, $2, $4 + addu $9, $9, $10 + addu $8, $8, $10 /* Backward movsl is implicitly off-by-one. compensate that. */ - addiu $3, $3, 0xffff - addiu $2, $2, 0xffff + addiu $9, $9, 0xffff + addiu $8, $8, 0xffff copycont2: - lb $5,0($2) - sb $5,0($3) - addiu $2, $2, 0xffff - addiu $3, $3, 0xffff - addiu $4, 0xffff - subu $5,$4,$0 - bne $5, $0, copycont2 + lb $11,0($8) + sb $11,0($9) + addiu $8, $8, 0xffff + addiu $9, $9, 0xffff + addiu $10, 0xffff + subu $11,$10,$0 + bne $11, $0, copycont2 #if __mips >= 2 sync #endif