diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1995-08-30 15:36:59 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1995-08-30 15:36:59 +0000 |
commit | bf26cf76123d15051d6d35c20f920102df53d6c0 (patch) | |
tree | 9dff5d1e83cc24e29af247ab8f86729e7c9eb09f | |
parent | 14dad5b536dc150470ddc8a9a7651cf35873da0f (diff) |
Backtrack sur les branchements absolus. Produire du code PIC pour IRIX
est plus complique que ca (passer l'adresse de la fonction appelee
dans $25?)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@237 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-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` |