--- avr.c.backup 2002-11-18 14:25:53.000000000 +0100 +++ avr.c 2003-01-16 12:38:06.000000000 +0100 @@ -8,12 +8,12 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, @@ -44,6 +44,8 @@ /* Maximal allowed offset for an address in the LD command */ #define MAX_LD_OFFSET(MODE) (64 - (signed)GET_MODE_SIZE (MODE)) +static int signalx_function_p PARAMS ((tree)); +static int task_s_function_p PARAMS ((tree)); static int avr_naked_function_p PARAMS ((tree)); static int interrupt_function_p PARAMS ((tree)); static int signal_function_p PARAMS ((tree)); @@ -181,7 +183,7 @@ }; int avr_case_values_threshold = 30000; - + /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t" @@ -196,7 +198,7 @@ #define TARGET_ATTRIBUTE_TABLE avr_attribute_table struct gcc_target targetm = TARGET_INITIALIZER; - + void avr_override_options () { @@ -311,8 +313,20 @@ return NO_REGS; } -/* Return non-zero if FUNC is a naked function. */ +/* Return non-zero if FUNC is a task function. */ +static int +task_s_function_p (func) + tree func; +{ + tree a; + if (TREE_CODE (func) != FUNCTION_DECL) + abort (); + + a = lookup_attribute ("task", DECL_ATTRIBUTES (func)); + return a != NULL_TREE; +} +/* Return non-zero if FUNC is a naked function. */ static int avr_naked_function_p (func) tree func; @@ -321,7 +335,7 @@ if (TREE_CODE (func) != FUNCTION_DECL) abort (); - + a = lookup_attribute ("naked", DECL_ATTRIBUTES (func)); return a != NULL_TREE; } @@ -342,6 +356,22 @@ return a != NULL_TREE; } +/* Return nonzero if FUNC is a signalx function as specified + by the "signalx" attribute. */ + +static int +signalx_function_p (func) + tree func; +{ + tree a; + + if (TREE_CODE (func) != FUNCTION_DECL) + return 0; + + a = lookup_attribute ("signalx", DECL_ATTRIBUTES (func)); + return a != NULL_TREE; +} + /* Return nonzero if FUNC is a signal function as specified by the "signal" attribute. */ @@ -372,15 +402,16 @@ { int interrupt_func_p = interrupt_function_p (current_function_decl); int signal_func_p = signal_function_p (current_function_decl); + int signalx_func_p = signalx_function_p (current_function_decl); int leaf_func_p = leaf_function_p (); int offset= frame_pointer_needed ? 2 : 0; for (reg = 0; reg < 32; ++reg) { if ((!leaf_func_p && (call_used_regs[reg] - && (interrupt_func_p || signal_func_p))) + && (interrupt_func_p || signal_func_p || signalx_func_p))) || (regs_ever_live[reg] - && (!call_used_regs[reg] || interrupt_func_p || signal_func_p) + && (!call_used_regs[reg] || interrupt_func_p || signal_func_p || signalx_func_p) && ! (frame_pointer_needed && (reg == REG_Y || reg == (REG_Y+1))))) { @@ -562,13 +593,15 @@ HOST_WIDE_INT size; { int reg; + int task_s_func_p; int interrupt_func_p; int signal_func_p; + int signalx_func_p; int leaf_func_p; int main_p; int live_seq; int minimize; - + if (avr_naked_function_p (current_function_decl)) { fprintf (file, "/* prologue: naked */\n"); @@ -577,17 +610,44 @@ interrupt_func_p = interrupt_function_p (current_function_decl); signal_func_p = signal_function_p (current_function_decl); + signalx_func_p = signalx_function_p (current_function_decl); leaf_func_p = leaf_function_p (); main_p = MAIN_NAME_P (DECL_NAME (current_function_decl)); live_seq = sequent_regs_live (); minimize = (TARGET_CALL_PROLOGUES - && !interrupt_func_p && !signal_func_p && live_seq); + && !interrupt_func_p && !signal_func_p && !signalx_func_p && live_seq); last_insn_address = 0; jump_tables_size = 0; prologue_size = 0; fprintf (file, "/* prologue: frame size=%d */\n", size); - + + task_s_func_p = task_s_function_p (current_function_decl); + if (task_s_function_p (current_function_decl)) + fputs ("/* prologue: TASK */\n", file); + + if (signalx_func_p) + { + fprintf (file, ("\t" + AS1 (push,__tmp_reg__) CR_TAB + AS2 (in,__tmp_reg__,__SP_L__) CR_TAB + AS2 (sts,%s-0,__tmp_reg__) CR_TAB + AS2 (in,__tmp_reg__,__SP_H__) CR_TAB + AS2 (sts,%s-1,__tmp_reg__) CR_TAB + AS2 (mov,__tmp_reg__,r16) CR_TAB + AS2 (ldi,r16,hi8(%s-3)) CR_TAB + AS2 (out,__SP_H__,r16) CR_TAB + AS2 (ldi,r16,lo8(%s-3)) CR_TAB + AS2 (out,__SP_L__,r16) CR_TAB + AS2 (mov,r16,__tmp_reg__) CR_TAB + AS1 (push,__zero_reg__) CR_TAB + AS2 (in,__tmp_reg__,__SREG__) CR_TAB + AS1 (push,__tmp_reg__) CR_TAB + AS1 (clr,__zero_reg__) "\n"), + avr_init_stack,avr_init_stack,avr_init_stack,avr_init_stack); + prologue_size += 15; + } + if (interrupt_func_p) { fprintf (file,"\tsei\n"); @@ -605,16 +665,16 @@ } if (main_p) { - fprintf (file, ("\t" + fprintf (file, ("\t" AS2 (ldi,r28,lo8(%s - %d)) CR_TAB AS2 (ldi,r29,hi8(%s - %d)) CR_TAB AS2 (out,__SP_H__,r29) CR_TAB AS2 (out,__SP_L__,r28) "\n"), avr_init_stack, size, avr_init_stack, size); - + prologue_size += 4; } - else if (minimize && (frame_pointer_needed || live_seq > 6)) + else if (minimize && (frame_pointer_needed || live_seq > 6)) { fprintf (file, ("\t" AS2 (ldi, r26, lo8(%d)) CR_TAB @@ -623,9 +683,9 @@ fprintf (file, (AS2 (ldi, r30, pm_lo8(.L_%s_body)) CR_TAB AS2 (ldi, r31, pm_hi8(.L_%s_body)) CR_TAB) ,current_function_name, current_function_name); - + prologue_size += 4; - + if (AVR_MEGA) { fprintf (file, AS1 (jmp,__prologue_saves__+%d) "\n", @@ -644,15 +704,14 @@ { for (reg = 0; reg < 32; ++reg) { - if ((!leaf_func_p - && (call_used_regs[reg] - && (interrupt_func_p || signal_func_p) + if ( !task_s_func_p && (( !leaf_func_p && + ( call_used_regs[reg] && (interrupt_func_p || signal_func_p || signalx_func_p) && !(reg == TMP_REGNO || reg == ZERO_REGNO))) || (regs_ever_live[reg] && (!call_used_regs[reg] - || interrupt_func_p || signal_func_p) + || interrupt_func_p || signal_func_p || signalx_func_p) && ! (frame_pointer_needed - && (reg == REG_Y || reg == (REG_Y+1))))) + && (reg == REG_Y || reg == (REG_Y+1)))))) { fprintf (file, "\t" AS1 (push,%s) "\n", avr_regnames[reg]); ++prologue_size; @@ -661,12 +720,17 @@ if (frame_pointer_needed) { { + if (!task_s_func_p) + { + fprintf (file, "\t" + AS1 (push,r28) CR_TAB + AS1 (push,r29) "\n"); + prologue_size += 2; + } fprintf (file, "\t" - AS1 (push,r28) CR_TAB - AS1 (push,r29) CR_TAB AS2 (in,r28,__SP_L__) CR_TAB AS2 (in,r29,__SP_H__) "\n"); - prologue_size += 4; + prologue_size += 2; if (size) { fputs ("\t", file); @@ -680,6 +744,10 @@ { prologue_size += out_set_stack_ptr (file, 0, 0); } + else if (signalx_func_p) + { + prologue_size += out_set_stack_ptr (file, 0, 0); + } else { prologue_size += out_set_stack_ptr (file, -1, -1); @@ -701,6 +769,7 @@ int reg; int interrupt_func_p; int signal_func_p; + int signalx_func_p; int leaf_func_p; int main_p; int function_size; @@ -713,8 +782,15 @@ return; } + if (task_s_function_p (current_function_decl)) + { + fputs ("/* epilogue: task */\n", file); + return; + } + interrupt_func_p = interrupt_function_p (current_function_decl); signal_func_p = signal_function_p (current_function_decl); + signalx_func_p = signalx_function_p (current_function_decl); leaf_func_p = leaf_function_p (); main_p = MAIN_NAME_P (DECL_NAME (current_function_decl)); function_size = (INSN_ADDRESSES (INSN_UID (get_last_insn ())) @@ -722,8 +798,8 @@ function_size += jump_tables_size; live_seq = sequent_regs_live (); minimize = (TARGET_CALL_PROLOGUES - && !interrupt_func_p && !signal_func_p && live_seq); - + && !interrupt_func_p && !signal_func_p && !signalx_func_p && live_seq); + epilogue_size = 0; fprintf (file, "/* epilogue: frame size=%d */\n", size); if (main_p) @@ -745,7 +821,7 @@ AS2 (in , r29, __SP_H__) CR_TAB)); epilogue_size += 2; } - + if (AVR_MEGA) { fprintf (file, AS1 (jmp,__epilogue_restores__+%d) "\n", @@ -768,7 +844,7 @@ fputs ("\t", file); epilogue_size += out_adj_frame_ptr (file, -size); - if (interrupt_func_p | signal_func_p) + if (interrupt_func_p | signal_func_p | signalx_func_p) { epilogue_size += out_set_stack_ptr (file, -1, 0); } @@ -787,11 +863,11 @@ { if ((!leaf_func_p && (call_used_regs[reg] - && (interrupt_func_p || signal_func_p) + && (interrupt_func_p || signal_func_p || signalx_func_p) && !(reg == TMP_REGNO || reg == ZERO_REGNO))) || (regs_ever_live[reg] && (!call_used_regs[reg] - || interrupt_func_p || signal_func_p) + || interrupt_func_p || signal_func_p || signalx_func_p) && ! (frame_pointer_needed && (reg == REG_Y || reg == (REG_Y+1))))) { @@ -799,8 +875,23 @@ ++epilogue_size; } } - - if (interrupt_func_p | signal_func_p) + + if (signalx_func_p) + { + fprintf (file, ("\t" + AS1 (pop,__tmp_reg__) CR_TAB + AS2 (out,__SREG__,__tmp_reg__) CR_TAB + AS1 (pop,__zero_reg__) CR_TAB + AS2 (lds,__tmp_reg__,%s-1) CR_TAB + AS2 (out,__SP_H__,__tmp_reg__) CR_TAB + AS2 (lds,__tmp_reg__,%s-0) CR_TAB + AS2 (out,__SP_L__,__tmp_reg__) CR_TAB + AS1 (pop,__tmp_reg__) "\n"), + avr_init_stack,avr_init_stack); + epilogue_size += 8; + fprintf (file, "\treti\n"); + } + else if (interrupt_func_p | signal_func_p) { fprintf (file, "\t" AS1 (pop,__tmp_reg__) CR_TAB @@ -814,7 +905,7 @@ fprintf (file, "\tret\n"); ++epilogue_size; } - + fprintf (file, "/* epilogue end (size=%d) */\n", epilogue_size); fprintf (file, "/* function %s size %d (%d) */\n", current_function_name, prologue_size + function_size + epilogue_size, function_size); @@ -834,7 +925,7 @@ int strict; { enum reg_class r = NO_REGS; - + if (TARGET_ALL_DEBUG) { fprintf (stderr, "mode: (%s) %s %s %s %s:", @@ -907,7 +998,7 @@ fprintf (stderr, "legitimize_address mode: %s", GET_MODE_NAME(mode)); debug_rtx (oldx); } - + if (GET_CODE (oldx) == PLUS && REG_P (XEXP (oldx,0))) { @@ -1014,7 +1105,7 @@ /* Output X as assembler operand to file FILE */ - + void print_operand (file, x, code) FILE *file; @@ -1113,7 +1204,7 @@ rtx insn; { rtx set; - + switch (get_attr_cc (insn)) { case CC_NONE: @@ -1153,7 +1244,7 @@ if (set) cc_status.value1 = SET_SRC (set); break; - + case CC_CLOBBER: /* Insn doesn't leave CC in a usable state. */ CC_STATUS_INIT; @@ -1163,7 +1254,7 @@ if (set) { rtx src = SET_SRC (set); - + if (GET_CODE (src) == ASHIFTRT && GET_MODE (src) == QImode) { @@ -1206,14 +1297,14 @@ ? XEXP (x, 0) : x)); int cur_addr = INSN_ADDRESSES (INSN_UID (insn)); int jump_distance = cur_addr - dest_addr; - + if (-63 <= jump_distance && jump_distance <= 62) return 1; else if (-2046 <= jump_distance && jump_distance <= 2045) return 2; else if (AVR_MEGA) return 3; - + return 2; } @@ -1229,7 +1320,7 @@ int reverse; { RTX_CODE cond = reverse ? reverse_condition (GET_CODE (x)) : GET_CODE (x); - + switch (cond) { case GT: @@ -1242,7 +1333,7 @@ (AS1 (breq,_PC_+6) CR_TAB AS1 (brmi,_PC_+4) CR_TAB AS1 (jmp,%0))); - + else return (len == 1 ? (AS1 (breq,_PC_+2) CR_TAB AS1 (brge,%0)) : @@ -1458,7 +1549,7 @@ /* Update the summarizer variable CUM to advance past an argument in the argument list. */ - + void function_arg_advance (cum, mode, type, named) CUMULATIVE_ARGS *cum; /* current arg information */ @@ -1491,12 +1582,12 @@ rtx dest = operands[0]; rtx src = operands[1]; int *real_l = l; - + if (!l) l = &dummy; *l = 1; - + if (register_operand (dest, QImode)) { if (register_operand (src, QImode)) /* mov r,r */ @@ -1505,14 +1596,14 @@ return AS2 (out,%0,%1); else if (test_hard_reg_class (STACK_REG, src)) return AS2 (in,%0,%1); - + return AS2 (mov,%0,%1); } else if (CONSTANT_P (src)) { if (test_hard_reg_class (LD_REGS, dest)) /* ldi d,i */ return AS2 (ldi,%0,lo8(%1)); - + if (GET_CODE (src) == CONST_INT) { if (src == const0_rtx) /* mov r,L */ @@ -1562,7 +1653,7 @@ } } } - + /* Last resort, larger than loading from memory. */ *l = 4; return (AS2 (mov,__tmp_reg__,r31) CR_TAB @@ -1601,10 +1692,10 @@ rtx dest = operands[0]; rtx src = operands[1]; int *real_l = l; - + if (!l) l = &dummy; - + if (register_operand (dest, HImode)) { if (register_operand (src, HImode)) /* mov r,r */ @@ -1671,7 +1762,7 @@ return (AS2 (ldi,%A0,lo8(%1)) CR_TAB AS2 (ldi,%B0,hi8(%1))); } - + if (GET_CODE (src) == CONST_INT) { if (src == const0_rtx) /* mov r,L */ @@ -1754,7 +1845,7 @@ AS2 (mov,r31,__tmp_reg__)); } } - + /* Last resort, equal to loading from memory. */ *l = 6; return (AS2 (mov,__tmp_reg__,r31) CR_TAB @@ -1796,10 +1887,10 @@ rtx src = op[1]; rtx x = XEXP (src, 0); int dummy; - + if (!l) l = &dummy; - + if (CONSTANT_ADDRESS_P (x)) { if (io_address_p (x, 1)) @@ -1901,12 +1992,12 @@ { int disp = INTVAL (XEXP (base, 1)); int reg_base = true_regnum (XEXP (base, 0)); - + if (disp > MAX_LD_OFFSET (GET_MODE (src))) { if (REGNO (XEXP (base, 0)) != REG_Y) fatal_insn ("incorrect insn:",insn); - + if (disp <= 63 + MAX_LD_OFFSET (GET_MODE (src))) return *l = 4, (AS2 (adiw,r28,%o1-62) CR_TAB AS2 (ldd,%A0,Y+62) CR_TAB @@ -1925,7 +2016,7 @@ /* This is a paranoid case. LEGITIMIZE_RELOAD_ADDRESS must exclude it but I have this situation with extremal optimization options. */ - + *l = 4; if (reg_base == reg_dest) return (AS2 (adiw,r26,%o1) CR_TAB @@ -1946,7 +2037,7 @@ AS2 (ldd,%B0,%B1) CR_TAB AS2 (mov,%A0,__tmp_reg__)); } - + *l = 2; return (AS2 (ldd,%A0,%A1) CR_TAB AS2 (ldd,%B0,%B1)); @@ -1981,7 +2072,7 @@ return (AS2 (lds,%A0,%A1) CR_TAB AS2 (lds,%B0,%B1)); } - + fatal_insn ("unknown move insn:",insn); return ""; } @@ -2001,7 +2092,7 @@ if (!l) l = &tmp; - + if (reg_base > 0) { if (reg_base == REG_X) /* (R26) */ @@ -2057,7 +2148,7 @@ else if (GET_CODE (base) == PLUS) /* (R + i) */ { int disp = INTVAL (XEXP (base, 1)); - + if (disp > MAX_LD_OFFSET (GET_MODE (src))) { if (REGNO (XEXP (base, 0)) != REG_Y) @@ -2145,7 +2236,7 @@ AS2 (lds,%B0,%B1) CR_TAB AS2 (lds,%C0,%C1) CR_TAB AS2 (lds,%D0,%D1)); - + fatal_insn ("unknown move insn:",insn); return ""; } @@ -2162,10 +2253,10 @@ int reg_base = true_regnum (base); int reg_src = true_regnum (src); int tmp; - + if (!l) l = &tmp; - + if (CONSTANT_ADDRESS_P (base)) return *l=8,(AS2 (sts,%A0,%A1) CR_TAB AS2 (sts,%B0,%B1) CR_TAB @@ -2318,10 +2409,10 @@ rtx dest = operands[0]; rtx src = operands[1]; int *real_l = l; - + if (!l) l = &dummy; - + if (register_operand (dest, VOIDmode)) { if (register_operand (src, VOIDmode)) /* mov r,r */ @@ -2372,7 +2463,7 @@ AS2 (ldi,%C0,hlo8(%1)) CR_TAB AS2 (ldi,%D0,hhi8(%1))); } - + if (GET_CODE (src) == CONST_INT) { const char *const clr_op0 = @@ -2462,7 +2553,7 @@ } } } - + /* Last resort, better than loading from memory. */ *l = 10; return (AS2 (mov,__tmp_reg__,r31) CR_TAB @@ -2511,7 +2602,7 @@ if (!l) l = &dummy; - + if (CONSTANT_ADDRESS_P (x)) { if (io_address_p (x, 1)) @@ -2901,7 +2992,7 @@ else if (GET_CODE (operands[2]) == MEM) { rtx op_mov[10]; - + op[3] = op_mov[0] = tmp_reg_rtx; op_mov[1] = op[2]; @@ -2969,11 +3060,11 @@ default: *len = 1; return AS1 (clr,%0); - + case 1: *len = 1; return AS1 (lsl,%0); - + case 2: *len = 2; return (AS1 (lsl,%0) CR_TAB @@ -3063,7 +3154,7 @@ if (!len) len = &k; - + switch (INTVAL (operands[2])) { case 4: @@ -3314,10 +3405,10 @@ { int k; int *t = len; - + if (!len) len = &k; - + switch (INTVAL (operands[2])) { case 8: @@ -3490,7 +3581,7 @@ int ldi_ok = test_hard_reg_class (LD_REGS, operands[0]); int k; int *t = len; - + if (!len) len = &k; @@ -3653,10 +3744,10 @@ { int k; int *t = len; - + if (!len) len = &k; - + switch (INTVAL (operands[2])) { case 8: @@ -3686,7 +3777,7 @@ AS2 (mov,%B0,%C1) CR_TAB AS2 (mov,%A0,%B1)); } - + case 16: { int reg0 = true_regnum (operands[0]); @@ -3774,7 +3865,7 @@ if (!len) len = &k; - + switch (INTVAL (operands[2])) { default: @@ -3794,7 +3885,7 @@ return (AS1 (lsr,%0) CR_TAB AS1 (lsr,%0) CR_TAB AS1 (lsr,%0)); - + case 4: if (test_hard_reg_class (LD_REGS, operands[0])) { @@ -3807,7 +3898,7 @@ AS1 (lsr,%0) CR_TAB AS1 (lsr,%0) CR_TAB AS1 (lsr,%0)); - + case 5: if (test_hard_reg_class (LD_REGS, operands[0])) { @@ -3822,7 +3913,7 @@ AS1 (lsr,%0) CR_TAB AS1 (lsr,%0) CR_TAB AS1 (lsr,%0)); - + case 6: if (test_hard_reg_class (LD_REGS, operands[0])) { @@ -3839,7 +3930,7 @@ AS1 (lsr,%0) CR_TAB AS1 (lsr,%0) CR_TAB AS1 (lsr,%0)); - + case 7: *len = 3; return (AS1 (rol,%0) CR_TAB @@ -3849,7 +3940,7 @@ } else if (CONSTANT_P (operands[2])) fatal_insn ("internal compiler error. Incorrect shift:", insn); - + out_shift_with_cnt (AS1 (lsr,%0), insn, operands, len, 1); return ""; @@ -3872,7 +3963,7 @@ if (!len) len = &k; - + switch (INTVAL (operands[2])) { case 4: @@ -4122,10 +4213,10 @@ { int k; int *t = len; - + if (!len) len = &k; - + switch (INTVAL (operands[2])) { case 8: @@ -4144,9 +4235,9 @@ return (AS1 (clr,%D0) CR_TAB AS2 (mov,%C0,%D1) CR_TAB AS2 (mov,%B0,%C1) CR_TAB - AS2 (mov,%A0,%B1)); + AS2 (mov,%A0,%B1)); } - + case 16: { int reg0 = true_regnum (operands[0]); @@ -4173,7 +4264,7 @@ AS1 (clr,%C0) CR_TAB AS1 (clr,%D0)); } - + case 24: if (true_regnum (operands[0]) != true_regnum (operands[1]) + 3) return *len = 4, (AS2 (mov,%A0,%D1) CR_TAB @@ -4453,7 +4544,7 @@ && REG_P (XEXP (XEXP (tem, 0), 0)) && reg_overlap_mentioned_p (reg, XEXP (XEXP (tem, 0), 0))) return 0; - if (call_used_regs[REGNO (reg)]) + if (call_used_regs[REGNO (reg)]) return 1; } @@ -4494,7 +4585,7 @@ } /* Sets section name for declaration DECL */ - + void unique_section (decl, reloc) tree decl; @@ -4514,7 +4605,7 @@ else prefix = ".text"; } - else + else abort (); if (flag_function_sections) @@ -4640,9 +4731,11 @@ /* Valid attributes: progmem - put data to program memory; signal - make a function to be hardware interrupt. After function - prologue interrupts are disabled; + signalx - make a function to be hardware interrupt. After function + prologue interrupts are disabled, stack is set to __stack - 3; interrupt - make a function to be hardware interrupt. After function prologue interrupts are enabled; + task - same as naked, but with stack frame setup at entry naked - don't generate function prologue/epilogue and `ret' command. Only `progmem' attribute valid for type. */ @@ -4652,8 +4745,10 @@ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ { "progmem", 0, 0, false, false, false, avr_handle_progmem_attribute }, { "signal", 0, 0, true, false, false, avr_handle_fndecl_attribute }, + { "signalx", 0, 0, true, false, false, avr_handle_fndecl_attribute }, { "interrupt", 0, 0, true, false, false, avr_handle_fndecl_attribute }, { "naked", 0, 0, true, false, false, avr_handle_fndecl_attribute }, + { "task", 0, 0, true, false, false, avr_handle_fndecl_attribute }, { NULL, 0, 0, false, false, false, NULL } }; @@ -4747,12 +4842,12 @@ if (NULL_TREE != lookup_attribute ("progmem", TYPE_ATTRIBUTES (a))) return 1; - + return 0; } /* Encode section information about tree DECL */ - + void encode_section_info (decl) tree decl; @@ -4767,7 +4862,7 @@ DECL_SECTION_NAME (decl) = build_string (strlen (dsec), dsec); TREE_READONLY (decl) = 1; } -} +} /* Outputs to the stdio stream FILE some appropriate text to go at the start of an assembler file. */ @@ -4781,11 +4876,11 @@ fputs ("__SREG__ = 0x3f\n" "__SP_H__ = 0x3e\n" "__SP_L__ = 0x3d\n", file); - - fputs ("__tmp_reg__ = 0\n" + + fputs ("__tmp_reg__ = 0\n" "__zero_reg__ = 1\n" "_PC_ = 2\n", file); - + commands_in_file = 0; commands_in_prologues = 0; commands_in_epilogues = 0; @@ -4855,7 +4950,7 @@ 1,0, 32,33,34,35 }; - + const int *order = (TARGET_ORDER_1 ? order_1 : TARGET_ORDER_2 ? order_2 : order_0); @@ -5021,7 +5116,7 @@ rtx first_insn; { rtx insn, pattern; - + for (insn = first_insn; insn; insn = NEXT_INSN (insn)) { if (! (GET_CODE (insn) == INSN @@ -5041,7 +5136,7 @@ if (GET_CODE (SET_SRC (pattern)) == COMPARE) { /* Now we work under compare insn */ - + pattern = SET_SRC (pattern); if (true_regnum (XEXP (pattern,0)) >= 0 && true_regnum (XEXP (pattern,1)) >= 0 ) @@ -5124,10 +5219,10 @@ tree func ATTRIBUTE_UNUSED; { unsigned int offs; - + if (TYPE_MODE (type) != BLKmode) return avr_libcall_value (TYPE_MODE (type)); - + offs = int_size_in_bytes (type); if (offs < 2) offs = 2; @@ -5135,7 +5230,7 @@ offs = GET_MODE_SIZE (SImode); else if (offs > GET_MODE_SIZE (SImode) && offs < GET_MODE_SIZE (DImode)) offs = GET_MODE_SIZE (DImode); - + return gen_rtx (REG, BLKmode, RET_REGISTER + 2 - offs); } @@ -5158,7 +5253,7 @@ } n<<=1; } - return 0; + return 0; } @@ -5296,7 +5391,7 @@ int tmp; if (!len) len = &tmp; - + if (GET_CODE (operands[1]) == CONST_INT) { int val = INTVAL (operands[1]); @@ -5416,7 +5511,7 @@ rtx scratch; { if ((interrupt_function_p (current_function_decl) - || signal_function_p (current_function_decl)) + || signal_function_p (current_function_decl) || signalx_function_p (current_function_decl) ) && leaf_function_p ()) { int first_reg = true_regnum (scratch);