diff options
| author | Alain Frisch <alain@frisch.fr> | 2014-11-27 17:20:22 +0000 |
|---|---|---|
| committer | Alain Frisch <alain@frisch.fr> | 2014-11-27 17:20:22 +0000 |
| commit | 22cb7ff170e5bfc843cd233d6f510ecd02bdaa12 (patch) | |
| tree | 5146cb746c3ee82031acf2f0ad9c1099fbc64184 | |
| parent | 9decba7731e8bb0578061ffa141522e83d25bc70 (diff) | |
| download | ocaml-22cb7ff170e5bfc843cd233d6f510ecd02bdaa12.tar.gz | |
Use curried style for X86_dsl. Will adapt 32-bit emit.mlp later.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15613 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
| -rw-r--r-- | asmcomp/amd64/emit.mlp | 170 | ||||
| -rw-r--r-- | asmcomp/x86_dsl.ml | 78 | ||||
| -rw-r--r-- | asmcomp/x86_dsl.mli | 78 |
3 files changed, 163 insertions, 163 deletions
diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp index d5f7602d2c..8f10ae91ff 100644 --- a/asmcomp/amd64/emit.mlp +++ b/asmcomp/amd64/emit.mlp @@ -119,11 +119,11 @@ let windows = let load_symbol_addr s arg = if !Clflags.dlcode && not windows then - I.mov (mem64_rip QWORD (emit_symbol s ^ "@GOTPCREL"), arg) + I.mov (mem64_rip QWORD (emit_symbol s ^ "@GOTPCREL")) arg else if !pic_code then - I.lea (mem64_rip NONE (emit_symbol s), arg) + I.lea (mem64_rip NONE (emit_symbol s)) arg else - I.mov (sym (emit_symbol s), arg) + I.mov (sym (emit_symbol s)) arg (* Output a label *) @@ -285,7 +285,7 @@ let emit_call_bound_errors () = let instr_for_intop = function | Iadd -> I.add | Isub -> I.sub - | Imul -> (fun (arg1, arg2) -> I.imul (arg1, Some arg2)) + | Imul -> (fun arg1 arg2 -> I.imul arg1 (Some arg2)) | Iand -> I.and_ | Ior -> I.or_ | Ixor -> I.xor @@ -319,8 +319,8 @@ let cond = function let output_test_zero arg = match arg.loc with - | Reg.Reg _ -> I.test (reg arg, reg arg) - | _ -> I.cmp (int 0, reg arg) + | Reg.Reg _ -> I.test (reg arg) (reg arg) + | _ -> I.cmp (int 0) (reg arg) (* Output a floating-point compare and branch *) @@ -337,28 +337,28 @@ let emit_float_test cmp neg i lbl = match (cmp, neg) with | (Ceq, false) | (Cne, true) -> let next = new_label() in - I.ucomisd (arg i 1 , arg i 0); + I.ucomisd (arg i 1) (arg i 0); I.jp (label next); (* skip if unordered *) I.je lbl; (* branch taken if x=y *) def_label next | (Cne, false) | (Ceq, true) -> - I.ucomisd (arg i 1, arg i 0); + I.ucomisd (arg i 1) (arg i 0); I.jp lbl; (* branch taken if unordered *) I.jne lbl (* branch taken if x<y or x>y *) | (Clt, _) -> - I.comisd (arg i 0, arg i 1); + I.comisd (arg i 0) (arg i 1); if not neg then I.ja lbl (* branch taken if y>x i.e. x<y *) else I.jbe lbl (* taken if unordered or y<=x i.e. !(x<y) *) | (Cle, _) -> - I.comisd (arg i 0, arg i 1);(* swap compare *) + I.comisd (arg i 0) (arg i 1);(* swap compare *) if not neg then I.jae lbl (* branch taken if y>=x i.e. x<=y *) else I.jb lbl (* taken if unordered or y<x i.e. !(x<=y) *) | (Cgt, _) -> - I.comisd (arg i 1, arg i 0); + I.comisd (arg i 1) (arg i 0); if not neg then I.ja lbl (* branch taken if x>y *) else I.jbe lbl (* taken if unordered or x<=y i.e. !(x>y) *) | (Cge, _) -> - I.comisd (arg i 1, arg i 0);(* swap compare *) + I.comisd (arg i 1) (arg i 0);(* swap compare *) if not neg then I.jae lbl (* branch taken if x>=y *) else I.jb lbl (* taken if unordered or x<y i.e. !(x>=y) *) @@ -367,7 +367,7 @@ let emit_float_test cmp neg i lbl = let output_epilogue f = if frame_required() then begin let n = frame_size() - 8 - (if fp then 8 else 0) in - I.add (int n, rsp); + I.add (int n) rsp; cfi_adjust_cfa_offset (-n); if fp then I.pop rbp; f (); @@ -418,25 +418,25 @@ let emit_instr fallthrough i = let src = i.arg.(0) and dst = i.res.(0) in if src.loc <> dst.loc then begin match src.typ, src.loc, dst.loc with - | Float, Reg.Reg _, Reg.Reg _ -> I.movapd (reg src, reg dst) - | Float, _, _ -> I.movsd (reg src, reg dst) - | _ -> I.mov (reg src, reg dst) + | Float, Reg.Reg _, Reg.Reg _ -> I.movapd (reg src) (reg dst) + | Float, _, _ -> I.movsd (reg src) (reg dst) + | _ -> I.mov (reg src) (reg dst) end | Lop(Iconst_int n | Iconst_blockheader n) -> if n = 0n then begin match i.res.(0).loc with - | Reg _ -> I.xor (res i 0, res i 0) - | _ -> I.mov (int 0, res i 0) + | Reg _ -> I.xor (res i 0) (res i 0) + | _ -> I.mov (int 0) (res i 0) end else - I.mov (nat n, res i 0) + I.mov (nat n) (res i 0) | Lop(Iconst_float f) -> begin match Int64.bits_of_float f with | 0x0000_0000_0000_0000L -> (* +0.0 *) - I.xorpd (res i 0, res i 0) + I.xorpd (res i 0) (res i 0) | _ -> let lbl = add_float_constant f in - I.movsd (mem64_rip NONE (emit_label lbl), res i 0) + I.movsd (mem64_rip NONE (emit_label lbl)) (res i 0) end | Lop(Iconst_symbol s) -> add_used_symbol s; @@ -476,68 +476,68 @@ let emit_instr fallthrough i = amd64nt.asm accordingly. *) load_symbol_addr "caml_young_ptr" r11; - I.mov (mem64 QWORD 0 R11, r15) + I.mov (mem64 QWORD 0 R11) r15 end; end else emit_call s | Lop(Istackoffset n) -> if n < 0 - then I.add (int (-n), rsp) - else I.sub (int n, rsp); + then I.add (int (-n)) rsp + else I.sub (int n) rsp; cfi_adjust_cfa_offset n; stack_offset := !stack_offset + n | Lop(Iload(chunk, addr)) -> let dest = res i 0 in begin match chunk with | Word -> - I.mov (addressing addr QWORD i 0, dest) + I.mov (addressing addr QWORD i 0) dest | Byte_unsigned -> - I.movzx (addressing addr BYTE i 0, dest) + I.movzx (addressing addr BYTE i 0) dest | Byte_signed -> - I.movsx (addressing addr BYTE i 0, dest) + I.movsx (addressing addr BYTE i 0) dest | Sixteen_unsigned -> - I.movzx (addressing addr WORD i 0, dest) + I.movzx (addressing addr WORD i 0) dest | Sixteen_signed -> - I.movsx (addressing addr WORD i 0, dest); + I.movsx (addressing addr WORD i 0) dest; | Thirtytwo_unsigned -> - I.mov (addressing addr DWORD i 0, res32 i 0) + I.mov (addressing addr DWORD i 0) (res32 i 0) | Thirtytwo_signed -> - I.movsxd (addressing addr DWORD i 0, dest) + I.movsxd (addressing addr DWORD i 0) dest | Single -> - I.cvtss2sd (addressing addr REAL4 i 0, dest) + I.cvtss2sd (addressing addr REAL4 i 0) dest | Double | Double_u -> - I.movsd (addressing addr REAL8 i 0, dest) + I.movsd (addressing addr REAL8 i 0) dest end | Lop(Istore(chunk, addr, _)) -> begin match chunk with | Word -> - I.mov (arg i 0, addressing addr QWORD i 1) + I.mov (arg i 0) (addressing addr QWORD i 1) | Byte_unsigned | Byte_signed -> - I.mov (arg8 i 0, addressing addr BYTE i 1) + I.mov (arg8 i 0) (addressing addr BYTE i 1) | Sixteen_unsigned | Sixteen_signed -> - I.mov (arg16 i 0, addressing addr WORD i 1) + I.mov (arg16 i 0) (addressing addr WORD i 1) | Thirtytwo_signed | Thirtytwo_unsigned -> - I.mov (arg32 i 0, addressing addr DWORD i 1) + I.mov (arg32 i 0) (addressing addr DWORD i 1) | Single -> - I.cvtsd2ss (arg i 0, xmm15); - I.movss (xmm15, addressing addr REAL4 i 1) + I.cvtsd2ss (arg i 0) xmm15; + I.movss xmm15 (addressing addr REAL4 i 1) | Double | Double_u -> - I.movsd (arg i 0, addressing addr REAL8 i 1) + I.movsd (arg i 0) (addressing addr REAL8 i 1) end | Lop(Ialloc n) -> if !fastcode_flag then begin let lbl_redo = new_label() in def_label lbl_redo; - I.sub (int n, r15); + I.sub (int n) r15; if !Clflags.dlcode && system <> S_win64 then begin load_symbol_addr "caml_young_limit" rax; - I.cmp (mem64 QWORD 0 RAX, r15); + I.cmp (mem64 QWORD 0 RAX) r15; end else - I.cmp (mem64_rip QWORD (emit_symbol "caml_young_limit"), r15); + I.cmp (mem64_rip QWORD (emit_symbol "caml_young_limit")) r15; let lbl_call_gc = new_label() in let lbl_frame = record_frame_label i.live Debuginfo.none in I.jb (label lbl_call_gc); - I.lea (mem64 NONE 8 R15, res i 0); + I.lea (mem64 NONE 8 R15) (res i 0); call_gc_sites := { gc_lbl = lbl_call_gc; gc_return_lbl = lbl_redo; @@ -548,84 +548,84 @@ let emit_instr fallthrough i = | 24 -> emit_call "caml_alloc2" | 32 -> emit_call "caml_alloc3" | _ -> - I.mov (int n, rax); + I.mov (int n) rax; emit_call "caml_allocN" end; record_frame i.live Debuginfo.none; - I.lea (mem64 NONE 8 R15, res i 0) + I.lea (mem64 NONE 8 R15) (res i 0) end | Lop(Iintop(Icomp cmp)) -> - I.cmp (arg i 1, arg i 0); + I.cmp (arg i 1) (arg i 0); I.set (cond cmp) al; - I.movzx (al, res i 0) + I.movzx al (res i 0) | Lop(Iintop_imm(Icomp cmp, n)) -> - I.cmp (int n, arg i 0); + I.cmp (int n) (arg i 0); I.set (cond cmp) al; - I.movzx (al, res i 0) + I.movzx al (res i 0) | Lop(Iintop Icheckbound) -> let lbl = bound_error_label i.dbg in - I.cmp (arg i 1, arg i 0); + I.cmp (arg i 1) (arg i 0); I.jbe (label lbl) | Lop(Iintop_imm(Icheckbound, n)) -> let lbl = bound_error_label i.dbg in - I.cmp (int n, arg i 0); + I.cmp (int n) (arg i 0); I.jbe (label lbl) | Lop(Iintop(Idiv | Imod)) -> I.cqo (); I.idiv (arg i 1) | Lop(Iintop(Ilsl | Ilsr | Iasr as op)) -> (* We have i.arg.(0) = i.res.(0) and i.arg.(1) = %rcx *) - instr_for_intop op (cl, res i 0) + instr_for_intop op cl (res i 0) | Lop(Iintop Imulh) -> - I.imul (arg i 1, None) + I.imul (arg i 1) None | Lop(Iintop op) -> (* We have i.arg.(0) = i.res.(0) *) - instr_for_intop op (arg i 1, res i 0) + instr_for_intop op (arg i 1) (res i 0) | Lop(Iintop_imm(Iadd, n)) when i.arg.(0).loc <> i.res.(0).loc -> - I.lea (mem64 NONE n (arg64 i 0), res i 0) + I.lea (mem64 NONE n (arg64 i 0)) (res i 0) | Lop(Iintop_imm(Iadd, 1) | Iintop_imm(Isub, -1)) -> I.inc (res i 0) | Lop(Iintop_imm(Iadd, -1) | Iintop_imm(Isub, 1)) -> I.dec (res i 0) | Lop(Iintop_imm(op, n)) -> (* We have i.arg.(0) = i.res.(0) *) - instr_for_intop op (int n, res i 0) + instr_for_intop op (int n) (res i 0) | Lop(Inegf) -> - I.xorpd (mem64_rip OWORD (emit_symbol "caml_negf_mask"), res i 0) + I.xorpd (mem64_rip OWORD (emit_symbol "caml_negf_mask")) (res i 0) | Lop(Iabsf) -> - I.andpd (mem64_rip OWORD (emit_symbol "caml_absf_mask"), res i 0) + I.andpd (mem64_rip OWORD (emit_symbol "caml_absf_mask")) (res i 0) | Lop(Iaddf | Isubf | Imulf | Idivf as floatop) -> - instr_for_floatop floatop (arg i 1, res i 0) + instr_for_floatop floatop (arg i 1) (res i 0) | Lop(Ifloatofint) -> - I.cvtsi2sd (arg i 0, res i 0) + I.cvtsi2sd (arg i 0) (res i 0) | Lop(Iintoffloat) -> - I.cvttsd2si (arg i 0, res i 0) + I.cvttsd2si (arg i 0) (res i 0) | Lop(Ispecific(Ilea addr)) -> - I.lea (addressing addr NONE i 0, res i 0) + I.lea (addressing addr NONE i 0) (res i 0) | Lop(Ispecific(Istore_int(n, addr, _))) -> - I.mov (nat n, addressing addr QWORD i 0) + I.mov (nat n) (addressing addr QWORD i 0) | Lop(Ispecific(Istore_symbol(s, addr, _))) -> assert (not !pic_code && not !Clflags.dlcode); add_used_symbol s; load_symbol_addr s (addressing addr QWORD i 0) | Lop(Ispecific(Ioffset_loc(n, addr))) -> - I.add (int n, addressing addr QWORD i 0) + I.add (int n) (addressing addr QWORD i 0) | Lop(Ispecific(Ifloatarithmem(op, addr))) -> - instr_for_floatarithmem op (addressing addr REAL8 i 1, res i 0) + instr_for_floatarithmem op (addressing addr REAL8 i 1) (res i 0) | Lop(Ispecific(Ibswap 16)) -> - I.xchg (ah, al); - I.movzx (res16 i 0, res i 0) + I.xchg ah al; + I.movzx (res16 i 0) (res i 0) | Lop(Ispecific(Ibswap 32)) -> I.bswap (res32 i 0); - I.movsxd (res32 i 0, res i 0) + I.movsxd (res32 i 0) (res i 0) | Lop(Ispecific(Ibswap 64)) -> I.bswap (res i 0) | Lop(Ispecific(Ibswap _)) -> assert false | Lop(Ispecific Isqrtf) -> - I.sqrtsd (arg i 0, res i 0) + I.sqrtsd (arg i 0) (res i 0) | Lop(Ispecific(Ifloatsqrtf addr)) -> - I.sqrtsd (addressing addr REAL8 i 0, res i 0) + I.sqrtsd (addressing addr REAL8 i 0) (res i 0) | Lreloadretaddr -> () | Lreturn -> @@ -646,26 +646,26 @@ let emit_instr fallthrough i = output_test_zero i.arg.(0); I.je lbl | Iinttest cmp -> - I.cmp (arg i 1, arg i 0); + I.cmp (arg i 1) (arg i 0); I.j (cond cmp) lbl | Iinttest_imm((Isigned Ceq | Isigned Cne | Iunsigned Ceq | Iunsigned Cne) as cmp, 0) -> output_test_zero i.arg.(0); I.j (cond cmp) lbl | Iinttest_imm(cmp, n) -> - I.cmp (int n, arg i 0); + I.cmp (int n) (arg i 0); I.j (cond cmp) lbl | Ifloattest(cmp, neg) -> emit_float_test cmp neg i lbl | Ioddtest -> - I.test (int 1, arg8 i 0); + I.test (int 1) (arg8 i 0); I.jne lbl | Ieventest -> - I.test (int 1, arg8 i 0); + I.test (int 1) (arg8 i 0); I.je lbl end | Lcondbranch3(lbl0, lbl1, lbl2) -> - I.cmp (int 1, arg i 0); + I.cmp (int 1) (arg i 0); begin match lbl0 with | None -> () | Some lbl -> I.jb (label lbl) @@ -690,9 +690,9 @@ let emit_instr fallthrough i = then (phys_reg 4 (*rdx*), phys_reg 0 (*rax*)) else (phys_reg 0 (*rax*), phys_reg 4 (*rdx*)) in - I.lea (mem64_rip NONE lbl, reg tmp1); - I.movsxd (mem64 DWORD 0 (arg64 i 0) ~scale:4 ~base:(reg64 tmp1), reg tmp2); - I.add (reg tmp2, reg tmp1); + I.lea (mem64_rip NONE lbl) (reg tmp1); + I.movsxd (mem64 DWORD 0 (arg64 i 0) ~scale:4 ~base:(reg64 tmp1)) (reg tmp2); + I.add (reg tmp2) (reg tmp1); I.jmp (reg tmp1); begin match system with @@ -714,12 +714,12 @@ let emit_instr fallthrough i = cfi_adjust_cfa_offset 8; I.push r14; cfi_adjust_cfa_offset 8; - I.mov (rsp, r14); + I.mov rsp r14; stack_offset := !stack_offset + 16 | Lpoptrap -> I.pop r14; cfi_adjust_cfa_offset (-8); - I.add (int 8, rsp); + I.add (int 8) rsp; cfi_adjust_cfa_offset (-8); stack_offset := !stack_offset - 16 | Lraise k -> @@ -732,7 +732,7 @@ let emit_instr fallthrough i = record_frame Reg.Set.empty i.dbg | false, _ | true, Lambda.Raise_notrace -> - I.mov (r14, rsp); + I.mov r14 rsp; I.pop r14; I.ret () end @@ -754,7 +754,7 @@ let emit_profile () = need to preserve other regs. We do need to initialize rbp like mcount expects it, though. *) I.push r10; - if not fp then I.mov (rsp, rbp); + if not fp then I.mov rsp rbp; emit_call "mcount"; I.pop r10 end @@ -785,12 +785,12 @@ let fundecl fundecl = if fp then begin I.push rbp; cfi_adjust_cfa_offset 8; - I.mov (rsp, rbp); + I.mov rsp rbp; end; if !Clflags.gprofile then emit_profile(); if frame_required() then begin let n = frame_size() - 8 - (if fp then 8 else 0) in - I.sub (int n, rsp); + I.sub (int n) rsp; cfi_adjust_cfa_offset n; end; def_label !tailrec_entry_point; diff --git a/asmcomp/x86_dsl.ml b/asmcomp/x86_dsl.ml index 461894e508..bf95303c94 100644 --- a/asmcomp/x86_dsl.ml +++ b/asmcomp/x86_dsl.ml @@ -102,33 +102,33 @@ module D = struct end module I = struct - let add (x, y) = emit (ADD (x, y)) - let addsd (x, y) = emit (ADDSD (x, y)) - let and_ (x, y)= emit (AND (x, y)) - let andpd (x, y) = emit (ANDPD (x, y)) + let add x y = emit (ADD (x, y)) + let addsd x y = emit (ADDSD (x, y)) + let and_ x y= emit (AND (x, y)) + let andpd x y = emit (ANDPD (x, y)) let bswap x = emit (BSWAP x) let call x = emit (CALL x) let cdq () = emit CDQ - let cmp (x, y) = emit (CMP (x, y)) - let comisd (x, y) = emit (COMISD (x, y)) + let cmp x y = emit (CMP (x, y)) + let comisd x y = emit (COMISD (x, y)) let cqo () = emit CQO - let cvtsd2ss (x, y) = emit (CVTSD2SS (x, y)) - let cvtsi2sd (x, y) = emit (CVTSI2SD (x, y)) - let cvtss2sd (x, y) = emit (CVTSS2SD (x, y)) - let cvttsd2si (x, y) = emit (CVTTSD2SI (x, y)) + let cvtsd2ss x y = emit (CVTSD2SS (x, y)) + let cvtsi2sd x y = emit (CVTSI2SD (x, y)) + let cvtss2sd x y = emit (CVTSS2SD (x, y)) + let cvttsd2si x y = emit (CVTTSD2SI (x, y)) let dec x = emit (DEC x) - let divsd (x, y) = emit (DIVSD (x, y)) + let divsd x y = emit (DIVSD (x, y)) let fabs () = emit FABS let fadd x = emit (FADD x) - let faddp (x, y) = emit (FADDP (x, y)) + let faddp x y = emit (FADDP (x, y)) let fchs () = emit FCHS let fcomp x = emit (FCOMP x) let fcompp () = emit FCOMPP let fcos () = emit FCOS let fdiv x = emit (FDIV x) - let fdivp (x, y) = emit (FDIVP (x, y)) + let fdivp x y = emit (FDIVP (x, y)) let fdivr x = emit (FDIVR x) - let fdivrp (x, y) = emit (FDIVRP (x, y)) + let fdivrp x y = emit (FDIVRP (x, y)) let fild x = emit (FILD x) let fistp x = emit (FISTP x) let fld x = emit (FLD x) @@ -138,7 +138,7 @@ module I = struct let fldln2 () = emit FLDLN2 let fldz () = emit FLDZ let fmul x = emit (FMUL x) - let fmulp (x, y) = emit (FMULP (x, y)) + let fmulp x y = emit (FMULP (x, y)) let fnstcw x = emit (FNSTCW x) let fnstsw x = emit (FNSTSW x) let fpatan () = emit FPATAN @@ -147,14 +147,14 @@ module I = struct let fsqrt () = emit FSQRT let fstp x = emit (FSTP x) let fsub x = emit (FSUB x) - let fsubp (x, y) = emit (FSUBP (x, y)) + let fsubp x y = emit (FSUBP (x, y)) let fsubr x = emit (FSUBR x) - let fsubrp (x, y) = emit (FSUBRP (x, y)) + let fsubrp x y = emit (FSUBRP (x, y)) let fxch x = emit (FXCH x) let fyl2x () = emit FYL2X let hlt () = emit HLT let idiv x = emit (IDIV x) - let imul (x, y) = emit (IMUL (x, y)) + let imul x y = emit (IMUL (x, y)) let inc x = emit (INC x) let j cond x = emit (J (cond, x)) let ja = j A @@ -166,30 +166,30 @@ module I = struct let jmp x = emit (JMP x) let jne = j NE let jp = j P - let lea (x, y) = emit (LEA (x, y)) - let mov (x, y) = emit (MOV (x, y)) - let movapd (x, y) = emit (MOVAPD (x, y)) - let movsd (x, y) = emit (MOVSD (x, y)) - let movss (x, y) = emit (MOVSS (x, y)) - let movsx (x, y) = emit (MOVSX (x, y)) - let movsxd (x, y) = emit (MOVSXD (x, y)) - let movzx (x, y) = emit (MOVZX (x, y)) - let mulsd (x, y) = emit (MULSD (x, y)) + let lea x y = emit (LEA (x, y)) + let mov x y = emit (MOV (x, y)) + let movapd x y = emit (MOVAPD (x, y)) + let movsd x y = emit (MOVSD (x, y)) + let movss x y = emit (MOVSS (x, y)) + let movsx x y = emit (MOVSX (x, y)) + let movsxd x y = emit (MOVSXD (x, y)) + let movzx x y = emit (MOVZX (x, y)) + let mulsd x y = emit (MULSD (x, y)) let nop () = emit NOP - let or_ (x, y) = emit (OR (x, y)) + let or_ x y = emit (OR (x, y)) let pop x = emit (POP x) let push x = emit (PUSH x) let ret () = emit RET - let sal (x, y) = emit (SAL (x, y)) - let sar (x, y) = emit (SAR (x, y)) + let sal x y = emit (SAL (x, y)) + let sar x y = emit (SAR (x, y)) let set cond x = emit (SET (cond, x)) - let shr (x, y) = emit (SHR (x, y)) - let sqrtsd (x, y) = emit (SQRTSD (x, y)) - let sub (x, y) = emit (SUB (x, y)) - let subsd (x, y) = emit (SUBSD (x, y)) - let test (x, y)= emit (TEST (x, y)) - let ucomisd (x, y) = emit (UCOMISD (x, y)) - let xchg (x, y) = emit (XCHG (x, y)) - let xor (x, y)= emit (XOR (x, y)) - let xorpd (x, y) = emit (XORPD (x, y)) + let shr x y = emit (SHR (x, y)) + let sqrtsd x y = emit (SQRTSD (x, y)) + let sub x y = emit (SUB (x, y)) + let subsd x y = emit (SUBSD (x, y)) + let test x y= emit (TEST (x, y)) + let ucomisd x y = emit (UCOMISD (x, y)) + let xchg x y = emit (XCHG (x, y)) + let xor x y= emit (XOR (x, y)) + let xorpd x y = emit (XORPD (x, y)) end diff --git a/asmcomp/x86_dsl.mli b/asmcomp/x86_dsl.mli index ac218c1d5c..076ac0499e 100644 --- a/asmcomp/x86_dsl.mli +++ b/asmcomp/x86_dsl.mli @@ -95,33 +95,33 @@ end module I : sig (* Instructions *) - val add: arg * arg -> unit - val addsd: arg * arg -> unit - val and_: arg * arg -> unit - val andpd: arg * arg -> unit + val add: arg -> arg -> unit + val addsd: arg -> arg -> unit + val and_: arg -> arg -> unit + val andpd: arg -> arg -> unit val bswap: arg -> unit val call: arg -> unit val cdq: unit -> unit - val cmp: arg * arg -> unit - val comisd: arg * arg -> unit + val cmp: arg -> arg -> unit + val comisd: arg -> arg -> unit val cqo: unit -> unit - val cvtsd2ss: arg * arg -> unit - val cvtsi2sd: arg * arg -> unit - val cvtss2sd: arg * arg -> unit - val cvttsd2si: arg * arg -> unit + val cvtsd2ss: arg -> arg -> unit + val cvtsi2sd: arg -> arg -> unit + val cvtss2sd: arg -> arg -> unit + val cvttsd2si: arg -> arg -> unit val dec: arg -> unit - val divsd: arg * arg -> unit + val divsd: arg -> arg -> unit val fabs: unit -> unit val fadd: arg -> unit - val faddp: arg * arg -> unit + val faddp: arg -> arg -> unit val fchs: unit -> unit val fcomp: arg -> unit val fcompp: unit -> unit val fcos: unit -> unit val fdiv: arg -> unit - val fdivp: arg * arg -> unit + val fdivp: arg -> arg -> unit val fdivr: arg -> unit - val fdivrp: arg * arg -> unit + val fdivrp: arg -> arg -> unit val fild: arg -> unit val fistp: arg -> unit val fld1: unit -> unit @@ -131,7 +131,7 @@ module I : sig val fldln2: unit -> unit val fldz: unit -> unit val fmul: arg -> unit - val fmulp: arg * arg -> unit + val fmulp: arg -> arg -> unit val fnstcw: arg -> unit val fnstsw: arg -> unit val fpatan: unit -> unit @@ -140,14 +140,14 @@ module I : sig val fsqrt: unit -> unit val fstp: arg -> unit val fsub: arg -> unit - val fsubp: arg * arg -> unit + val fsubp: arg -> arg -> unit val fsubr: arg -> unit - val fsubrp: arg * arg -> unit + val fsubrp: arg -> arg -> unit val fxch: arg -> unit val fyl2x: unit -> unit val hlt: unit -> unit val idiv: arg -> unit - val imul: arg * arg option -> unit + val imul: arg -> arg option -> unit val inc: arg -> unit val j: condition -> arg -> unit val ja: arg -> unit @@ -159,30 +159,30 @@ module I : sig val jmp: arg -> unit val jne: arg -> unit val jp: arg -> unit - val lea: arg * arg -> unit - val mov: arg * arg -> unit - val movapd: arg * arg -> unit - val movsd: arg * arg -> unit - val movss: arg * arg -> unit - val movsx: arg * arg -> unit - val movsxd: arg * arg -> unit - val movzx: arg * arg -> unit - val mulsd: arg * arg -> unit + val lea: arg -> arg -> unit + val mov: arg -> arg -> unit + val movapd: arg -> arg -> unit + val movsd: arg -> arg -> unit + val movss: arg -> arg -> unit + val movsx: arg -> arg -> unit + val movsxd: arg -> arg -> unit + val movzx: arg -> arg -> unit + val mulsd: arg -> arg -> unit val nop: unit -> unit - val or_: arg * arg -> unit + val or_: arg -> arg -> unit val pop: arg -> unit val push: arg -> unit val ret: unit -> unit - val sal: arg * arg -> unit - val sar: arg * arg -> unit + val sal: arg -> arg -> unit + val sar: arg -> arg -> unit val set: condition -> arg -> unit - val shr: arg * arg -> unit - val sqrtsd: arg * arg -> unit - val sub: arg * arg -> unit - val subsd: arg * arg -> unit - val test: arg * arg -> unit - val ucomisd: arg * arg -> unit - val xchg: arg * arg -> unit - val xor: arg * arg -> unit - val xorpd: arg * arg -> unit + val shr: arg -> arg -> unit + val sqrtsd: arg -> arg -> unit + val sub: arg -> arg -> unit + val subsd: arg -> arg -> unit + val test: arg -> arg -> unit + val ucomisd: arg -> arg -> unit + val xchg: arg -> arg -> unit + val xor: arg -> arg -> unit + val xorpd: arg -> arg -> unit end |
