public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Georg-Johann Lay <avr@gjlay.de>
To: Denis Chertykov <chertykov@gmail.com>
Cc: gcc-patches@gcc.gnu.org,
	 "Eric B. Weddington" <eric.weddington@atmel.com>,
	Anatoly Sokolov <aesok@post.ru>,
	Ian Lance Taylor <iant@google.com>
Subject: Re: [Patch, AVR]: PR49313, fix PR29524
Date: Wed, 15 Jun 2011 11:59:00 -0000	[thread overview]
Message-ID: <4DF8916D.8010006@gjlay.de> (raw)
In-Reply-To: <BANLkTimwLi6RXin6LM7F1Ave1umvatrtQw@mail.gmail.com>

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.

CCed Ian Taylor as libgcc maintainer (assuming this is his preferred
address).

Unfortunately, the original mail could not yet be delivered to
gcc-patches; I got a message reading something like (backtranslated to
en):

Subject: [Patch, AVR]: PR49313, fix PR29524
Sender: avr@gjlay.de

Attention: Mail could not be delivered since 1 hour.

Following receiver is affected:

gcc-patches@gcc.gnu.org
   Error    : 452 4.0.0 Insufficient system storage
   Explanation: host gcc.gnu.org [209.132.180.131] said: Message
denied temporarily
   Last try: Wednesday, 15. Juni 2011 12:47:22 +0200 (MEST)

I never got such message, and the patch is not really big.

As I cannot backlink to the original message :-(
copy-pasteing the relevant change inline:

--
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.


Index: gcc/longlong.h
===================================================================
--- gcc/longlong.h	(Revision 175036)
+++ gcc/longlong.h	(Arbeitskopie)
@@ -250,6 +250,12 @@ UDItype __umulsidi3 (USItype, USItype);
 #define COUNT_LEADING_ZEROS_0 32
 #endif

+#if defined (__AVR__) && W_TYPE_SIZE == 32
+#define count_leading_zeros(COUNT,X)  ((COUNT) = __builtin_clzl (X))
+#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctzl (X))
+#define COUNT_LEADING_ZEROS_0 32
+#endif /* defined (__AVR__) && W_TYPE_SIZE == 32 */
+
 #if defined (__CRIS__) && __CRIS_arch_version >= 3
 #define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X))
 #if __CRIS_arch_version >= 8

  reply	other threads:[~2011-06-15 11:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16  6:53 Georg-Johann Lay
2011-06-15 10:46 ` Denis Chertykov
2011-06-15 11:59   ` Georg-Johann Lay [this message]
2011-06-16 10:00   ` Georg-Johann Lay
2011-06-16 19:17 ` Richard Henderson
2011-06-17  9:41   ` Georg-Johann Lay
2011-06-17 17:26     ` Richard Henderson
2011-06-17 17:32       ` Georg-Johann Lay
  -- strict thread matches above, loose matches on Subject: below --
2011-06-16  6:49 Georg-Johann Lay
2011-06-16  9:39 ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DF8916D.8010006@gjlay.de \
    --to=avr@gjlay.de \
    --cc=aesok@post.ru \
    --cc=chertykov@gmail.com \
    --cc=eric.weddington@atmel.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iant@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).