public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wvangulik at xs4all dot nl" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/29524] [4.2/4.3 Regression] Too much RAM used: __clz_tab[] linked Date: Wed, 24 Oct 2007 11:16:00 -0000 [thread overview] Message-ID: <20071024111648.17609.qmail@sourceware.org> (raw) In-Reply-To: <bug-29524-10671@http.gcc.gnu.org/bugzilla/> ------- Comment #13 from wvangulik at xs4all dot nl 2007-10-24 11:16 ------- (In reply to comment #10) Something like this is smaller, faster and works for all registers (no need for LD_regs). And could easily be writtin in to a insn: ; rOut: output register ; rIn: input register ; rIn, Z, N are clobbered, C is set clzqi_init: clr rOut ; clear to zero neg rOut ; make -1, and set C (C used for garanteed termination) clzqi_loop1: inc rOut ; inc output (C not touched) rol rIn ; push MSB into C brcc clz_loop1 ; if C is cleared (msb was not set), continue loop clzqi_end: A clz on a hi/si/di would be almost the same. Extend the "rol rIn" to a rol per sub_reg. Of course there can be speed optimisation for hi/si/di, but for the AVR the optimizer is in most cases set for size. A library call to this is shorter but it may impose extra mov instruction to fit the register constraints. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29524
next prev parent reply other threads:[~2007-10-24 11:16 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-10-20 12:26 [Bug c/29524] New: " batt at develer dot com 2006-10-20 14:40 ` [Bug middle-end/29524] " rguenth at gcc dot gnu dot org 2006-10-20 15:59 ` [Bug other/29524] " pinskia at gcc dot gnu dot org 2006-10-20 16:19 ` pinskia at gcc dot gnu dot org 2006-10-23 19:09 ` batt at develer dot com 2006-11-07 11:10 ` batt at develer dot com 2006-12-03 21:41 ` [Bug target/29524] [4.2/4.3 Regression] " pinskia at gcc dot gnu dot org 2007-02-19 20:33 ` mmitchel at gcc dot gnu dot org 2007-04-02 21:47 ` giovannibajo at libero dot it 2007-05-14 21:32 ` mmitchel at gcc dot gnu dot org 2007-07-23 22:57 ` eweddington at cso dot atmel dot com 2007-07-23 22:58 ` eweddington at cso dot atmel dot com 2007-09-08 21:44 ` anrp at mit dot edu 2007-09-08 21:48 ` anrp at mit dot edu 2007-10-09 19:30 ` mmitchel at gcc dot gnu dot org 2007-10-24 11:16 ` wvangulik at xs4all dot nl [this message] 2007-11-30 14:59 ` wvangulik at xs4all dot nl 2007-12-22 17:15 ` j at uriah dot heep dot sax dot de 2007-12-23 20:15 ` wvangulik at xs4all dot nl 2008-01-18 18:16 ` pmarques at grupopie dot com 2008-02-01 16:58 ` jsm28 at gcc dot gnu dot org 2008-05-19 20:47 ` [Bug target/29524] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org 2009-03-31 19:48 ` [Bug target/29524] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org 2009-08-04 12:39 ` rguenth at gcc dot gnu dot org 2010-05-22 18:23 ` [Bug target/29524] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
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=20071024111648.17609.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).