From: "H . J . Lu" <hjl@lucon.org>
To: gcc-patches@gcc.gnu.org
Cc: linux-mips@oss.sgi.com
Subject: A patch for mips.md
Date: Wed, 6 Jun 2001 14:40:31 -0700 [thread overview]
Message-ID: <20010606144031.A27654@lucon.org> (raw)
On Linux/mips, I got
# gcc -O0 -c gcc/testsuite/gcc.c-torture/compile/20010107-1.c
/tmp/cc42wjvw.s: Assembler messages:
/tmp/cc42wjvw.s:22: Error: illegal operands `move
This patch seems to work for me.
H.J.
---
2001-06-06 H.J. Lu (hjl@gnu.org)
* config/mips/mips.md (call_internal2): Use "lw" if the target
is not a register.
(call_value_internal2): Likewise.
(call_value_multiple_internal2): Likewise.
--- gcc/config/mips/mips.md.call Fri Jun 1 23:28:12 2001
+++ gcc/config/mips/mips.md Fri Jun 1 23:35:45 2001
@@ -9547,6 +9547,8 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\;j
}
else if (GET_CODE (target) == CONST_INT)
return \"li\\t%^,%0\\n\\tjal\\t%2,%^\";
+ else if (GET_CODE (target) != REG)
+ return \"lw\\t%^,%0\\n\\tjal\\t%2,%^\";
else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM)
return \"move\\t%^,%0\\n\\tjal\\t%2,%^\";
else
@@ -9755,6 +9757,8 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\;j
}
else if (GET_CODE (target) == CONST_INT)
return \"li\\t%^,%1\\n\\tjal\\t%3,%^\";
+ else if (GET_CODE (target) != REG)
+ return \"lw\\t%^,%1\\n\\tjal\\t%3,%^\";
else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM)
return \"move\\t%^,%1\\n\\tjal\\t%3,%^\";
else
@@ -9890,6 +9894,8 @@ ld\\t%2,%1-%S1(%2)\;daddu\\t%2,%2,$31\;j
}
else if (GET_CODE (target) == CONST_INT)
return \"li\\t%^,%1\\n\\tjal\\t%4,%^\";
+ else if (GET_CODE (target) != REG)
+ return \"lw\\t%^,%1\\n\\tjal\\t%4,%^\";
else if (REGNO (target) != PIC_FUNCTION_ADDR_REGNUM)
return \"move\\t%^,%1\\n\\tjal\\t%4,%^\";
else
reply other threads:[~2001-06-06 21:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20010606144031.A27654@lucon.org \
--to=hjl@lucon.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=linux-mips@oss.sgi.com \
/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