Index: src/trusted/validator_x86/testdata/64/prefix-3.tf |
diff --git a/src/trusted/validator_x86/testdata/64/prefix-3.tf b/src/trusted/validator_x86/testdata/64/prefix-3.tf |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6be7843de4097943200dd872bc09d0184d3f0730 |
--- /dev/null |
+++ b/src/trusted/validator_x86/testdata/64/prefix-3.tf |
@@ -0,0 +1,64 @@ |
+BITS: 64 |
+OUTCOME: invalid |
+ |
+# lock add %r15w, (%rsp) |
+asm: lock add %r15w,(%rsp) |
+hex: 66 F0 44 01 3C 24 |
+ |
+hex: F0 66 44 01 3C 24 |
+ |
+# fs mov %ax,%r8w |
+asm: fs; mov %ax,%r8w |
+hex: 64 66 41 89 C0 |
+nc_out: ERROR: More than one (non-REX) prefix byte specified |
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client |
+ |
+asm: data16; fs; mov %eax,%r8d |
+hex: 66 64 41 89 C0 |
+nc_out: ERROR: More than one (non-REX) prefix byte specified |
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client |
+ |
+# mov %edi,%edi |
+# lea (%r15,%rdi),%rdi |
+# 0x66 rep stos %rax,%es:(%rdi) |
+asm: mov %edi,%edi |
+hex: 89 FF |
+ |
+asm: lea (%r15,%rdi,1),%rdi |
+hex: 49 8D 3C 3F |
+ |
+hex: 66 F3 48 AB |
+nc_out: ERROR: More than one (non-REX) prefix byte specified |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+nc_out: ERROR: Use of REP (F3) prefix for instruction not allowed by Native Client |
+nc_out: ERROR: Use of DATA16 (66) prefix for instruction not allowed by Native Client |
+ |
+asm: mov %edi,%edi |
+hex: 89 FF |
+ |
+asm: lea (%r15,%rdi,1),%rdi |
+hex: 49 8D 3C 3F |
+ |
+hex: F3 66 48 AB |
+nc_out: ERROR: More than one (non-REX) prefix byte specified |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+nc_out: ERROR: Use of REP (F3) prefix for instruction not allowed by Native Client |
+nc_out: ERROR: Use of DATA16 (66) prefix for instruction not allowed by Native Client |
+ |
+# 66 nop |
+asm: xchg %ax,%ax |
+hex: 66 90 |
+ |
+# 66 66 nop |
+hex: 66 66 90 |
+nc_out: ERROR: More than one (non-REX) prefix byte specified |
+nc_out: ERROR: Duplicating a prefix byte is not allowed by Native Client |
+ |
+# 66 66 66 nop |
+hex: 66 66 66 90 |
+nc_out: ERROR: More than one (non-REX) prefix byte specified |
+nc_out: ERROR: Duplicating a prefix byte is not allowed by Native Client |
+ |
+# white-listed nop |
+hex: 66 66 66 2E 0F 1F 84 00 00 00 00 00 |
+ |