OLD | NEW |
| 1 BITS: 64 |
| 2 OUTCOME: invalid |
| 3 |
1 # Bad example of using lea solution (instead of add) to update rbp. | 4 # Bad example of using lea solution (instead of add) to update rbp. |
2 # That is, we add a (non-zero) constant to the address of the lea. | 5 # That is, we add a (non-zero) constant to the address of the lea. |
3 # base register r15. | 6 # base register r15. |
4 # mov %ebp, %ecx | 7 # mov %ebp, %ecx |
5 # lea %rbp, [%rbp+%r15*1+0x1] | 8 # lea %rbp, [%rbp+%r15*1+0x1] |
6 89 cd | 9 asm: mov %ecx,%ebp |
7 4a 8d 6c 3d 01 | 10 hex: 89 cd |
| 11 nc_out: ERROR: Illegal assignment to EBP |
| 12 |
| 13 asm: lea 0x1(%rbp,%r15,1),%rbp |
| 14 hex: 4a 8d 6c 3d 01 |
| 15 nc_out: ERROR: Illegal change to register RBP |
| 16 |
OLD | NEW |