File tree 4 files changed +17
-2
lines changed
4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -397,6 +397,10 @@ let decode_aux = new_definition `!pfxs rex l. decode_aux pfxs rex l =
397
397
let sz = op_size T (rex_W rex) T pfxs in
398
398
read_ModRM_operand rex sz l >> = \((reg,rm),l).
399
399
SOME (CMOV (decode_condition c) reg rm,l)
400
+ | [0x57 :8 ] -> if has_pfxs pfxs then NONE else
401
+ let sz = Lower_128 in
402
+ read_ModRM rex l >> = \((reg,rm),l).
403
+ SOME (XORPS (mmreg reg sz) (simd_of_RM sz rm), l)
400
404
| [0x66 :8 ] -> if has_unhandled_pfxs pfxs then NONE else
401
405
let sz = Lower_128 in
402
406
read_ModRM rex l >> = \((reg,rm),l).
Original file line number Diff line number Diff line change @@ -306,7 +306,8 @@ let instruction_INDUCTION,instruction_RECURSION = define_type
306
306
| TZCNT operand operand
307
307
| VPXOR operand operand operand
308
308
| XCHG operand operand
309
- | XOR operand operand" ;;
309
+ | XOR operand operand
310
+ | XORPS operand operand" ;;
310
311
311
312
(* ------------------------------------------------------------------------- *)
312
313
(* Some shorthands for addressing modes etc. *)
Original file line number Diff line number Diff line change @@ -279,6 +279,8 @@ let iclasses = iclasses @
279
279
[0x66 ; 0x41 ; 0x0f ; 0xef ; 0xff ]; (* PXOR (%_% xmm7) (%_% xmm15) *)
280
280
[0x66 ; 0x0f ; 0xdb ; 0xd3 ]; (* PAND (%_% xmm2) (%_% xmm3) *)
281
281
[0x66 ; 0x41 ; 0x0f ; 0xdb ; 0xff ]; (* PAND (%_% xmm7) (%_% xmm15) *)
282
+ [0x0f ; 0x57 ; 0xd3 ]; (* XORPS (%_% xmm2) (%_% xmm3) *)
283
+ [0x41 ; 0x0f ; 0x57 ; 0xff ]; (* XORPS (%_% xmm7) (%_% xmm15) *)
282
284
[0x66 ; 0x0f ; 0xfe ; 0xd3 ]; (* PADDD (%_% xmm2) (%_% xmm3) *)
283
285
[0x66 ; 0x41 ; 0x0f ; 0xfe ; 0xff ]; (* PADDD (%_% xmm7) (%_% xmm15) *)
284
286
[0x66 ; 0x0f ; 0xd4 ; 0xd3 ]; (* PADDQ (%_% xmm2) (%_% xmm3) *)
Original file line number Diff line number Diff line change @@ -1347,6 +1347,12 @@ let x86_XOR = new_definition
1347
1347
OF := F ,,
1348
1348
UNDEFINED_VALUES[AF]) s`;;
1349
1349
1350
+ let x86_XORPS = new_definition
1351
+ `x86_XORPS dest src s =
1352
+ let x = read src s in
1353
+ let y = read dest s in
1354
+ (dest := word_xor x y) s`;;
1355
+
1350
1356
(* ------------------------------------------------------------------------- *)
1351
1357
(* State components of various sizes corresponding to GPRs. *)
1352
1358
(* We also have a generic one "GPR" mapping to a number in all cases. *)
@@ -1986,6 +1992,8 @@ let x86_execute = define
1986
1992
| 32 -> x86_XOR (OPERAND32 dest s) (OPERAND32 src s)
1987
1993
| 16 -> x86_XOR (OPERAND16 dest s) (OPERAND16 src s)
1988
1994
| 8 -> x86_XOR (OPERAND8 dest s) (OPERAND8 src s)) s
1995
+ | XORPS dest src ->
1996
+ x86_XORPS (OPERAND128_SSE dest s) (OPERAND128_SSE src s) s
1989
1997
| _ -> (\s'. F)`;;
1990
1998
1991
1999
(* ------------------------------------------------------------------------- *)
@@ -2708,7 +2716,7 @@ let X86_OPERATION_CLAUSES =
2708
2716
x86_PSHUFD_ALT; x86_PSRAD_ALT; x86_PUSH_ALT; x86_PXOR;
2709
2717
x86_RCL; x86_RCR; x86_RET; x86_ROL; x86_ROR;
2710
2718
x86_SAR; x86_SBB_ALT; x86_SET; x86_SHL; x86_SHLD; x86_SHR; x86_SHRD;
2711
- x86_STC; x86_SUB_ALT; x86_TEST; x86_TZCNT; x86_XCHG; x86_XOR;
2719
+ x86_STC; x86_SUB_ALT; x86_TEST; x86_TZCNT; x86_XCHG; x86_XOR; x86_XORPS;
2712
2720
(* ** AVX2 instructions ***)
2713
2721
x86_VPXOR;
2714
2722
(* ** 32-bit backups since the ALT forms are 64-bit only ***)
You can’t perform that action at this time.
0 commit comments