Commit 3083678
authored
[X86] Don't use
This fixes the x86 backend to properly reserve `rbp` when the
`frame-pointer=reserved` option is used. Currently, this option is
ignored.
Disassembly of the new test case before:
```s
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
callq bar@PLT
movl %ebp, %edi
movl %ebx, %esi
callq bar@PLT
addq $8, %rsp
popq %rbx
popq %rbp
retq
```
...and after (`r14` is used as scratch space in place of `rbp`):
```s
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
callq bar@PLT
movl %r14d, %edi
movl %ebx, %esi
callq bar@PLT
addq $8, %rsp
popq %rbx
popq %r14
retq
```
Fixes llvm#117178.rbp when it's reserved (llvm#146638)1 parent 8a221a5 commit 3083678
File tree
2 files changed
+26
-1
lines changed- llvm
- lib/Target/X86
- test/CodeGen/X86
2 files changed
+26
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments