aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/m68k
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim@codesourcery.com>2008-11-24 17:55:35 +0000
committerMaxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>2008-11-24 17:55:35 +0000
commit5ad2f1a5f298eb353fb393d96ccb3e87d3e96eb9 (patch)
tree4f61423a367d4a03cf1547609eb974c2a1085138 /gcc/config/m68k
parent148153c18ccc773df6b67034796295a489658814 (diff)
downloadgcc-5ad2f1a5f298eb353fb393d96ccb3e87d3e96eb9.zip
gcc-5ad2f1a5f298eb353fb393d96ccb3e87d3e96eb9.tar.gz
gcc-5ad2f1a5f298eb353fb393d96ccb3e87d3e96eb9.tar.bz2
re PR target/35018 ([m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher)
PR target/35018 * config/m68k/m68k.md (ok_for_coldfire, enabled): New attributes. (addsi_lshrsi_31): Add ColdFire-friendly alternatives. * gcc.target/m68k/pr35018.c: New. From-SVN: r142161
Diffstat (limited to 'gcc/config/m68k')
-rw-r--r--gcc/config/m68k/m68k.md16
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 75f36dc..8522cc1 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -244,6 +244,15 @@
(define_attr "size" "1,2,3"
(symbol_ref "m68k_sched_attr_size (insn)"))
+;; Alternative is OK for ColdFire.
+(define_attr "ok_for_coldfire" "yes,no" (const_string "yes"))
+
+;; Define 'enabled' attribute.
+(define_attr "enabled" ""
+ (cond [(and (ne (symbol_ref "TARGET_COLDFIRE") (const_int 0))
+ (eq_attr "ok_for_coldfire" "no"))
+ (const_int 0)]
+ (const_int 1)))
;; Mode macros for floating point operations.
;; Valid floating point modes
@@ -2281,8 +2290,8 @@
})
(define_insn "addsi_lshrsi_31"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=dm")
- (plus:SI (lshiftrt:SI (match_operand:SI 1 "general_operand" "rm")
+ [(set (match_operand:SI 0 "nonimmediate_operand" "=dm,dm,d<Q>")
+ (plus:SI (lshiftrt:SI (match_operand:SI 1 "general_operand" "rm,r<Q>,rm")
(const_int 31))
(match_dup 1)))]
""
@@ -2302,7 +2311,8 @@
(*targetm.asm_out.internal_label) (asm_out_file, "L",
CODE_LABEL_NUMBER (operands[3]));
return "";
-})
+}
+ [(set_attr "ok_for_coldfire" "no,yes,yes")])
(define_expand "addsi3"
[(set (match_operand:SI 0 "nonimmediate_operand" "")