summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1998-06-22 12:40:04 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1998-06-22 12:40:04 +0000
commita859063f3b28b02bb13a9dfbe39042c5c27cd20e (patch)
treec2f56111eda9fabd349f9428010dcc6a2fa83c3e
parentbae3ad8140b2618324b7ee0ecfc4456fa1dd7c2f (diff)
Utiliser movz[bw]l systematiquement, ne pas essayer de faire un load partiel dans un registre mis a zero. C'est moins bon pour le Pentium mais meilleur pour le Pentium Pro
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1987 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--asmcomp/i386/emit.mlp18
1 files changed, 0 insertions, 18 deletions
diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
index 3ea19c919..7a2c4fea2 100644
--- a/asmcomp/i386/emit.mlp
+++ b/asmcomp/i386/emit.mlp
@@ -116,18 +116,6 @@ let emit_reg16 r =
Reg r when r < 7 -> emit_string (reg_low_half_name.(r))
| _ -> fatal_error "Emit_i386.emit_reg16"
-(* Check if the given register overlaps (same location) with the given
- array of registers *)
-
-let register_overlap reg arr =
- try
- for i = 0 to Array.length arr - 1 do
- if reg.loc = arr.(i).loc then raise Exit
- done;
- false
- with Exit ->
- true
-
(* Output an addressing mode *)
let emit_addressing addr r n =
@@ -357,16 +345,10 @@ let emit_instr i =
begin match (chunk, dest.loc) with
(Word, _) ->
` movl {emit_addressing addr i.arg 0}, {emit_reg dest}\n`
- | (Byte_unsigned, Reg r) when r < 4 & not (register_overlap dest i.arg) ->
- ` xorl {emit_reg dest}, {emit_reg dest}\n`;
- ` movb {emit_addressing addr i.arg 0}, {emit_reg8 dest}\n`
| (Byte_unsigned, _) ->
` movzbl {emit_addressing addr i.arg 0}, {emit_reg dest}\n`
| (Byte_signed, _) ->
` movsbl {emit_addressing addr i.arg 0}, {emit_reg dest}\n`
- | (Sixteen_unsigned, Reg r) when not (register_overlap dest i.arg) ->
- ` xorl {emit_reg dest}, {emit_reg dest}\n`;
- ` movw {emit_addressing addr i.arg 0}, {emit_reg16 dest}\n`
| (Sixteen_unsigned, _) ->
` movzwl {emit_addressing addr i.arg 0}, {emit_reg dest}\n`
| (Sixteen_signed, _) ->