Commit 7a9809e
committed
[M68k]: always use the movem instruction for register spills
In the previous implementation, the mov instruction was used for 8-bit
register spills. However, this instruction has the side effect of
overwriting the CCR. When a spill is inserted between a compare and a
branch instruction, this would cause the necessary condition flags to be
overwritten. As 8-bit spills are already assigned 16-bit stack slots,
the 16-bit movem instruction, which doesn't affect the CCR, may be used
instead.
Fixes #106209.1 parent 7b4370e commit 7a9809e
File tree
3 files changed
+490
-23
lines changed- llvm
- lib/Target/M68k
- test/CodeGen/M68k
3 files changed
+490
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
794 | | - | |
| 794 | + | |
795 | 795 | | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
796 | 800 | | |
797 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
798 | 804 | | |
799 | | - | |
| 805 | + | |
800 | 806 | | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
810 | 813 | | |
811 | 814 | | |
812 | 815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | | - | |
59 | | - | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments