diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp index 715992b0e..d5a216649 100644 --- a/asmcomp/amd64/emit.mlp +++ b/asmcomp/amd64/emit.mlp @@ -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 *) diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp index d62aca52e..a394c105a 100644 --- a/asmcomp/i386/emit.mlp +++ b/asmcomp/i386/emit.mlp @@ -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)) diff --git a/asmcomp/intel_dsl.ml b/asmcomp/intel_dsl.ml index 36f820ff5..883b58cb1 100644 --- a/asmcomp/intel_dsl.ml +++ b/asmcomp/intel_dsl.ml @@ -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)}