From: john@feith.com (John Wehle)
To: egcs@cygnus.com
Subject: Possible CSE quirk involving SUBREG on the i386
Date: Mon, 29 Jun 1998 22:34:00 -0000 [thread overview]
Message-ID: <199806300534.BAA27602@jwlab.FEITH.COM> (raw)
Compiling:
unsigned short c;
int
func(unsigned short a)
{
unsigned short b;
b = a;
c = b;
return b;
}
for the i386 using egcs current with -O -S yields:
_func:
pushl %ebp
movl %esp,%ebp
movl 8(%ebp),%eax
movl %eax,%edx
movw %ax,_c
movzwl %dx,%eax
leave
ret
Which is interesting since I expected:
_func:
pushl %ebp
movl %esp,%ebp
movl 8(%ebp),%eax
movw %ax,_c
movzwl %ax,%eax
leave
ret
The use of %edx seems wasteful.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------
next reply other threads:[~1998-06-29 22:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-29 22:34 John Wehle [this message]
1998-06-30 4:50 ` Jeffrey A Law
1998-06-30 15:15 ` Richard Henderson
1998-07-01 0:54 ` David S. Miller
1998-07-01 0:54 ` Richard Henderson
1998-07-01 3:42 ` Jeffrey A Law
1998-07-01 0:54 ` David S. Miller
1998-07-01 0:54 ` Jeffrey A Law
1999-03-09 1:09 ` Jeffrey A Law
1999-03-31 23:46 ` Jeffrey A Law
1998-06-30 14:46 John Wehle
1998-06-30 14:08 ` Jeffrey A Law
1998-07-01 6:44 ` Richard Henderson
1998-07-01 22:54 ` Jeffrey A Law
1998-07-01 20:15 John Wehle
1998-07-01 20:15 ` Richard Henderson
1998-07-01 20:15 ` Jeffrey A Law
1998-07-02 0:53 John Wehle
1998-07-07 5:29 ` Jeffrey A Law
1998-07-10 20:04 John Wehle
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=199806300534.BAA27602@jwlab.FEITH.COM \
--to=john@feith.com \
--cc=egcs@cygnus.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).