diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-11-17 20:14:21 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-11-17 20:14:21 +0000 |
commit | 59e6f6ff316fd25568b1824763479570274fe5dd (patch) | |
tree | 71e6865a183347deedd2fcae9a64bd096f992818 /gcc/optabs.c | |
parent | 0511cd2ed2404c9c45b9ec6e4d08e02b9f0c5fb7 (diff) | |
download | gcc-59e6f6ff316fd25568b1824763479570274fe5dd.tar.gz |
(expand_unop): Try subtraction from zero if there isn't a
negate library function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8485 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index db68da8f9fb..724f36b58cb 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; } |