Commit 14bc59cb by Richard Sandiford

mips-dspr2.md (mips_prepend): Mask operand 3 rather than operand 2.

gcc/
2012-02-02  Jia Liu  <proljc@gmail.com>

	* config/mips/mips-dspr2.md (mips_prepend): Mask operand 3 rather
	than operand 2.

gcc/testsuite/
	* gcc.target/mips/mips-prepend-1.c: New test.

From-SVN: r183841
parent f22f4fc1
2012-02-02 Jia Liu <proljc@gmail.com>
* config/mips/mips-dspr2.md (mips_prepend): Mask operand 3 rather
than operand 2.
2012-02-02 Jan Hubicka <jh@suse.cz>
Tom de Vries <tom@codesourcery.com>
......
......@@ -353,7 +353,7 @@
"ISA_HAS_DSPR2"
{
if (INTVAL (operands[3]) & ~(unsigned HOST_WIDE_INT) 31)
operands[2] = GEN_INT (INTVAL (operands[2]) & 31);
operands[3] = GEN_INT (INTVAL (operands[3]) & 31);
return "prepend\t%0,%z2,%3";
}
[(set_attr "type" "arith")
......
2012-02-02 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.target/mips/mips-prepend-1.c: New test.
2012-02-02 Jan Hubicka <jh@suse.cz>
Tom de Vries <tom@codesourcery.com>
......
/* { dg-options "-mdspr2" } */
/* { dg-final { scan-assembler "prepend\[^\n\]*,10" } } */
NOMIPS16 int
foo (int x, int y)
{
return __builtin_mips_prepend (x, y, 42);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment