Uniformize.

git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15403 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Alain Frisch 2014-09-30 15:13:49 +00:00
parent 3b6f79b288
commit 0f2fb19952
1 changed files with 50 additions and 50 deletions

View File

@ -92,7 +92,7 @@ module D = struct
let model name = directive (Model name)
let private_extern s = directive (Private_extern s)
let qword cst = directive (Quad cst)
let setvar (arg1, arg2) = directive (Set (arg1, arg2))
let setvar (x, y) = directive (Set (x, y))
let size name cst = directive (Size (name, cst))
let space n = directive (Space n)
let text () = section [ ".text" ] None []
@ -102,93 +102,93 @@ end
module I = struct
let add (x, y) = emit (ADD (x, y))
let addsd (arg1, arg2) = emit (ADDSD (arg1, arg2))
let addsd (x, y) = emit (ADDSD (x, y))
let and_ (x, y)= emit (AND (x, y))
let andpd (arg1, arg2) = emit (ANDPD (arg1, arg2))
let bswap arg = emit (BSWAP arg)
let call arg = emit (CALL arg)
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 (arg1, arg2) = emit (COMISD (arg1, arg2))
let comisd (x, y) = emit (COMISD (x, y))
let cqo () = emit CQO
let cvtsd2ss (arg1, arg2) = emit (CVTSD2SS (arg1, arg2))
let cvtsi2sd (arg1, arg2) = emit (CVTSI2SD (arg1, arg2))
let cvtss2sd (arg1, arg2) = emit (CVTSS2SD (arg1, arg2))
let cvttsd2si (arg1, arg2) = emit (CVTTSD2SI (arg1, arg2))
let dec arg = emit (DEC arg)
let divsd (arg1, arg2) = emit (DIVSD (arg1, arg2))
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 fabs () = emit FABS
let fadd x = emit (FADD x)
let faddp (arg1, arg2) = emit (FADDP (arg1, arg2))
let faddp (x, y) = emit (FADDP (x, y))
let fchs () = emit FCHS
let fcomp arg = emit (FCOMP arg)
let fcomp x = emit (FCOMP x)
let fcompp () = emit FCOMPP
let fcos () = emit FCOS
let fdiv x = emit (FDIV x)
let fdivp (arg1, arg2) = emit (FDIVP (arg1, arg2))
let fdivp (x, y) = emit (FDIVP (x, y))
let fdivr x = emit (FDIVR x)
let fdivrp (arg1, arg2) = emit (FDIVRP (arg1, arg2))
let fild arg = emit (FILD arg)
let fistp arg = emit (FISTP arg)
let fld arg = emit (FLD arg)
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)
let fld1 () = emit FLD1
let fldcw arg = emit (FLDCW arg)
let fldcw x = emit (FLDCW x)
let fldlg2 () = emit FLDLG2
let fldln2 () = emit FLDLN2
let fldz () = emit FLDZ
let fmul x = emit (FMUL x)
let fmulp (arg1, arg2) = emit (FMULP (arg1, arg2))
let fnstcw arg = emit (FNSTCW arg)
let fnstsw arg = emit (FNSTSW arg)
let fmulp (x, y) = emit (FMULP (x, y))
let fnstcw x = emit (FNSTCW x)
let fnstsw x = emit (FNSTSW x)
let fpatan () = emit FPATAN
let fptan () = emit FPTAN
let fsin () = emit FSIN
let fsqrt () = emit FSQRT
let fstp arg = emit (FSTP arg)
let fstp x = emit (FSTP x)
let fsub x = emit (FSUB x)
let fsubp (arg1, arg2) = emit (FSUBP (arg1, arg2))
let fsubp (x, y) = emit (FSUBP (x, y))
let fsubr x = emit (FSUBR x)
let fsubrp (arg1, arg2) = emit (FSUBRP (arg1, arg2))
let fxch arg = emit (FXCH arg)
let fsubrp (x, y) = emit (FSUBRP (x, y))
let fxch x = emit (FXCH x)
let fyl2x () = emit FYL2X
let hlt () = emit HLT
let idiv arg = emit (IDIV arg)
let imul (arg1, arg2) = emit (IMUL (arg1, arg2))
let inc arg = emit (INC arg)
let j cond arg = emit (J (cond, arg))
let idiv x = emit (IDIV x)
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
let jae = j AE
let jb = j B
let jbe = j BE
let je = j E
let jg = j G
let jmp arg = emit (JMP arg)
let jmp x = emit (JMP x)
let jne = j NE
let jp = j P
let lea (arg1, arg2) = emit (LEA (arg1, arg2))
let mov (arg1, arg2) = emit (MOV (arg1, arg2))
let movapd (arg1, arg2) = emit (MOVAPD (arg1, arg2))
let movsd (arg1, arg2) = emit (MOVSD (arg1, arg2))
let movss (arg1, arg2) = emit (MOVSS (arg1, arg2))
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 (arg1, arg2) = emit (MOVSXD (arg1, arg2))
let movsxd (x, y) = emit (MOVSXD (x, y))
let movzx (x, y) = emit (MOVZX (x, y))
let mulsd (arg1, arg2) = emit (MULSD (arg1, arg2))
let mulsd (x, y) = emit (MULSD (x, y))
let nop () = emit NOP
let or_ (x, y) = emit (OR (x, y))
let pop arg = emit (POP arg)
let push arg = emit (PUSH arg)
let pop x = emit (POP x)
let push x = emit (PUSH x)
let ret () = emit RET
let sal (arg1, arg2) = emit (SAL (arg1, arg2))
let sar (arg1, arg2) = emit (SAR (arg1, arg2))
let set cond arg = emit (SET (cond, arg))
let shr (arg1, arg2) = emit (SHR (arg1, arg2))
let sqrtsd (arg1, arg2) = emit (SQRTSD (arg1, arg2))
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 (arg1, arg2) = emit (SUBSD (arg1, arg2))
let subsd (x, y) = emit (SUBSD (x, y))
let test (x, y)= emit (TEST (x, y))
let ucomisd (arg1, arg2) = emit (UCOMISD (arg1, arg2))
let xchg (arg1, arg2) = emit (XCHG (arg1, arg2))
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 (arg1, arg2) = emit (XORPD (arg1, arg2))
let xorpd (x, y) = emit (XORPD (x, y))
end