public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amylaar at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/27117] [4.2 Regression] gcc fails to build on sh64-elf targets Date: Wed, 12 Apr 2006 13:46:00 -0000 [thread overview] Message-ID: <20060412134626.5594.qmail@sourceware.org> (raw) In-Reply-To: <bug-27117-5208@http.gcc.gnu.org/bugzilla/> ------- Comment #3 from amylaar at gcc dot gnu dot org 2006-04-12 13:46 ------- sh64 has indexed addressing, but the addition is always done as 64 bit, and there are currently no implemenmtations that allow the 64 bit logical address space to be re-mapped into a 32 physical address space - instead they trap on any access to an address that does not fit into a 32 bit address space. This makes using indexed addressing with Pmode for -m5-32media (where Pmode is SImode) unsafe, since some optimizations can fold additions into indexed addressing and thus cause out-of-range addresses. Therefore, INDEX_REG_CLASS is NO_REGS for -m5-32media. The division code produces an address with a DImode plus of two registers - this is safe, since we exactly describe what the hardware does. However, find_reloads_address_1 sees a plus and recurses with CONTEXT set to 1, and then uses INDEX_REG_CLASS; it does not take into account that the mode is not Pmode. I think the best solution is to have an INDEX_REG_CLASS_FOR_MODE macro, which defaults to INDEX_REG_CLASS. Then this macro can be defined for the SH to return GENERAL_REGS for DImode when compiling SHmedia code. A kludgy solution would be to make reload reload the sum into a base register (to cover the general case), and make the SH LEGITIMIZE_RELOAD_ADDRESS recognize a sum with a non-pmode PLUS, and only reload pseudos inside into GENERAL_REGS. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27117
next prev parent reply other threads:[~2006-04-12 13:46 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-04-11 10:46 [Bug target/27117] New: " kkojima at gcc dot gnu dot org 2006-04-11 17:46 ` [Bug target/27117] [4.2 Regression] " pinskia at gcc dot gnu dot org 2006-04-12 7:11 ` bonzini at gnu dot org 2006-04-12 7:30 ` bonzini at gnu dot org 2006-04-12 13:46 ` amylaar at gcc dot gnu dot org [this message] 2006-04-12 14:10 ` paolo dot bonzini at lu dot unisi dot ch 2006-04-12 19:59 ` amylaar at gcc dot gnu dot org 2006-04-12 21:43 ` kkojima at gcc dot gnu dot org 2006-04-13 11:46 ` amylaar at gcc dot gnu dot org 2006-04-13 14:00 ` kkojima at gcc dot gnu dot org 2006-04-18 8:13 ` bonzini at gnu dot org 2006-04-18 8:23 ` bonzini at gcc dot gnu dot org 2006-04-18 13:26 ` bonzini at gnu dot org 2006-08-07 8:16 ` [Bug target/27117] SH backend cheats to reload -- disables indexed addressing but uses it internally bonzini at gnu dot org 2006-08-07 10:29 ` amylaar at gcc dot gnu dot org 2006-08-07 11:11 ` bonzini at gnu dot org 2006-08-21 6:20 ` bonzini at gnu dot org 2006-09-07 8:19 ` bonzini at gcc dot gnu dot org 2006-09-07 8:21 ` bonzini at gnu dot 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=20060412134626.5594.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: 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).