This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i370 port
- From: "Paul Edwards" <mutazilah at gmail dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: "Daniel Jacobowitz" <drow at false dot org>, <gcc at gcc dot gnu dot org>
- Date: Fri, 19 Jun 2009 10:05:27 +1000
- Subject: Re: i370 port
- References: <200906151745.n5FHjSul029896@d12av02.megacenter.de.ibm.com>
Hi guys.
The last class of warning I have from the machine definition is this:
./config/i370/i370.md:784: warning: destination operand 0 allows non-lvalue
which is because I have used r_or_s_operand like this:
;
; movdi instruction pattern(s).
;
(define_insn ""
[(set (match_operand:DI 0 "r_or_s_operand" "=dm,dS")
(match_operand:DI 1 "r_or_s_operand" "dm*fF,i"))]
"TARGET_CHAR_INSTRUCTIONS"
"*
{
check_label_emit ();
if (REG_P (operands[0]))
and I believe what is happening is that r_or_s_operand allows
a constant.
But sometimes r_or_s_operand is being used as a source, in
which case, the constant is fine. But when it is used as a
destination, it is not fine.
What is the *simplest* way of changing the setup so that the
code generation remains the same, but the warning is eliminated?
Note that this is 3.2.3 and I'm not wanting to restructure the
whole thing to be the same as s390.md. I am thinking I can
define something like r_or_s_lval_operand which would be
the same as r_or_s_operand except not allow constants.
But wondering if there's something simpler and neater.
Thanks. Paul.