A patch for mips.md
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 ([email protected])
* config/mips/mips.md (call_internal2): Use "lw" if the target is not a register.
(call_value_internal2): Likewise. (call_value_multiple_internal2): Likewise.
config/mips/mips.md renamed from config/mips/mips.md.call +6 -0
@@ -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