Commit c7d91a94 by Roger Sayle Committed by Roger Sayle

re PR middle-end/12705 (: complex powers)


	PR middle-end/12705
	* optabs.c (expand_binop): When expanding complex operations
	inline, always calculate result into a new temporary register.
	Minor code clean-ups.

From-SVN: r72871
parent 7989e4dc
2003-10-23 Roger Sayle <roger@eyesopen.com>
PR middle-end/12705
* optabs.c (expand_binop): When expanding complex operations
inline, always calculate result into a new temporary register.
Minor code clean-ups.
2003-10-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* objc/lang-specs.h: Handle -print-objc-runtime-info.
......
......@@ -1521,24 +1521,17 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
rtx real0 = 0, imag0 = 0;
rtx real1 = 0, imag1 = 0;
rtx realr, imagr, res;
rtx seq;
rtx equiv_value;
rtx seq, result;
int ok = 0;
/* Find the correct mode for the real and imaginary parts. */
enum machine_mode submode = GET_MODE_INNER(mode);
enum machine_mode submode = GET_MODE_INNER (mode);
if (submode == BLKmode)
abort ();
if (! target)
target = gen_reg_rtx (mode);
start_sequence ();
realr = gen_realpart (submode, target);
imagr = gen_imagpart (submode, target);
if (GET_MODE (op0) == mode)
{
real0 = gen_realpart (submode, op0);
......@@ -1558,6 +1551,10 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
if (real0 == 0 || real1 == 0 || ! (imag0 != 0 || imag1 != 0))
abort ();
result = gen_reg_rtx (mode);
realr = gen_realpart (submode, result);
imagr = gen_imagpart (submode, result);
switch (binoptab->code)
{
case PLUS:
......@@ -1749,16 +1746,10 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
if (ok)
{
if (binoptab->code != UNKNOWN)
equiv_value
= gen_rtx_fmt_ee (binoptab->code, mode,
copy_rtx (op0), copy_rtx (op1));
else
equiv_value = 0;
emit_no_conflict_block (seq, target, op0, op1, equiv_value);
return target;
rtx equiv = gen_rtx_fmt_ee (binoptab->code, mode,
copy_rtx (op0), copy_rtx (op1));
emit_no_conflict_block (seq, result, op0, op1, equiv);
return result;
}
}
......
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