summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1999-03-04 11:09:45 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1999-03-04 11:09:45 +0000
commit2de70e94276f3ef42a549fac002ce0e244cb7b39 (patch)
tree208b3d72b3a38bd2aa688888d8340eb36507302c
parent294aff94cf554aaddb18fa956e8460c52e871cc8 (diff)
Dans Ialloc, traiter le cas ou l'offset par-rapport a l'allocation groupee n'est pas un immediat
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2331 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--asmcomp/selectgen.ml9
1 files changed, 8 insertions, 1 deletions
diff --git a/asmcomp/selectgen.ml b/asmcomp/selectgen.ml
index 7c063087e..5da131c88 100644
--- a/asmcomp/selectgen.ml
+++ b/asmcomp/selectgen.ml
@@ -500,7 +500,14 @@ method emit_expr env exp =
alloc_state <- None;
rd
| Some(ralloc, ofs) ->
- ignore(self#insert_op (Iintop_imm(Iadd, ofs)) ralloc rd);
+ if self#is_immediate ofs then
+ ignore(self#insert_op (Iintop_imm(Iadd, ofs)) ralloc rd)
+ else begin
+ let r = Reg.createv typ_int in
+ ignore(self#insert_op (Iconst_int(Nativeint.from ofs)) [||] r);
+ ignore(self#insert_op (Iintop Iadd)
+ (Array.append ralloc r) rd)
+ end;
alloc_state <- Some(ralloc, ofs + size);
self#emit_stores env new_args ralloc
(Arch.offset_addressing header_addressing ofs);