diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2000-02-11 15:09:27 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2000-02-11 15:09:27 +0000 |
commit | 1cac40336824df625d468405459febc63effd292 (patch) | |
tree | bf11fef34243ee8834bed8cb7354c0f6eba17ed2 /asmcomp/arm | |
parent | 65b246b9d15b739409e027127952f63f14cd0c57 (diff) | |
download | ocaml-1cac40336824df625d468405459febc63effd292.tar.gz |
Ajout des modules Int32, Int64 et Nativeint
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2807 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/arm')
-rw-r--r-- | asmcomp/arm/emit.mlp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp index c007c5fc1f..4e663e466d 100644 --- a/asmcomp/arm/emit.mlp +++ b/asmcomp/arm/emit.mlp @@ -176,8 +176,8 @@ let name_for_float_operation = function let rec is_immed n shift = shift <= 24 && - (Nativeint.logand n (Nativeint.shift (Nativeint.from 0xFF) shift) = n || - is_immed n (shift + 2)) + (Nativeint.logand n (Nativeint.shift_left (Nativeint.of_int 0xFF) shift) = n + || is_immed n (shift + 2)) let is_immediate n = is_immed n 0 @@ -188,11 +188,11 @@ let emit_complex_intconst r n = let shift = ref 0 in let first = ref true in let ninstr = ref 0 in - while Nativeint.sign !i <> 0 do - if Nativeint.to_int (Nativeint.shift !i (- !shift)) land 3 = 0 then + while !i <> Nativeint.zero do + if Nativeint.to_int (Nativeint.shift_left !i (- !shift)) land 3 = 0 then shift := !shift + 2 else begin - let mask = Nativeint.shift (Nativeint.from 0xFF) !shift in + let mask = Nativeint.shift_left (Nativeint.of_int 0xFF) !shift in let bits = Nativeint.logand !i mask in if !first then ` mov {emit_reg r}, #{emit_nativeint bits} @ {emit_nativeint n}\n` @@ -273,7 +273,7 @@ let emit_instr i = end | Lop(Iconst_int n) -> let r = i.res.(0) in - let nr = Nativeint.logxor n (Nativeint.from(-1)) in + let nr = Nativeint.lognot n in if is_immediate n then begin ` mov {emit_reg r}, #{emit_nativeint n}\n`; 1 end else if is_immediate nr then begin @@ -359,7 +359,7 @@ let emit_instr i = ` {emit_string instr} {emit_reg r}, {emit_addressing addr i.arg 1}\n`; 1 | Lop(Ialloc n) -> - let nn = Nativeint.from n in + let nn = Nativeint.of_int n in if !fastcode_flag then begin if is_immediate nn then begin ` ldr r10, [alloc_limit, #0]\n`; |