From 0ad8bb3bc0edddefcd332a5a2cf90c078c575284 Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Thu, 16 Jun 2011 09:06:44 +0000 Subject: re PR target/49313 (Inefficient libgcc implementations for avr) gcc/ PR target/49313 PR target/29524 * longlong.h: Add AVR support: (count_leading_zeros): New macro. (count_trailing_zeros): New macro. (COUNT_LEADING_ZEROS_0): New macro. * config/avr/t-avr (LIB1ASMFUNCS): Add _ffssi2, _ffshi2, _loop_ffsqi2, _ctzsi2, _ctzhi2, _clzdi2, _clzsi2, _clzhi2, _paritydi2, _paritysi2, _parityhi2, _popcounthi2,_popcountsi2, _popcountdi2, _popcountqi2, _bswapsi2, _bswapdi2, _ashldi3, _ashrdi3, _lshrdi3 (LIB2FUNCS_EXCLUDE): Add _clz. * config/avr/libgcc.S (XCALL): Move up in file. (XJMP): New C Macro. (DEFUN): New asm macro. (ENDF): New asm macro. (__ffssi2): New function. (__ffshi2): New function. (__loop_ffsqi2): New function. (__ctzsi2): New function. (__ctzhi2): New function. (__clzdi2): New function. (__clzsi2): New function. (__clzhi2): New function. (__paritydi2): New function. (__paritysi2): New function. (__parityhi2): New function. (__popcounthi2): New function. (__popcountsi2): New function. (__popcountdi2): New function. (__popcountqi2): New function. (__bswapsi2): New function. (__bswapdi2): New function. (__ashldi3): New function. (__ashrdi3): New function. (__lshrdi3): New function. Fix suspicous lines. libgcc/ PR target/49313 PR target/29524 * config/avr/t-avr: Fix line endings. (intfuncs16): Remove _ffsXX2, _clzXX2, _ctzXX2, _popcountXX2, _parityXX2. From-SVN: r175097 --- gcc/config/avr/t-avr | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'gcc/config/avr/t-avr') diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr index 18769eb..4186178 100644 --- a/gcc/config/avr/t-avr +++ b/gcc/config/avr/t-avr @@ -24,12 +24,10 @@ driver-avr.o: $(srcdir)/config/avr/driver-avr.c \ avr-devices.o: $(srcdir)/config/avr/avr-devices.c \ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - avr-c.o: $(srcdir)/config/avr/avr-c.c \ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - LIB1ASMSRC = avr/libgcc.S @@ -52,7 +50,30 @@ LIB1ASMFUNCS = \ _copy_data \ _clear_bss \ _ctors \ - _dtors + _dtors \ + _ffssi2 \ + _ffshi2 \ + _loop_ffsqi2 \ + _ctzsi2 \ + _ctzhi2 \ + _clzdi2 \ + _clzsi2 \ + _clzhi2 \ + _paritydi2 \ + _paritysi2 \ + _parityhi2 \ + _popcounthi2 \ + _popcountsi2 \ + _popcountdi2 \ + _popcountqi2 \ + _bswapsi2 \ + _bswapdi2 \ + _ashldi3 \ + _ashrdi3 \ + _lshrdi3 + +LIB2FUNCS_EXCLUDE = \ + _clz # We do not have the DF type. # Most of the C functions in libgcc2 use almost all registers, @@ -216,8 +237,8 @@ MULTILIB_MATCHES = \ mmcu?avr51=mmcu?at90can128 \ mmcu?avr51=mmcu?at90usb1286 \ mmcu?avr51=mmcu?at90usb1287 \ - mmcu?avr6=mmcu?atmega2560 \ - mmcu?avr6=mmcu?atmega2561 + mmcu?avr6=mmcu?atmega2560 \ + mmcu?avr6=mmcu?atmega2561 MULTILIB_EXCEPTIONS = -- cgit v1.1