From: Henri Cloetens <henri.cloetens@blueice.be>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Issue with reload
Date: Tue, 3 Nov 2020 19:49:25 +0100 [thread overview]
Message-ID: <bf851801-ec14-8d45-7319-6ae77834abf1@blueice.be> (raw)
In-Reply-To: <20201103172357.GK2672@gate.crashing.org>
Hello Segher,
- However, the predicate "r" in the statement above, does not allow a
subreg.
Yes it does. See register_operand in recog.c for example. It is of
course possible your gpc_reg_operand doesn't allow it (bad idea, but I
don't know your code).
It does not. When I change the description to :
(define_insn "movhi_internal"
[(set (match_operand:HI 0 "movhi_operand_0" "=r,Z,C,r,r,u,u,r,r,r")
(match_operand:HI 1 "movhi_operand_1" "x9,r,r,Z,C,Z,C,O,k,i"))]
with x9 defined as "ext_gpc_reg_operand"
and
(define_predicate "ext_gpc_reg_operand"
(and (match_operand 0 "register_operand")
( ior (match_test "( (GET_CODE(op) == REG && (
(REGNO(op) >= ARG_POINTER_REGNUM && !CA_REGNO_P(REGNO(op)))
|| REGNO(op) == SFP_REGNO
|| REGNO (op) == ARG_POINTER_REGNUM
|| REGNO (op) <= MAX_REGFILE_REGNO)))")
(match_test "( (GET_CODE(op) == SUBREG && SUBREG_BYTE(op) == 0 && (
(REGNO(SUBREG_REG(op)) >= ARG_POINTER_REGNUM && !CA_REGNO_P(REGNO(SUBREG_REG(op))))
|| REGNO(SUBREG_REG(op)) == SFP_REGNO
|| REGNO (SUBREG_REG(op)) == ARG_POINTER_REGNUM
|| REGNO (SUBREG_REG(op)) <= MAX_REGFILE_REGNO)))"))))
Then, its gone. It now crashes on other "r"'s in the same instruction,
as it apparently
wants to move this operand on the stack, and for that it needs the "x9"
also in other places.
It is of course possible something is wrong in my description, but the
"r" does not seem to allow the
subreg. At least not in my port.
I will try putting more "x9"'s tomorrow.
Best Regards,
Henri.
next prev parent reply other threads:[~2020-11-03 18:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-03 13:00 Henri Cloetens
2020-11-03 15:25 ` Henri Cloetens
2020-11-03 17:23 ` Segher Boessenkool
2020-11-03 18:49 ` Henri Cloetens [this message]
2020-11-06 20:41 ` Henri Cloetens
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=bf851801-ec14-8d45-7319-6ae77834abf1@blueice.be \
--to=henri.cloetens@blueice.be \
--cc=gcc-help@gcc.gnu.org \
--cc=segher@kernel.crashing.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).