Simplify.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
78445243b6
commit
84e9598fc3
|
@ -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 *)
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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)}
|
||||
|
|
Loading…
Reference in New Issue