Index: src/trusted/validator_x86/testdata/64/change-subregs.tf |
diff --git a/src/trusted/validator_x86/testdata/64/change-subregs.tf b/src/trusted/validator_x86/testdata/64/change-subregs.tf |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a77f486dc30a9fd016cd79a84849a8acc4763861 |
--- /dev/null |
+++ b/src/trusted/validator_x86/testdata/64/change-subregs.tf |
@@ -0,0 +1,18 @@ |
+BITS: 64 |
+OUTCOME: invalid |
+ |
+# Sample of updating subregisters of protected registers rsp, rbp, and r15 |
+# 66 29 c4 sub %sp, %ax |
+# 66 29 c5 sub %bp, %ax |
+# 47 29 c7 sub %r15d, %r8d |
+asm: sub %ax,%sp |
+hex: 66 29 c4 |
+nc_out: ERROR: Changing RegSP changes the value of RegRSP |
+ |
+asm: sub %ax,%bp |
+hex: 66 29 c5 |
+nc_out: ERROR: Changing RegBP changes the value of RegRBP |
+ |
+hex: 47 29 c7 |
+nc_out: ERROR: Changing RegR15D changes the value of RegR15 |
+ |