]>
Commit | Line | Data |
---|---|---|
64c2fd3a JR |
1 | diff -Naurp gcc/config/avr/avr.c gcc/config/avr/avr.c |
2 | --- gcc/config/avr/avr.c 2012-12-06 19:22:10.000000000 +0530 | |
3 | +++ gcc/config/avr/avr.c 2012-12-06 19:23:44.000000000 +0530 | |
4 | @@ -169,7 +169,7 @@ static bool avr_rtx_costs (rtx, int, int | |
5 | #define FIRST_CUM_REG 26 | |
6 | ||
7 | /* Last call saved register */ | |
8 | -#define LAST_CALLEE_SAVED_REG (AVR_TINY ? 21 : 17) | |
9 | +#define LAST_CALLEE_SAVED_REG (AVR_TINY ? 19 : 17) | |
10 | ||
11 | /* Implicit target register of LPM instruction (R0) */ | |
12 | extern GTY(()) rtx lpm_reg_rtx; | |
13 | @@ -7451,7 +7451,8 @@ avr_assemble_integer (rtx x, unsigned in | |
14 | static bool | |
15 | avr_class_likely_spilled_p (reg_class_t c) | |
16 | { | |
17 | - return (c != ALL_REGS && c != ADDW_REGS); | |
18 | + return (c != ALL_REGS && | |
19 | + (AVR_TINY ? 1 : c != ADDW_REGS)); | |
20 | } | |
21 | ||
22 | /* Valid attributes: | |
23 | @@ -8168,12 +8169,13 @@ order_regs_for_local_alloc (void) | |
24 | 32,33,34,35 | |
25 | }; | |
26 | static const int tiny_order_0[] = { | |
27 | - 24,25, | |
28 | + 20,21, | |
29 | 22,23, | |
30 | + 24,25, | |
31 | 30,31, | |
32 | 26,27, | |
33 | 28,29, | |
34 | - 21,20,19,18, | |
35 | + 19,18, | |
36 | 16,17, | |
37 | 32,33,34,35, | |
38 | 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 | |
39 | @@ -8220,7 +8222,7 @@ order_regs_for_local_alloc (void) | |
40 | devices has only 16 registers, so different allocation order should be used | |
41 | */ | |
42 | const int *order = (TARGET_ORDER_1 ? (AVR_TINY ? tiny_order_1 : order_1) : | |
43 | - TARGET_ORDER_2 ? (AVR_TINY ? tiny_order_1 : order_2) : | |
44 | + TARGET_ORDER_2 ? (AVR_TINY ? tiny_order_0 : order_2) : | |
45 | (AVR_TINY ? tiny_order_0 : order_0)); | |
46 | ||
47 | for (i=0; i < ARRAY_SIZE (order_0); ++i) | |
48 | @@ -10090,12 +10092,13 @@ avr_conditional_register_usage(void) { | |
49 | unsigned int i; | |
50 | ||
51 | const int tiny_reg_alloc_order[] = { | |
52 | - 24,25, | |
53 | + 20,21, | |
54 | 22,23, | |
55 | + 24,25, | |
56 | 30,31, | |
57 | 26,27, | |
58 | 28,29, | |
59 | - 21,20,19,18, | |
60 | + 19,18, | |
61 | 16,17, | |
62 | 32,33,34,35, | |
63 | 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 |