public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gilles dot chanteperdrix at xenomai dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/38674] When storing in a register the address of a value contained in the same register, gcc 4.3.2 on ARM clobbers the register before saving its content on the stack.
Date: Mon, 05 Jan 2009 15:21:00 -0000	[thread overview]
Message-ID: <20090105152145.7940.qmail@sourceware.org> (raw)
In-Reply-To: <bug-38674-17134@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from gilles dot chanteperdrix at xenomai dot org  2009-01-05 15:21 -------
The following, even simpler test case:

unsigned long long f(unsigned long long ull)
{
        register unsigned long long *__r0 __asm__ ("r0") = &ull;
        __asm__ __volatile__ ("" : "+r" (__r0));
        return * __r0;
}

gives the same warning, and the following assembly code:

00000000 <f>:
   0:   e24dd008        sub     sp, sp, #8      ; 0x8
   4:   e28d0008        add     r0, sp, #8      ; 0x8
   8:   e16000f8        strd    r0, [r0, #-8]!
   c:   e8900003        ldm     r0, {r0, r1}
  10:   e28dd008        add     sp, sp, #8      ; 0x8
  14:   e12fff1e        bx      lr


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38674


  reply	other threads:[~2009-01-05 15:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-30 16:14 [Bug regression/38674] New: optimization bug gilles dot chanteperdrix at xenomai dot org
2009-01-05 15:21 ` gilles dot chanteperdrix at xenomai dot org [this message]
2009-03-16 23:38 ` [Bug middle-end/38674] When storing in a register the address of a value contained in the same register, gcc 4.3.2 on ARM clobbers the register before saving its content on the stack rearnsha at gcc dot gnu dot org
2009-03-16 23:39 ` rearnsha at gcc dot gnu dot org
     [not found] <bug-38674-4@http.gcc.gnu.org/bugzilla/>
2015-02-19 11:34 ` cbaylis 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=20090105152145.7940.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).