Simplify.

git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Alain Frisch 2014-09-22 11:37:53 +00:00
parent 78445243b6
commit 84e9598fc3
3 changed files with 3 additions and 6 deletions

View File

@ -138,7 +138,7 @@ let load_symbol_addr s arg =
else if !pic_code then
I.leaq (from_rip NO (emit_symbol s), arg)
else
I.movq (imm64 (emit_symbol s), arg)
I.movq (sym (emit_symbol s), arg)
(* Output a label *)

View File

@ -107,7 +107,7 @@ let emit_symbol s =
let abs s = (emit_symbol s, None)
let immsym s = imm32 (emit_symbol s)
let immsym s = sym (emit_symbol s)
let emit_call s =
I.call (rel32 (emit_symbol s))

View File

@ -58,6 +58,7 @@ end
module DSL = struct
let rel32 s = Rel32 s
let sym s = Sym s
(* Override emitaux.ml *)
let emit_int n =
@ -253,8 +254,6 @@ module DSL32 = struct
let st0 = Regf (ST 0)
let st1 = Regf (ST 1)
let imm32 l = Sym l
let mem_ptr typ ?(scale = 1) ?base ?sym offset idx =
assert(scale > 0);
Mem32 {typ; idx; scale; base; displ=(sym, Int64.of_int offset)}
@ -346,8 +345,6 @@ module DSL64 = struct
let rbp = Reg64 RBP
let xmm15 = Regf (XMM 15)
let imm64 s = Sym s
let mem_ptr typ ?(scale = 1) ?base offset idx =
assert(scale > 0);
Mem64 {typ; idx; scale; base; displ=(None, Int64.of_int offset)}