Commit 20633efc by Georg-Johann Lay Committed by Georg-Johann Lay

avr-protos.h (output_reload_inhi): Change prototype.

	* config/avr/avr-protos.h (output_reload_inhi): Change prototype.
	* config/avr/avr.md (adjust_len): Add "reload_in16" alternative.
	(*reload_inhi): Use it.  Adapt call to output_reload_inhi to new
	prototype.
	(*movhi): Split constraint alternative "r,rL" into "r,r" and "r,L".
	* config/avr/avr.c: Rename output_reload_insisf_1 to
	output_reload_in_const.
	(avr_popcount_each_byte): Handle SFmode, too.
	(output_reload_in_const): Change so it can handle HI loads, too.
	Use avr_popcount_each_byte to work out if scratch register must be
	created on the fly.
	(output_reload_inhi): Rewrite using output_reload_in_const and...
	(output_movhi): ...use it to print constants' loads.
	(adjust_insn_length): New case ADJUST_LEN_RELOAD_IN16. Cleanup code.

From-SVN: r179181
parent 50179d58
2011-09-26 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr-protos.h (output_reload_inhi): Change prototype.
* config/avr/avr.md (adjust_len): Add "reload_in16" alternative.
(*reload_inhi): Use it. Adapt call to output_reload_inhi to new
prototype.
(*movhi): Split constraint alternative "r,rL" into "r,r" and "r,L".
* config/avr/avr.c: Rename output_reload_insisf_1 to
output_reload_in_const.
(avr_popcount_each_byte): Handle SFmode, too.
(output_reload_in_const): Change so it can handle HI loads, too.
Use avr_popcount_each_byte to work out if scratch register must be
created on the fly.
(output_reload_inhi): Rewrite using output_reload_in_const and...
(output_movhi): ...use it to print constants' loads.
(adjust_insn_length): New case ADJUST_LEN_RELOAD_IN16. Cleanup code.
2011-09-25 David S. Miller <davem@davemloft.net>
* config/sparc/constraints.md (C, P, Z): New constraints for
......@@ -87,7 +87,7 @@ extern bool avr_popcount_each_byte (rtx, int, int);
extern int extra_constraint_Q (rtx x);
extern int adjust_insn_length (rtx insn, int len);
extern const char *output_reload_inhi (rtx insn, rtx *operands, int *len);
extern const char* output_reload_inhi (rtx*, rtx, int*);
extern const char *output_reload_insisf (rtx insn, rtx *operands, rtx clobber, int *len);
extern void notice_update_cc (rtx body, rtx insn);
extern void print_operand (FILE *file, rtx x, int code);
......
......@@ -136,7 +136,7 @@
;; Otherwise do special processing depending on the attribute.
(define_attr "adjust_len"
"yes,no,reload_in32,out_bitop,out_plus,tsthi,tstsi,compare"
"yes,no,reload_in16,reload_in32,out_bitop,out_plus,tsthi,tstsi,compare"
(const_string "yes"))
;; Define mode iterators
......@@ -387,18 +387,21 @@
(match_operand:HI 1 "immediate_operand" "i"))
(clobber (match_operand:QI 2 "register_operand" "=&d"))]
"reload_completed"
"* return output_reload_inhi (insn, operands, NULL);"
{
return output_reload_inhi (operands, operands[2], NULL);
}
[(set_attr "length" "4")
(set_attr "adjust_len" "reload_in16")
(set_attr "cc" "none")])
(define_insn "*movhi"
[(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,d,*r,q,r")
(match_operand:HI 1 "general_operand" "rL,m,rL,i,i,r,q"))]
[(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,m,d,*r,q,r")
(match_operand:HI 1 "general_operand" "r,L,m,rL,i,i,r,q"))]
"(register_operand (operands[0],HImode)
|| register_operand (operands[1],HImode) || const0_rtx == operands[1])"
"* return output_movhi (insn, operands, NULL);"
[(set_attr "length" "2,6,7,2,6,5,2")
(set_attr "cc" "none,clobber,clobber,none,clobber,none,none")])
[(set_attr "length" "2,2,6,7,2,6,5,2")
(set_attr "cc" "none,clobber,clobber,clobber,none,clobber,none,none")])
(define_peephole2 ; movw
[(set (match_operand:QI 0 "even_register_operand" "")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment