Index: src/trusted/validator/x86/testing/tf/converted/64/mov-lea-rbp-bad-5.tf |
diff --git a/src/trusted/validator/x86/testing/tf/converted/64/mov-lea-rbp-bad-5.tf b/src/trusted/validator/x86/testing/tf/converted/64/mov-lea-rbp-bad-5.tf |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2a3772dd7fa36d4180960318a3396e762fa72532 |
--- /dev/null |
+++ b/src/trusted/validator/x86/testing/tf/converted/64/mov-lea-rbp-bad-5.tf |
@@ -0,0 +1,16 @@ |
+BITS: 64 |
+OUTCOME: invalid |
+ |
+# Bad example of using lea solution (instead of add) to update rbp. |
+# That is where we use rsp in address instead of rbp. |
+# That is, apply a mov to non 32-bit register rbp |
+# mov %rbp, %rcx |
+# lea %rbp, [%rsp+%r15*1] |
+asm: mov %rcx,%rbp |
+hex: 48 89 cd |
+nc_out: ERROR: Illegal change to register RBP |
+ |
+asm: lea (%rsp,%r15,1),%rbp |
+hex: 4a 8d 2c 3c |
+nc_out: ERROR: Illegal change to register RBP |
+ |