This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, AVR]: PR49313, fix PR29524


Denis Chertykov schrieb:
> 2011/6/15 Georg-Johann Lay <avr@gjlay.de>:
>> This is a patch that implements some libgcc functions in assembler.
>> The functions are used only very seldom but if, they lead to an
>> unpleasant waste of resource. For example, some SF functions
>> eventually lead to __clz_tab being dragged in (PR29524).
>>
>> This patch avoids that by straight forward assembler implementation of
>> functions that are easy to implement.
>>
>> Tested without regression. Moreover, I tested functions in some
>> self-written code against the old C-implementation. HI/QI functions
>> tested for all possible inputs.
>>
> 
> Approved for AVR.
> May be you need another approval for longlong.h
> 
> Denis.

Committed original Version from

http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01200.html

together with the following corrigendum:

--- config/avr/libgcc.S (Revision 175097)
+++ config/avr/libgcc.S (Arbeitskopie)
@@ -1241,7 +1241,7 @@ ENDF __bswapdi2
 ;; r25:r18 = ashr64 (r25:r18, r17:r16)
 DEFUN __ashrdi3
     push r16
-    andi r16, 31
+    andi r16, 63
     breq 2f
 1:  asr  r25
     ror  r24
@@ -1263,7 +1263,7 @@ ENDF __ashrdi3
 ;; r25:r18 = lshr64 (r25:r18, r17:r16)
 DEFUN __lshrdi3
     push r16
-    andi r16, 31
+    andi r16, 63
     breq 2f
 1:  lsr  r25
     ror  r24
@@ -1285,7 +1285,7 @@ ENDF __lshrdi3
 ;; r25:r18 = ashl64 (r25:r18, r17:r16)
 DEFUN __ashldi3
     push r16
-    andi r16, 31
+    andi r16, 63
     breq 2f
 1:  lsl  r18
     rol  r19

Johann


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]