diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1998-08-14 16:04:15 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1998-08-14 16:04:15 +0000 |
commit | fefba26fcfdd10c3d9c5984d0a556fe4b1589090 (patch) | |
tree | aba3c5b0a0460a7e3a6178ef83847a2ab4e752b6 /asmcomp/alpha | |
parent | 059e11a9e317967c1174b343d9c81ed8d31ca1e6 (diff) |
Gerer le correctement sous Linux aussi, car ld 2.8.1 traite les multiples correctement
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2053 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/alpha')
-rw-r--r-- | asmcomp/alpha/emit.mlp | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/asmcomp/alpha/emit.mlp b/asmcomp/alpha/emit.mlp index fcd153698..e87630a8a 100644 --- a/asmcomp/alpha/emit.mlp +++ b/asmcomp/alpha/emit.mlp @@ -27,12 +27,6 @@ open Emitaux (* First pass: insert Iloadgp instructions where needed *) -let multiple_gp = - match Config.system with - "digital" -> true - | "linux" -> false - | _ -> assert false - let insert_load_gp f = let labels_needing_gp = ref LabelSet.empty in @@ -405,16 +399,12 @@ let emit_instr i = ` lda {emit_reg i.res.(0)}, {emit_symbol s}\n` | Lop(Icall_ind) -> liveregs i 0; - if multiple_gp then - ` mov {emit_reg i.arg.(0)}, $27\n`; + ` mov {emit_reg i.arg.(0)}, $27\n`; ` jsr ({emit_reg i.arg.(0)})\n`; `{record_frame i.live}\n` | Lop(Icall_imm s) -> liveregs i 0; - if multiple_gp then - ` jsr {emit_symbol s}\n` - else - ` bsr $26, {emit_symbol s}\n`; + ` jsr {emit_symbol s}\n`; `{record_frame i.live}\n` | Lop(Itailcall_ind) -> let n = frame_size() in @@ -422,8 +412,7 @@ let emit_instr i = ` ldq $26, {emit_int(n - 8)}($sp)\n`; if n > 0 then ` lda $sp, {emit_int n}($sp)\n`; - if multiple_gp then - ` mov {emit_reg i.arg.(0)}, $27\n`; + ` mov {emit_reg i.arg.(0)}, $27\n`; liveregs i (live_26 + live_27); ` jmp ({emit_reg i.arg.(0)})\n` | Lop(Itailcall_imm s) -> @@ -435,8 +424,7 @@ let emit_instr i = ` ldq $26, {emit_int(n - 8)}($sp)\n`; if n > 0 then ` lda $sp, {emit_int n}($sp)\n`; - if multiple_gp then - ` lda $27, {emit_symbol s}\n`; + ` lda $27, {emit_symbol s}\n`; liveregs i (live_26 + live_27); ` br {emit_symbol s}\n` end @@ -447,9 +435,7 @@ let emit_instr i = ` bsr $26, caml_c_call\n`; `{record_frame i.live}\n` end else begin - ` jsr {emit_symbol s}\n`; - if not multiple_gp then - ` ldgp $gp, 0($26)\n` + ` jsr {emit_symbol s}\n` end | Lop(Istackoffset n) -> ` lda $sp, {emit_int (-n)}($sp)\n`; @@ -743,7 +729,7 @@ let emit_fundecl (fundecl, needs_gp) = end let fundecl f = - emit_fundecl (if multiple_gp then insert_load_gp f else (f, false)) + emit_fundecl (insert_load_gp f) (* Emission of data *) |