aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/m68k/m68k.md
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/m68k/m68k.md')
-rw-r--r--gcc/config/m68k/m68k.md51
1 files changed, 39 insertions, 12 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 969e5dc3099..3451b9ec8bd 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -1,5 +1,5 @@
;;- Machine description for GNU compiler, Motorola 68000 Version
-;; Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001
+;; Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003
;; Free Software Foundation, Inc.
;; This file is part of GNU CC.
@@ -1588,7 +1588,7 @@
"
{
operands[1] = make_safe_from (operands[1], operands[0]);
- operands[2] = gen_lowpart (HImode, operands[0]);
+ operands[2] = gen_lowpart_SUBREG (HImode, operands[0]);
}")
(define_expand "zero_extendqihi2"
@@ -1600,7 +1600,7 @@
"
{
operands[1] = make_safe_from (operands[1], operands[0]);
- operands[2] = gen_lowpart (QImode, operands[0]);
+ operands[2] = gen_lowpart_SUBREG (QImode, operands[0]);
}")
(define_expand "zero_extendqisi2"
@@ -1612,7 +1612,7 @@
"
{
operands[1] = make_safe_from (operands[1], operands[0]);
- operands[2] = gen_lowpart (QImode, operands[0]);
+ operands[2] = gen_lowpart_SUBREG (QImode, operands[0]);
}")
;; Patterns to recognize zero-extend insns produced by the combiner.
@@ -3122,7 +3122,7 @@
[(parallel
[(set (subreg:SI (match_operand:DI 0 "register_operand" "") 4)
(mult:SI (match_operand:SI 1 "register_operand" "")
- (match_operand:SI 2 "nonimmediate_operand" "")))
+ (match_operand:SI 2 "register_operand" "")))
(set (subreg:SI (match_dup 0) 0)
(truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1))
(zero_extend:DI (match_dup 2)))
@@ -3161,7 +3161,7 @@
[(parallel
[(set (subreg:SI (match_operand:DI 0 "register_operand" "") 4)
(mult:SI (match_operand:SI 1 "register_operand" "")
- (match_operand:SI 2 "nonimmediate_operand" "")))
+ (match_operand:SI 2 "register_operand" "")))
(set (subreg:SI (match_dup 0) 0)
(truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1))
(sign_extend:DI (match_dup 2)))
@@ -3862,7 +3862,7 @@
case -1 :
/* FIXME : a scratch register would be welcome here if operand[0]
is not a register */
- output_asm_insn (\"move%.l %#-1,%R0\", operands);
+ output_asm_insn (\"move%.l %#-1,%0\", operands);
break;
default :
{
@@ -6973,17 +6973,33 @@
#ifdef SGS
#ifdef ASM_OUTPUT_CASE_LABEL
if (TARGET_5200)
- return \"ext%.l %0\;jmp 6(%%pc,%0.l)\";
+ {
+ if (ADDRESS_REG_P (operands[0]))
+ return \"jmp 6(%%pc,%0.l)\";
+ else
+ return \"ext%.l %0\;jmp 6(%%pc,%0.l)\";
+ }
else
return \"jmp 6(%%pc,%0.w)\";
#else
if (TARGET_5200)
{
+ if (ADDRESS_REG_P (operands[0]))
+ {
#ifdef CRDS
- return \"ext%.l %0\;jmp 2(pc,%0.l)\";
+ return \"jmp 2(pc,%0.l)\";
#else
- return \"extl %0\;jmp 2(%%pc,%0.l)\";
+ return \"jmp 2(%%pc,%0.l)\";
#endif /* end !CRDS */
+ }
+ else
+ {
+#ifdef CRDS
+ return \"ext%.l %0\;jmp 2(pc,%0.l)\";
+#else
+ return \"extl %0\;jmp 2(%%pc,%0.l)\";
+#endif /* end !CRDS */
+ }
}
else
{
@@ -6997,11 +7013,22 @@
#else /* not SGS */
if (TARGET_5200)
{
+ if (ADDRESS_REG_P (operands[0]))
+ {
#ifdef MOTOROLA
- return \"ext%.l %0\;jmp (2,pc,%0.l)\";
+ return \"jmp (2,pc,%0.l)\";
#else
- return \"extl %0\;jmp pc@(2,%0:l)\";
+ return \"jmp pc@(2,%0:l)\";
#endif
+ }
+ else
+ {
+#ifdef MOTOROLA
+ return \"ext%.l %0\;jmp (2,pc,%0.l)\";
+#else
+ return \"extl %0\;jmp pc@(2,%0:l)\";
+#endif
+ }
}
else
{