From: Michael Meissner Date: Wed, 3 May 1995 18:49:09 +0000 (+0000) Subject: Fix abs not to use powerpc instructions on -mcpu=common X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3595d104fa983e9760fe9c4de303993f400aca18;p=gcc.git Fix abs not to use powerpc instructions on -mcpu=common From-SVN: r9569 --- diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index a7c28a482ff..629eeeca575 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -1044,7 +1044,12 @@ (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r,0"))) (clobber (match_scratch:SI 2 "=&r,&r"))] "!TARGET_POWER" - "{srai|srawi} %2,%1,31\;xor %0,%2,%1\;subf %0,%2,%0" + "* +{ + return (TARGET_POWERPC) + ? \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;subf %0,%2,%0\" + : \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;{sf|subfc} %0,%2,%0\"; +}" [(set_attr "length" "12")]) (define_split @@ -1068,7 +1073,12 @@ (neg:SI (abs:SI (match_operand:SI 1 "gpc_reg_operand" "r,0")))) (clobber (match_scratch:SI 2 "=&r,&r"))] "!TARGET_POWER" - "{srai|srawi} %2,%1,31\;xor %0,%2,%1\;subf %0,%0,%2" + "* +{ + return (TARGET_POWERPC) + ? \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;subf %0,%0,%2\" + : \"{srai|srawi} %2,%1,31\;xor %0,%2,%1\;{sf|subfc} %0,%0,%2\"; +}" [(set_attr "length" "12")]) (define_split