public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: jakub@gcc.gnu.org To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, kelleycook@comcast.net, nobody@gcc.gnu.org Subject: Re: target/6142: sil, dil, spl, bpl are being used in ia32 compiles Date: Wed, 03 Apr 2002 10:01:00 -0000 [thread overview] Message-ID: <20020403180150.23662.qmail@sources.redhat.com> (raw) Synopsis: sil, dil, spl, bpl are being used in ia32 compiles State-Changed-From-To: open->analyzed State-Changed-By: jakub State-Changed-When: Wed Apr 3 10:01:49 2002 State-Changed-Why: Reduced into: /* { dg-options "-O2 -frename-registers" } */ typedef union { struct { unsigned char l, h; } b; unsigned int d; } A; typedef struct { A b0, b1, b2, b3, b4, b5; } B; static B b; extern unsigned char *x; unsigned int y; unsigned char foo (unsigned int); static inline unsigned short bar (void) { unsigned short w; w = x [b.b0.d & y]; b.b0.b.l++; w += x [b.b0.d & y] << 8; b.b0.b.l++; return w; } static inline unsigned char baz (unsigned int a) { return foo (a); } void __attribute__ ((noinline)) die (int x) { switch (x) { default: b.b5.d = bar (); break; case 0: __asm__ ("movb %2, %1" : "=g" (b.b1.b.h), "=a" (b.b1.b.l) : "r" (b.b2.b.h), "0" (b.b1.b.h)); break; case 2: __asm__ ("movb %2, %1" : "=g" (b.b1.b.h), "=a" (b.b1.b.l) : "r" (b.b3.b.h), "0" (b.b1.b.h)); break; case 5: __asm__ ("movb %2, %1" : "=g" (b.b1.b.h), "=a" (b.b1.b.l) : "r" (b.b4.b.l), "0" (b.b1.b.h)); break; case 6: __asm__ ("movb %2, %1" : "=g" (b.b1.b.h), "=a" (b.b1.b.l) : "r" (baz (b.b4.d)), "0" (b.b1.b.h)); break; } } int main (void) { die (6); return 0; } The problem is in -frename-registers which decides to put what was formely in %al into %sil. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6142
next reply other threads:[~2002-04-03 18:01 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-04-03 10:01 jakub [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-05-20 9:26 kelley.r.cook 2002-04-03 10:41 jakub 2002-04-02 17:36 kelleycook
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=20020403180150.23662.qmail@sources.redhat.com \ --to=jakub@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-gnats@gcc.gnu.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=kelleycook@comcast.net \ --cc=nobody@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).