aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1994-11-17 20:14:21 +0000
committerDoug Evans <dje@gnu.org>1994-11-17 20:14:21 +0000
commitb82b6eea9339954d55d1e189565f8574bd95f9e3 (patch)
tree71e6865a183347deedd2fcae9a64bd096f992818
parent13d50804a069f42c12e54d56f523ee5cad386bd1 (diff)
downloadgcc-b82b6eea9339954d55d1e189565f8574bd95f9e3.zip
gcc-b82b6eea9339954d55d1e189565f8574bd95f9e3.tar.gz
gcc-b82b6eea9339954d55d1e189565f8574bd95f9e3.tar.bz2
(expand_unop): Try subtraction from zero if there isn't a
negate library function. From-SVN: r8485
-rw-r--r--gcc/optabs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index db68da8..724f36b 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -2041,6 +2041,17 @@ expand_unop (mode, unoptab, op0, target, unsignedp)
}
}
+ /* If there is no negate operation, try doing a subtract from zero.
+ The US Software GOFAST library needs this. */
+ if (unoptab == neg_optab)
+ {
+ rtx temp;
+ temp = expand_binop (mode, sub_optab, CONST0_RTX (mode), op0,
+ target, unsignedp, OPTAB_LIB_WIDEN);
+ if (temp)
+ return temp;
+ }
+
return 0;
}