Commit 17320477 by Adam Nemet Committed by Adam Nemet

mips.md (*clear_upper32_dext): New pattern.

	* config/mips/mips.md (*clear_upper32_dext): New pattern.

testsuite/
	* gcc.target/mips/ext-4.c: New test.

From-SVN: r150316
parent e61c6562
2009-07-31 Adam Nemet <anemet@caviumnetworks.com>
* config/mips/mips.md (*clear_upper32_dext): New pattern.
2009-07-31 Uros Bizjak <ubizjak@gmail.com>
* config/i386/bsd.h (ASM_BYTE): New define.
......
......@@ -2785,7 +2785,7 @@
[(set (match_operand:DI 0 "register_operand" "=d,d")
(and:DI (match_operand:DI 1 "nonimmediate_operand" "d,W")
(const_int 4294967295)))]
"TARGET_64BIT"
"TARGET_64BIT && !ISA_HAS_EXT_INS"
{
if (which_alternative == 0)
return "#";
......@@ -2802,6 +2802,21 @@
[(set_attr "move_type" "shift_shift,load")
(set_attr "mode" "DI")])
(define_insn "*clear_upper32_dext"
[(set (match_operand:DI 0 "register_operand" "=d,d")
(and:DI (match_operand:DI 1 "nonimmediate_operand" "d,W")
(const_int 4294967295)))]
"TARGET_64BIT && ISA_HAS_EXT_INS"
{
if (which_alternative == 0)
return "dext\t%0,%1,0,32";
operands[1] = gen_lowpart (SImode, operands[1]);
return "lwu\t%0,%1";
}
[(set_attr "move_type" "arith,load")
(set_attr "mode" "DI")])
(define_expand "zero_extend<SHORT:mode><GPR:mode>2"
[(set (match_operand:GPR 0 "register_operand")
(zero_extend:GPR (match_operand:SHORT 1 "nonimmediate_operand")))]
......
2009-07-31 Adam Nemet <anemet@caviumnetworks.com>
* gcc.target/mips/ext-4.c: New test.
2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
* g++.dg/tree-ssa/pr33615.C: Fix pattern for lim.
......
/* For MIPS64r2 use DEXT rather than DSLL/DSRL for clear_upper32. */
/* { dg-do compile } */
/* { dg-options "-O isa_rev>=2 -mgp64" } */
/* { dg-final { scan-assembler "\tdext\t" } } */
/* { dg-final { scan-assembler-not "sll" } } */
unsigned long long
f (unsigned long long i)
{
return i & 0xffffffffull;
}
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