Commit 0ca827a6 authored by jakub's avatar jakub

* config/sparc/sparc.md (muldi3_v8plus): Remove H constraint.

	Handle CONST_INT as second argument.
	* config/sparc/sparc.c (set_extends): Remove first argument.
	Properly handle AND, CONST_INT and CONST_DOUBLE, handle IOR, XOR and
	MOV.
	(sparc_check_64): Abort if first argument is not REG.
	If it is DImode REG, look at the lower register of the register
	pair.

	* config/sparc/sparc.c (load_pic_register, restore_regs,
	output_return, sparc_v8plus_shift, sparc_function_profiler,
	sparc_function_block_profiler, sparc_block_profiler): Fix output
	formatting.

	* gcc.dg/ultrasp3.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37738 138bc75d-0d04-0410-961f-82ee72b054a4
parent 4a594cf6
2000-11-25 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.md (muldi3_v8plus): Remove H constraint.
Handle CONST_INT as second argument.
* config/sparc/sparc.c (set_extends): Remove first argument.
Properly handle AND, CONST_INT and CONST_DOUBLE, handle IOR, XOR and
MOV.
(sparc_check_64): Abort if first argument is not REG.
If it is DImode REG, look at the lower register of the register
pair.
* config/sparc/sparc.c (load_pic_register, restore_regs,
output_return, sparc_v8plus_shift, sparc_function_profiler,
sparc_function_block_profiler, sparc_block_profiler): Fix output
formatting.
2000-11-25 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (TARGET_NONE): New.
......
This diff is collapsed.
......@@ -6088,7 +6088,7 @@
(define_insn "muldi3_v8plus"
[(set (match_operand:DI 0 "register_operand" "=r,h")
(mult:DI (match_operand:DI 1 "arith_double_operand" "%r,0")
(match_operand:DI 2 "arith_double_operand" "rHI,rHI")))
(match_operand:DI 2 "arith_double_operand" "rI,rI")))
(clobber (match_scratch:SI 3 "=&h,X"))
(clobber (match_scratch:SI 4 "=&h,X"))]
"TARGET_V8PLUS"
......@@ -6098,6 +6098,13 @@
output_asm_insn (\"srl\\t%L1, 0, %L1\", operands);
if (which_alternative == 1)
output_asm_insn (\"sllx\\t%H1, 32, %H1\", operands);
if (GET_CODE (operands[2]) == CONST_INT)
{
if (which_alternative == 1)
return \"or\\t%L1, %H1, %H1\\n\\tmulx\\t%H1, %2, %L0\;srlx\\t%L0, 32, %H0\";
else
return \"sllx\\t%H1, 32, %3\\n\\tor\\t%L1, %3, %3\\n\\tmulx\\t%3, %2, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0\";
}
if (sparc_check_64 (operands[2], insn) <= 0)
output_asm_insn (\"srl\\t%L2, 0, %L2\", operands);
if (which_alternative == 1)
......
2000-11-25 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/ultrasp3.c: New test.
2000-11-25 Neil Booth <neilb@earthling.net>
* gcc.dg/cpp/include2.c: Update test to be locale independent.
......
/* { dg-options "" } */
/* { dg-options "-mcpu=ultrasparc -mv8plus" { target sparc-*-* } } */
unsigned long long foo (unsigned long long x)
{
return 0x73500000735LL * x;
}
unsigned long long a, b;
unsigned long p;
unsigned long long bar (void)
{
unsigned long long c = a | b;
return 0x73500000735LL * c;
}
unsigned long long baz (void)
{
unsigned long long c = (p + 345) & -2;
return c * a;
}
main ()
{
if (foo (0x56789LL) != 0x26f32e5d26f32e5dLL)
abort ();
a = 0x8000000080000000LL;
b = 0x0000000180000001LL;
if (bar () != 0x120480000735LL)
abort ();
p = 0xffffffff;
if (baz () != 0xac00000000LL)
abort ();
exit (0);
}
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