diff options
| author | Jyun-Yan You <jyyou@cs.nctu.edu.tw> | 2014-03-13 14:35:24 +0800 |
|---|---|---|
| committer | Jyun-Yan You <jyyou@cs.nctu.edu.tw> | 2014-03-14 11:13:36 +0800 |
| commit | 6d7e86d099cf33821398731f750b36df564ca5d2 (patch) | |
| tree | 4cf087332b5466b6fcc10edf8027cf04add6c166 /src/rt/arch | |
| parent | b4d324334cb48198c27d782002d75eba14a6abde (diff) | |
fix MIPS target
I ignored AtomicU64 methods on MIPS target because libgcc doesn't implement MIPS32 64-bit atomic operations. Otherwise it would cause link failure.
Diffstat (limited to 'src/rt/arch')
| -rw-r--r-- | src/rt/arch/mips/morestack.S | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/src/rt/arch/mips/morestack.S b/src/rt/arch/mips/morestack.S index 9cb6ece80ce..266933df8c5 100644 --- a/src/rt/arch/mips/morestack.S +++ b/src/rt/arch/mips/morestack.S @@ -19,38 +19,21 @@ __morestack: .set noreorder .set nomacro - // n.b. most of this is probably unnecessary. I know very little mips - // assembly, and I didn't have anything to test on, so I wasn't - // brave enough to try to trim this down. + addiu $29, $29, -4 + sw $30, 0($29) - addiu $29, $29, -12 - sw $31, 8($29) - sw $30, 4($29) - sw $23, 0($29) - - // 24 = 12 (current) + 12 (previous) - .cfi_def_cfa_offset 24 + // 16 = 4 (current) + 12 (previous) + .cfi_def_cfa_offset 16 .cfi_offset 31, -4 - .cfi_offset 30, -20 - .cfi_offset 23, -24 + .cfi_offset 30, -16 - move $23, $28 move $30, $29 .cfi_def_cfa_register 30 - // Save argument registers of the original function - addiu $29, $29, -32 - sw $4, 16($29) - sw $5, 20($29) - sw $6, 24($29) - sw $7, 28($29) - - move $4, $14 // Size of stack arguments - addu $5, $30, 24 // Address of stack arguments - move $6, $15 // The amount of stack needed + // O32 ABI always reserves 16 bytes for arguments + addiu $29, $29, -16 - move $28, $23 - lw $25, %call16(rust_stack_exhausted)($23) + lw $25, %call16(rust_stack_exhausted)($28) jalr $25 nop |
