summaryrefslogtreecommitdiff
path: root/asmcomp/emit_alpha.mlp
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1995-07-28 12:19:50 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1995-07-28 12:19:50 +0000
commitea3c75ad03542f0767952b102978268af0d8a07c (patch)
treed1741a7d33d3961006f9ff5316084592b241c980 /asmcomp/emit_alpha.mlp
parent9f6a960dd5940857003d18a6948adbe3a606c23a (diff)
downloadocaml-ea3c75ad03542f0767952b102978268af0d8a07c.tar.gz
cmmgen: rectification acces generique aux tableaux de flottants.
emit_alpha: modifs mineures sur $gp. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@162 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/emit_alpha.mlp')
-rw-r--r--asmcomp/emit_alpha.mlp8
1 files changed, 5 insertions, 3 deletions
diff --git a/asmcomp/emit_alpha.mlp b/asmcomp/emit_alpha.mlp
index 9022e771f4..2268686a3d 100644
--- a/asmcomp/emit_alpha.mlp
+++ b/asmcomp/emit_alpha.mlp
@@ -231,6 +231,7 @@ let name_for_float_operation = function
| Isubf -> "subt"
| Imulf -> "mult"
| Idivf -> "divt"
+ | _ -> Misc.fatal_error "Emit.name_for_float_operation"
let name_for_specific_operation = function
Iadd4 -> "s4addq"
@@ -345,7 +346,8 @@ let emit_instr i =
(* caml_c_call preserves $gp *)
end else begin
` jsr {emit_symbol s}\n`;
- ` ldgp $gp, 0($26)\n`
+ if !uses_gp then
+ ` ldgp $gp, 0($26)\n`
end
| Lop(Istackoffset n) ->
` lda $sp, {emit_int (-n)}($sp)\n`;
@@ -584,14 +586,14 @@ let fundecl fundecl =
let n = frame_size() in
if n > 0 then
` lda $sp, -{emit_int n}($sp)\n`;
- if !contains_calls then
- ` stq $26, {emit_int(n - 8)}($sp)\n`;
if !uses_gp then begin
` stq $gp, {emit_int(n - 16)}($sp)\n`;
let lbl = new_label() in
` br $27, {emit_label lbl}\n`;
`{emit_label lbl}: ldgp $gp, 0($27)\n`
end;
+ if !contains_calls then
+ ` stq $26, {emit_int(n - 8)}($sp)\n`;
`{emit_label !tailrec_entry_point}:`;
emit_all fundecl.fun_body;
List.iter emit_call_gc !call_gc_sites;