diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2000-02-07 10:23:22 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2000-02-07 10:23:22 +0000 |
commit | 600656aa484a09471d42d4dc0dfc42a155eb58bb (patch) | |
tree | b3f29cdf9b2ecc997ecab40fb8ab41d96fab034d | |
parent | 1442bc4dd8865d43110fcb99ef52e8fd7c1cd098 (diff) |
Ajout load/store int32 et float32
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2792 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | asmcomp/power/emit.mlp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp index 446ae079b..1ae23cbff 100644 --- a/asmcomp/power/emit.mlp +++ b/asmcomp/power/emit.mlp @@ -525,20 +525,24 @@ let rec emit_instr i dslot = | Lop(Iload(chunk, addr)) -> let loadinstr = match chunk with - Word -> if i.res.(0).typ = Float then "lfd" else "lwz" - | Byte_unsigned -> "lbz" + Byte_unsigned -> "lbz" | Byte_signed -> "lbz" | Sixteen_unsigned -> "lhz" - | Sixteen_signed -> "lha" in + | Sixteen_signed -> "lha" + | Single -> "lfs" + | Double -> "lfd" + | _ -> "lwz" in emit_load_store loadinstr addr i.arg 0 i.res.(0); if chunk = Byte_signed then ` extsb {emit_reg i.res.(0)}, {emit_reg i.res.(0)}\n` | Lop(Istore(chunk, addr)) -> let storeinstr = match chunk with - Word -> if i.arg.(0).typ = Float then "stfd" else "stw" - | Byte_unsigned | Byte_signed -> "stb" - | Sixteen_unsigned | Sixteen_signed -> "sth" in + Byte_unsigned | Byte_signed -> "stb" + | Sixteen_unsigned | Sixteen_signed -> "sth" + | Single -> "stfs" + | Double -> "stfd" + | _ -> "stw" in emit_load_store storeinstr addr i.arg 1 i.arg.(0) | Lop(Ialloc n) -> if !call_gc_label = 0 then call_gc_label := new_label(); @@ -867,9 +871,13 @@ let emit_item = function ` .byte {emit_int n}\n` | Cint16 n -> ` .short {emit_int n}\n` + | Cint32 n -> + ` .long {emit_nativeint n}\n` | Cint n -> ` .long {emit_nativeint n}\n` - | Cfloat f -> + | Csingle f -> + ` .float 0d{emit_string f}\n` + | Cdouble f -> ` .double 0d{emit_string f}\n` | Csymbol_address s -> ` .long {emit_symbol s}\n` |