public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aldot at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/24929] long long shift/mask operations should be better optimized
Date: Thu, 04 Jun 2009 18:18:00 -0000 [thread overview]
Message-ID: <20090604181812.15420.qmail@sourceware.org> (raw)
In-Reply-To: <bug-24929-11148@http.gcc.gnu.org/bugzilla/>
------- Comment #7 from aldot at gcc dot gnu dot org 2009-06-04 18:18 -------
(In reply to comment #5)
> movzbl 18(%esp), %eax
>
> could be used in this particular case.
4.3.3 onward seem to do that. Fixed?
$ for i in 4.2 4.3 4.4 4.5.orig-HEAD;do printf "### %s\n" $(gcc-$i
-dumpversion) ; gcc-$i -march=i386 -O2 -S -o- pr24929.c -fomit-frame-pointer |
awk 'BEGIN{yep=0;}/^f:/{yep=1;}/^\./{yep=0;}{if (yep){print $0}}';done
### 4.2.4
f:
pushl %edi
pushl %esi
pushl %ebx
movl 16(%esp), %esi
movl 20(%esp), %edi
movl 24(%esp), %ecx
movl 28(%esp), %ebx
movl %ebx, %ecx
xorl %ebx, %ebx
shrl $16, %ecx
movzbl %cl,%eax
xorl %edx, %edx
shldl $8, %esi, %edi
sall $8, %esi
orl %esi, %eax
orl %edi, %edx
popl %ebx
popl %esi
popl %edi
ret
.size f, .-f
.p2align 2,,3
### 4.3.3
f:
movl 4(%esp), %edx
movl 8(%esp), %ecx
shldl $8, %edx, %ecx
sall $8, %edx
movzbl 18(%esp), %eax
orl %edx, %eax
movl %ecx, %edx
ret
.size f, .-f
.p2align 2,,3
### 4.4.0
f:
movl 4(%esp), %edx
movl 8(%esp), %ecx
shldl $8, %edx, %ecx
sall $8, %edx
movzbl 18(%esp), %eax
orl %edx, %eax
movl %ecx, %edx
ret
.size f, .-f
.p2align 2,,3
### 4.5.0
f:
movl 4(%esp), %edx
movl 8(%esp), %ecx
shldl $8, %edx, %ecx
sall $8, %edx
movzbl 18(%esp), %eax
orl %edx, %eax
movl %ecx, %edx
ret
.size f, .-f
.p2align 2,,3
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24929
next prev parent reply other threads:[~2009-06-04 18:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-18 2:30 [Bug middle-end/24929] New: " tkho at ucla dot edu
2005-11-18 2:35 ` [Bug middle-end/24929] " tkho at ucla dot edu
2006-02-02 18:14 ` ian at airs dot com
2006-02-02 18:16 ` pinskia at gcc dot gnu dot org
2006-06-27 7:39 ` ian at airs dot com
2006-06-27 13:02 ` uros at kss-loka dot si
2006-09-20 22:20 ` steven at gcc dot gnu dot org
2009-06-04 18:18 ` aldot at gcc dot gnu dot org [this message]
[not found] <bug-24929-4@http.gcc.gnu.org/bugzilla/>
2021-08-29 22:39 ` pinskia at gcc dot gnu.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=20090604181812.15420.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: 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).