public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Roger Sayle <roger@eyesopen.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: target/8087: sparc-sun-solaris2.7 C testsuite failures in execute/20020720-1.c w/-m64 or on sparcv9/sparc64 Date: Mon, 07 Oct 2002 11:26:00 -0000 [thread overview] Message-ID: <20021007182601.9935.qmail@sources.redhat.com> (raw) The following reply was made to PR target/8087; it has been noted by GNATS. From: Roger Sayle <roger@eyesopen.com> To: "David S. Miller" <davem@redhat.com> Cc: <davem@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, <ghazi@caip.rutgers.edu>, <rth@redhat.com>, <jakub@redhat.com>, <gcc-gnats@gcc.gnu.org> Subject: Re: target/8087: sparc-sun-solaris2.7 C testsuite failures in execute/20020720-1.c w/-m64 or on sparcv9/sparc64 Date: Mon, 7 Oct 2002 12:04:10 -0600 (MDT) > The fixes that I'm still investigating address the sparc64 backend's > convoluted constant pool loading code. > > There is nothing convoluted about it. That's a perfectly valid > and fine way to output a load from the constant pool and expose > all of the instructions to the compiler for scheduling purposes. I beg to differ. The sparc64 backend represents a load from the constant pool as: (mem/u/f:DF (lo_sum:DI (reg/f:DI 110) (symbol_ref/u:DI ("*.LLC0"))) [2 S8 A64] The problem is that the code in "avoid_constant_pool_reference" in simplify-rtx.c (line 149), assumes that constant pool references are of the form "(mem (symbol_ref ...))". Indeed the macro CONSTANT_POOL_ADDRESS_P assumes that it is always passed a naked symbol_ref. A possible fix may be to extend this test is also allow the constant pool to be indexed via LO_SUM. Something like: if (GET_CODE (x) != MEM) return x; addr = XEXP (x, 0) + if (GET_CODE (addr) == LO_SUM + && GET_CODE (XEXP (addr, 1)) == SYMBOL_REF) + addr = XEXP (addr, 1); if (GET_CODE (addr) != SYMBOL_REF || ! CONSTANT_POOL_ADDRESS_P (addr)) return x; Could someone that understands LO_SUM targets confirm that this is a reasonable thing to do? I'm assuming that the ".LLC0" symbol_ref will be correctly marked with CONSTANT_POOL_ADDRESS_P. If it is, this should not only solve 20020720-1.c, but also enable many more optimizations on sparc64. RTH? Roger --
next reply other threads:[~2002-10-07 18:26 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-10-07 11:26 Roger Sayle [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-10-07 11:46 Roger Sayle 2002-10-07 11:46 Richard Henderson 2002-10-07 11:36 David S. Miller 2002-10-07 10:26 Kaveh R. Ghazi 2002-10-07 9:26 David S. Miller 2002-10-07 9:26 Roger Sayle 2002-10-07 9:16 Roger Sayle 2002-10-07 9:16 David S. Miller 2002-10-07 0:22 davem 2002-10-03 8:06 Kaveh R. Ghazi 2002-10-02 17:26 David S. Miller 2002-10-02 7:56 Kaveh R. Ghazi 2002-09-30 17:26 Roger Sayle 2002-09-30 16:56 Richard Henderson 2002-09-30 16:36 David S. Miller 2002-09-30 16:26 Richard Henderson 2002-09-30 15:52 davem 2002-09-28 21:46 ghazi
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=20021007182601.9935.qmail@sources.redhat.com \ --to=roger@eyesopen.com \ --cc=gcc-prs@gcc.gnu.org \ --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).