]> git.pld-linux.org Git - packages/crossavr-gcc.git/blame - 510-gcc-avrtc496-tiny.patch
Revert "Revert "- synchronized patches with official AVR toolchain 3.4.1.830""
[packages/crossavr-gcc.git] / 510-gcc-avrtc496-tiny.patch
CommitLineData
7f71f849
JR
1diff -Naurp gcc/config/avr/avr.c gcc/config/avr/avr.c
2--- gcc/config/avr/avr.c 2012-06-27 15:41:23.000000000 +0530
3+++ gcc/config/avr/avr.c 2012-06-27 15:42:02.000000000 +0530
4@@ -751,15 +751,15 @@ expand_prologue (void)
5 emit_insn (gen_enable_interrupt ());
6
7 /* Push zero reg. */
8- emit_push_byte (ZERO_REGNO, true);
9+ emit_push_byte ((AVR_TINY)?ZERO_REGNO_AVRTINY10:ZERO_REGNO, true);
10
11 /* Push tmp reg. */
12- emit_push_byte (TMP_REGNO, true);
13+ emit_push_byte ((AVR_TINY)?TMP_REGNO_AVRTINY10:TMP_REGNO, true);
14
15 /* Push SREG. */
16 /* ??? There's no dwarf2 column reserved for SREG. */
17 emit_move_insn (tmp_reg_rtx, gen_rtx_MEM (QImode, GEN_INT (AVR_SREG_ADDR)));
18- emit_push_byte (TMP_REGNO, false);
19+ emit_push_byte ((AVR_TINY)?TMP_REGNO_AVRTINY10:TMP_REGNO, false);
20
21 /* Push RAMPD, RAMPX, RAMPY. */
22 /*
23@@ -1217,16 +1217,16 @@ expand_epilogue (void)
24 }
25
26 /* Restore SREG using tmp reg as scratch. */
27- emit_pop_byte (TMP_REGNO);
28+ emit_pop_byte ((AVR_TINY)?TMP_REGNO_AVRTINY10:TMP_REGNO);
29
30 emit_move_insn (gen_rtx_MEM (QImode, GEN_INT (AVR_SREG_ADDR)),
31 tmp_reg_rtx);
32
33 /* Restore tmp REG. */
34- emit_pop_byte (TMP_REGNO);
35+ emit_pop_byte ((AVR_TINY)?TMP_REGNO_AVRTINY10:TMP_REGNO);
36
37 /* Restore zero REG. */
38- emit_pop_byte (ZERO_REGNO);
39+ emit_pop_byte ((AVR_TINY)?ZERO_REGNO_AVRTINY10:ZERO_REGNO);
40 }
41
42 emit_jump_insn (gen_return ());
This page took 0.032486 seconds and 4 git commands to generate.