aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr/libgcc.S
diff options
context:
space:
mode:
authorMarek Michalkiewicz <marekm@linux.org.pl>2000-07-03 18:51:38 +0200
committerDenis Chertykov <denisc@gcc.gnu.org>2000-07-03 20:51:38 +0400
commitc4984bad36ef142b95331ca1552b7498fa78f019 (patch)
tree36cc90f578a0749cf42c94fbbd73a418032a02e2 /gcc/config/avr/libgcc.S
parent2e6377216286353f8c6fc8b1ecf7dab9e225ce00 (diff)
downloadgcc-c4984bad36ef142b95331ca1552b7498fa78f019.zip
gcc-c4984bad36ef142b95331ca1552b7498fa78f019.tar.gz
gcc-c4984bad36ef142b95331ca1552b7498fa78f019.tar.bz2
avr.c (out_adj_frame_ptr): Make "frame pointer change too big for -mtiny-stack" a warning, if larger than 63.
* config/avr/avr.c (out_adj_frame_ptr): Make "frame pointer change too big for -mtiny-stack" a warning, if larger than 63. (out_set_stack_ptr): Change the logic so -mno-interrupts is always safe to use on possible future devices. (function_prologue): Write SPH before SPL, for consistency. If interrupt_func_p true, we know we have enabled interrupts. (avr_num_arg_regs): New function. Round up to even number of bytes if no -mpack-args or if calling a libgcc function. (function_arg, function_arg_advance): Use it. (output_movsisf, ashlsi3_out, ashrsi3_out, lshrsi3_out): Output "movw" if available. (out_tsthi, out_tstsi, ashlqi3_out, lshrqi3_out): Change uses of TEST_HARD_REG_CLASS macro to test_hard_reg_class function. (asm_output_section_name): Add blanks for consistent output. (encode_section_info): Set TREE_READONLY for progmem data to avoid gas warnings about changed section attributes. (avr_hard_regno_mode_ok): Force non-QImode data to start in even numbered registers on devices with "movw". * config/avr/avr.h (MASK_*): Define bits for target_flags. (TARGET_SWITCHES): Mark help strings for translation. Add new -mpack-args and -menhanced switches. (TARGET_OPTIONS): Mark help strings for translation. (progmem_section): Add section attributes. * config/avr/avr.md (*movhi, call_insn, call_value_insn): Output "movw" if available. (mulqi3, mulqihi3, umulqihi3, mulhi3, *tablejump_enh): New patterns. * config/avr/libgcc.S (_mulqi3, _divqi3): Update to the new call convention (arguments aligned on even registers). (_cleanup, _exit): Make weak symbols libc can override. From-SVN: r34847
Diffstat (limited to 'gcc/config/avr/libgcc.S')
-rw-r--r--gcc/config/avr/libgcc.S16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/config/avr/libgcc.S b/gcc/config/avr/libgcc.S
index 00aa50b..e5ecbff 100644
--- a/gcc/config/avr/libgcc.S
+++ b/gcc/config/avr/libgcc.S
@@ -39,7 +39,7 @@ Boston, MA 02111-1307, USA. */
*******************************************************/
#if defined (Lmulqi3)
-#define r_arg2 r25 /* multiplicand */
+#define r_arg2 r22 /* multiplicand */
#define r_arg1 r24 /* multiplier */
#define r_res __tmp_reg__ /* result */
@@ -201,8 +201,8 @@ __mulsi3_exit:
Division 8 / 8 => (result + remainder)
*******************************************************/
#define r_rem r26 /* remainder */
-#define r_arg1 r25 /* dividend */
-#define r_arg2 r24 /* divisor */
+#define r_arg1 r24 /* dividend */
+#define r_arg2 r22 /* divisor */
#define r_cnt r27 /* loop count */
#if defined (Lumodqi3)
@@ -272,8 +272,7 @@ __divqi3_1:
sbrc __tmp_reg__,7
neg r_arg1 ; correct result sign
__divqi3_exit:
- mov r24,r_arg1 ; put result to return register
- ret
+ ret ; result already in r24 (r_arg1)
.endfunc
#endif /* defined (Ldivqi3) */
@@ -434,8 +433,6 @@ _umodsi3_ret:
mov r24,r_remHL
mov r23,r_remH
mov r22,r_remL
- .global _cleanup
-_cleanup:
ret
.endfunc
#endif /* defined (Lumodsi3) */
@@ -630,9 +627,12 @@ __epilogue_restores__:
#endif /* defined (Lepilogue) */
#ifdef L__exit
- .global _exit
+ .weak _exit
.func _exit
_exit:
rjmp _exit
+ .weak _cleanup
+_cleanup:
+ ret
.endfunc
#endif