summaryrefslogtreecommitdiff
path: root/gcc/config/stormy16/stormy16.md
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-01-25 11:23:44 +0000
committerNick Clifton <nickc@gcc.gnu.org>2008-01-25 11:23:44 +0000
commitf84fe9b6f7ef38e8c68edd1a64f260521c251dbf (patch)
treecd08f9e84fb608a2cf42c538267e93119356a874 /gcc/config/stormy16/stormy16.md
parentd1f0728e65fe428de34d8b94da525b97259a7ff0 (diff)
downloadgcc-f84fe9b6f7ef38e8c68edd1a64f260521c251dbf.tar.gz
stormy16-lib2.c (MIN_UNITS_PER_WORD): Provide a default definition.
* config/stormy16/stormy16-lib2.c (MIN_UNITS_PER_WORD): Provide a default definition. (LIBGCC2_UNITS_PER_WORD): Likewise. * config/stormy16/stormy16.c: Include df.h for the prototype for df_regs_ever_live_p. (xstormy16_expand_builtin_va_start): Convert the stack offset into a component_ref and then use POINTER_PLUS_EXPR to add it to the incoming_virtual_args_rtx. (xstormy16_gimplify_va_arg_expr): Rename to xstormy16_gimplify_va_arg_expr. Use POINTER_PLUS_EXPR when performing pointer arithmetic. (TARGET_GIMPLIFY_VA_ARG_EXPR): Use renamed xstormy16_gimplify_va_arg_expr. Fix up some formatting issues. * config/stormy16/stormy16.c: (xstormy16_carry_plus_operand): Move to predicates.md. (xs_hi_general_operand): Likewise. (xs_hi_nonmemory_operand): Likewise. * config/stormy16/predicates.md: (xstormy16_carry_plus_operand): New predicate. (xs_hi_general_operand): New predicate. (xs_hi_nonmemory_operand): New predicate. * config/stormy16/stormy16-protos.h: (xstormy16_carry_plus_operand): Delete prototype. (xs_hi_general_operand): Likewise. (xs_hi_nonmemory_operand): Likewise. * config/storm16/stormy16.md (addhi3): Remove earlyclobber modifiers as they are no longer needed and they can trigger reload spill failures. * config/storm16/stormy16.md (ineqbranchsi): Replace match_dup with a match_operand in order to help reload. * config/storm16/stormy16.md (movhi_internal): Replace 'r' constraint with 'e' for the 8th alternative as this version of the mov.w instruction only accepts the lower 8 registers. From-SVN: r131822
Diffstat (limited to 'gcc/config/stormy16/stormy16.md')
-rw-r--r--gcc/config/stormy16/stormy16.md25
1 files changed, 9 insertions, 16 deletions
diff --git a/gcc/config/stormy16/stormy16.md b/gcc/config/stormy16/stormy16.md
index 93f21fc9e05..bd68243a7e8 100644
--- a/gcc/config/stormy16/stormy16.md
+++ b/gcc/config/stormy16/stormy16.md
@@ -185,7 +185,7 @@
(define_insn "movhi_internal"
[(set (match_operand:HI 0 "nonimmediate_nonstack_operand" "=r,m,e,e,T,r,S,W,r")
- (match_operand:HI 1 "xs_hi_general_operand" "r,e,m,L,L,i,i,ir,W"))]
+ (match_operand:HI 1 "xs_hi_general_operand" "r,e,m,L,L,i,i,ie,W"))]
""
"@
mov %0,%1
@@ -304,11 +304,8 @@
;; ::::::::::::::::::::
;; Addition
-; Operand 3 is marked earlyclobber because that helps reload
-; to generate better code---this pattern will never need the
-; carry register as an input, and some output reloads or input
-; reloads might need to use it. In fact, without the '&' reload
-; will fail in some cases.
+; Note - the early clobber modifier is no longer needed on operand 3
+; and in fact can cause some reload spill failures if it is present.
; Note that the 'Z' constraint matches "add $reg,0", which reload
; will occasionally emit. We avoid the "add $reg,imm" match because
; it clobbers the carry.
@@ -316,7 +313,7 @@
[(set (match_operand:HI 0 "register_operand" "=r,r,r,T,T,r,r,r")
(plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,0,0,0,0,0")
(match_operand:HI 2 "xs_hi_nonmemory_operand" "O,P,Z,L,M,Ir,N,i")))
- (clobber (match_scratch:BI 3 "=X,X,X,&y,&y,&y,&y,&y"))]
+ (clobber (match_scratch:BI 3 "=X,X,X,y,y,y,y,y"))]
""
"@
inc %0,%o2
@@ -905,15 +902,11 @@
"ri")])
(label_ref (match_operand 0 "" ""))
(pc)))
-;; Although I would greatly like the 'match_dup' in the following line
-;; to actually be a register constraint, there is (at the time of writing) no
-;; way for reload to insert an output reload on the edges out of a branch.
-;; If reload is fixed to use insert_insn_on_edge, this can be changed,
-;; preferably to a 'minus' operand that explains the actual operation, like:
-; (set (match_operand 5 "register_operand" "=2")
-; (minus:SI (match_operand 6 "register_operand" "2")
-; (match_operand 7 "register_operand" "3")))
- (clobber (match_dup 2))
+ ;; This clobber is problematic. Too many gcc optimizations will change
+ ;; operand 2 without changing the clobber. At the time of writing there
+ ;; is no way around this. :-( For an example try compiling:
+ ;; gcc.c-torture/compile/20000403-1.c -O3 -fomit-frame-pointer -funroll-loops
+ (clobber (match_operand:SI 5 "register_operand" "=2"))
(clobber (match_operand:BI 4 "" "=&y"))]
""
"#"