From: Peter Barada <pbarada@mail.wm.sps.mot.com>
To: gcc@gcc.gnu.org
Subject: Re: PR #5753
Date: Tue, 05 Mar 2002 12:45:00 -0000 [thread overview]
Message-ID: <200203052045.g25Kj3M28277@hyper.wm.sps.mot.com> (raw)
>I've reported a PR (see #5753) while compiling some code from a
>m68k-elf configured 3.0.4 compiler for -m5200. I'm attempting to
>figure out a fix.
Since QImode can not be placed in address registers, I've tried
modifying HARD_REGNO_MODE_OK() to be:
#define HARD_REGNO_MODE_OK(REGNO, MODE) \
((TARGET_5200 && ((REGNO) >= 8 && (REGNO) < 16) \
&& GET_MODE_SIZE (MODE) == 1) ? 0 : \
(((REGNO) < 16 \
&& !((REGNO) < 8 && (REGNO) + GET_MODE_SIZE (MODE) / 4 > 8)) \
|| ((REGNO) >= 16 && (REGNO) < 24 \
&& (GET_MODE_CLASS (MODE) == MODE_FLOAT \
|| GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT) \
&& GET_MODE_UNIT_SIZE (MODE) <= 12)))
and this caused the compilation to break with:
/tmp/crap-304-new/bin/m68k-elf-gcc -c -gstabs -malign-int -m5200 /tmp/cfprintf4.c -o /tmp/cfprintf4.o
/tmp/cfprintf4.c: In function `_vformat':
/tmp/cfprintf4.c:58: Unable to find a register to spill in class `ADDR_REGS'.
/tmp/cfprintf4.c:58: This is the insn:
(insn 185 184 186 (set (reg:SI 68)
(plus:SI (subreg:SI (mem/f:QI (plus:SI (reg/f:SI 14 %a6)
(const_int -1 [0xffffffff])) 0) 0)
(const_int -100 [0xffffff9c]))) 100 {*addsi3_5200} (nil)
(nil))
/tmp/cfprintf4.c:58: confused by earlier errors, bailing out
So to go the next step, I modified LIMIT_RELOAD_CLASS() to evaluate to
DATA_REGS if CLASS is ADDR_REGS and mode is QImode, and this caused
the compilation ot break with:
/tmp/cfprintf4.c:58: Insn does not satisfy its constraints:
(insn 185 258 256 (set (reg:SI 8 %a0)
(plus:SI (reg:SI 0 %d0)
(const_int -100 [0xffffff9c]))) 100 {*addsi3_5200} (nil)
(nil))
So I can see how the reload code replaced the previous subreg with
%d0, and why it doesn't match... I guess the real question I have to
figure out is why is class ADDR_REGS in the first place...
1) Are my changes to these three macros the right changes?
2) Am I on the right track?
--
Peter Barada Peter.Barada@motorola.com
Wizard 781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)
next reply other threads:[~2002-03-05 20:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-05 12:45 Peter Barada [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-03-05 10:31 Peter Barada
2002-03-04 15:22 Peter Barada
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=200203052045.g25Kj3M28277@hyper.wm.sps.mot.com \
--to=pbarada@mail.wm.sps.mot.com \
--cc=gcc@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).