h8300.h (CONST_OK_FOR_J): New.

* config/h8300/h8300.h (CONST_OK_FOR_J): New.
	(CONST_OK_FOR_LETTER_P): Use CONST_OK_FOR_J.
	* config/h8300/h8300.md (*addhi_h8300): Add a new alternative.
	(*addhi_h8300hs): Likewise.

From-SVN: r60079
This commit is contained in:
Kazu Hirata 2002-12-12 21:19:57 +00:00 committed by Kazu Hirata
parent ec555f3273
commit 8cc5359b78
3 changed files with 23 additions and 12 deletions

View File

@ -1,3 +1,10 @@
2002-12-12 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.h (CONST_OK_FOR_J): New.
(CONST_OK_FOR_LETTER_P): Use CONST_OK_FOR_J.
* config/h8300/h8300.md (*addhi_h8300): Add a new alternative.
(*addhi_h8300hs): Likewise.
Thu Dec 12 16:24:59 2002 J"orn Rennecke <joern.rennecke@superh.com>
* sh.c (reg_class_from_letter): No longer const. Add 'e' entry.

View File

@ -461,6 +461,7 @@ enum reg_class {
Return 1 if VALUE is in the range specified by C. */
#define CONST_OK_FOR_I(VALUE) ((VALUE) == 0)
#define CONST_OK_FOR_J(VALUE) (((VALUE) & 0xff) == 0)
#define CONST_OK_FOR_L(VALUE) \
(TARGET_H8300H || TARGET_H8300S \
? (VALUE) == 1 || (VALUE) == 2 || (VALUE) == 4 \
@ -472,6 +473,7 @@ enum reg_class {
#define CONST_OK_FOR_LETTER_P(VALUE, C) \
((C) == 'I' ? CONST_OK_FOR_I (VALUE) : \
(C) == 'J' ? CONST_OK_FOR_J (VALUE) : \
(C) == 'L' ? CONST_OK_FOR_L (VALUE) : \
(C) == 'N' ? CONST_OK_FOR_N (VALUE) : \
0)

View File

@ -762,32 +762,34 @@
""
"")
(define_insn ""
[(set (match_operand:HI 0 "register_operand" "=r,r,r,r,&r")
(plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,0,g")
(match_operand:HI 2 "nonmemory_operand" "L,N,n,r,r")))]
(define_insn "*addhi3_h8300"
[(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r,&r")
(plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,0,0,g")
(match_operand:HI 2 "nonmemory_operand" "L,N,J,n,r,r")))]
"TARGET_H8300"
"@
adds %2,%T0
subs %G2,%T0
add.b %t2,%t0
add.b %s2,%s0\;addx %t2,%t0
add.w %T2,%T0
mov.w %T1,%T0\;add.w %T2,%T0"
[(set_attr "length" "2,2,4,2,6")
(set_attr "cc" "none_0hit,none_0hit,clobber,set_zn,set_zn")])
[(set_attr "length" "2,2,2,4,2,6")
(set_attr "cc" "none_0hit,none_0hit,clobber,clobber,set_zn,set_zn")])
(define_insn ""
[(set (match_operand:HI 0 "register_operand" "=r,r,r,r")
(plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,0")
(match_operand:HI 2 "nonmemory_operand" "L,N,n,r")))]
(define_insn "*addhi3_h8300hs"
[(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r")
(plus:HI (match_operand:HI 1 "register_operand" "%0,0,0,0,0")
(match_operand:HI 2 "nonmemory_operand" "L,N,J,n,r")))]
"TARGET_H8300H || TARGET_H8300S"
"@
adds %2,%S0
subs %G2,%S0
add.b %t2,%t0
add.w %T2,%T0
add.w %T2,%T0"
[(set_attr "length" "2,2,4,2")
(set_attr "cc" "none_0hit,none_0hit,set_zn,set_zn")])
[(set_attr "length" "2,2,2,4,2")
(set_attr "cc" "none_0hit,none_0hit,clobber,set_zn,set_zn")])
(define_split
[(set (match_operand:HI 0 "register_operand" "")