diff options
-rw-r--r-- | asmcomp/emit_mips.mlp | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/asmcomp/emit_mips.mlp b/asmcomp/emit_mips.mlp index a7ba2563a..18357f4fa 100644 --- a/asmcomp/emit_mips.mlp +++ b/asmcomp/emit_mips.mlp @@ -156,27 +156,6 @@ let emit_frame fd = fd.fd_live_offset; ` .align 2\n` -(* Output an absolute jump to a symbol. - Some OSes that produce position-independent code don't like "j symb". *) - -let supports_absolute_jumps = - match Config.system with - "irix" -> false - | _ -> true - -let emit_jump_symbol symb = - if supports_absolute_jumps then - ` j {emit_symbol symb}\n` - else begin - ` .set noreorder\n`; - ` .set noat\n`; - ` move $at, $31\n`; - ` jal {emit_symbol symb}\n`; - ` move $31, $at\n`; - ` .set reorder\n`; - ` .set at\n` - end - (* Names of various instructions *) let name_for_comparison = function @@ -279,7 +258,7 @@ let emit_instr i = if n > 0 then ` addu $sp, $sp, {emit_int n}\n`; liveregs i 0; - emit_jump_symbol s + ` j {emit_symbol s}\n` end | Lop(Iextcall(s, alloc)) -> if alloc then begin @@ -481,10 +460,8 @@ let fundecl fundecl = ` sw $31, {emit_int(n - 4)}($sp)\n`; `{emit_label !tailrec_entry_point}:\n`; emit_all fundecl.fun_body; - if !call_gc_label > 0 then begin - `{emit_label !call_gc_label}: `; - emit_jump_symbol "caml_call_gc" - end; + if !call_gc_label > 0 then + `{emit_label !call_gc_label}: j caml_call_gc\n`; if !range_check_trap > 0 then `{emit_label !range_check_trap}: break BRK_RANGE\n`; ` .end {emit_symbol fundecl.fun_name}\n` |