Linux MIPS Architecture development
 help / color / mirror / Atom feed
* A patch for mips.md
@ 2001-06-06 21:40 H . J . Lu
  0 siblings, 0 replies; only message in thread
From: H . J . Lu @ 2001-06-06 21:40 UTC (permalink / raw)
  To: gcc-patches; +Cc: linux-mips

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-06 21:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-06 21:40 A patch for mips.md H . J . Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox