aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFranz Sirl <Franz.Sirl-kernel@lauterbach.com>2002-05-19 17:10:49 +0000
committerFranz Sirl <sirl@gcc.gnu.org>2002-05-19 17:10:49 +0000
commit4aa74a4f5a2aebebb737782172d4ce0398f72970 (patch)
tree49e3f5fbf8abf04c511aa79c746bcda8d6f0d8b9 /gcc
parenta15135c91aa1dffab3287d252ad35ccce81f999f (diff)
downloadgcc-4aa74a4f5a2aebebb737782172d4ce0398f72970.zip
gcc-4aa74a4f5a2aebebb737782172d4ce0398f72970.tar.gz
gcc-4aa74a4f5a2aebebb737782172d4ce0398f72970.tar.bz2
rs6000.md (ashrdi3_no_power): New.
2002-05-19 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * config/rs6000/rs6000.md (ashrdi3_no_power): New. (ashrdi3): Use it. From-SVN: r53634
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.md17
2 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d5d6d85..96e6199 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-19 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * config/rs6000/rs6000.md (ashrdi3_no_power): New.
+ (ashrdi3): Use it.
+
2002-05-18 Mark Mitchell <mark@codesourcery.com>
* configure.in (AC_CHECK_FUNCS): Add checks for scandir and
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 793d21f..3c437da 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -5781,6 +5781,16 @@
{srai|srawi} %0,%1,31\;{srai|srawi} %L0,%1,%h2
sraiq %0,%1,%h2\;srliq %L0,%L1,%h2"
[(set_attr "length" "8")])
+
+(define_insn "ashrdi3_no_power"
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=&r,&r")
+ (ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "r,r")
+ (match_operand:SI 2 "const_int_operand" "M,i")))]
+ "TARGET_32BIT && !TARGET_POWER"
+ "@
+ {srai|srawi} %0,%1,31\;{srai|srawi} %L0,%1,%h2
+ {sri|srwi} %L0,%L1,%h2\;insrwi %L0,%1,%h2,0\;{srai|srawi} %0,%1,%h2"
+ [(set_attr "length" "8,12")])
;; PowerPC64 DImode operations.
@@ -6990,7 +7000,7 @@
[(set (match_operand:DI 0 "gpc_reg_operand" "")
(ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "")
(match_operand:SI 2 "reg_or_cint_operand" "")))]
- "TARGET_POWERPC64 || TARGET_POWER"
+ ""
"
{
if (TARGET_POWERPC64)
@@ -7000,6 +7010,11 @@
emit_insn (gen_ashrdi3_power (operands[0], operands[1], operands[2]));
DONE;
}
+ else if (TARGET_32BIT && GET_CODE (operands[2]) == CONST_INT)
+ {
+ emit_insn (gen_ashrdi3_no_power (operands[0], operands[1], operands[2]));
+ DONE;
+ }
else
FAIL;
}")