+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.
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);
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:
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;
}
}