Commit 1cb39658 authored by denisc's avatar denisc
Browse files

* config/avr/avr-protos.h (extra_constraint): change a type of

	second argument from char to int to avoid warnings.
	(asm_output_byte): Likewise.

	* config/avr/avr.c (MAX_LD_OFFSET) New macro.
	(initial_elimination_offset): Handle elimination from
	FRAME_POINTER_REGNUM to STACK_POINTER_REGNUM.
	(legitimate_address_p): Use MAX_LD_OFFSET.
	(legitimize_address): Likewise.
	(out_movqi_r_mr): Likewise.
	(out_movhi_r_mr): Likewise, use `fatal_insn' instead of `fatal'.
	(out_movsi_r_mr): Use MAX_LD_OFFSET.
	(out_movsi_mr_r): Likewise.
	(out_movqi_mr_r): Likewise.
	(out_movhi_mr_r): Likewise.
	(notice_update_cc): Correct CC for the ashrqi3 with the shift
	count as CONST_INT != 6.
	(ashlqi3_out): Coding style modifications. Run `fatal_insn' if
	shift count is a CONSTANT_P, but not a CONST_INT.
	(ashlhi3_out): Coding style modifications.
	(ashlsi3_out): Likewise.
	(ashrhi3_out): Likewise.
	(ashrsi3_out): Likewise.
	(lshrhi3_out): Likewise.
	(lshrsi3_out): Likewise.
	(ashrqi3_out): Generate shift for any known constant count without
	scratch register. Run `fatal_insn' if shift count is a CONSTANT_P,
	but not a CONST_INT.
	(lshrqi3_out): Coding style modifications. Run `fatal_insn' if
	shift count is a CONSTANT_P, but not a CONST_INT.
	(extra_constraint): change a type of
	second argument from char to int to avoid warnings.
	(asm_output_byte): Likewise.
	(asm_file_end): Output size generated commands count as a hex
	number too.

	* config/avr/avr.h (RETURN_ADDR_RTX): New macro.

	* config/avr/avr.md (addhi3): Fragment commented by &&0 is
	removed.
	(ashlqi3): Values of "length" attribute changed. Shift count
	uses constraints 'n' instead of 'i'.
	(ashrqi3): Likewise. Values of "cc" attribute changed. Generate
	shifts without clobber register.
	(lshrqi3): Shift count uses constraints 'n' instead of 'i'.
	(call_insn): Correct test for which_alternative == 1 (was 0).
	(call_value_insn): Likewise.

	* config/avr/t-avr: Remove definition of FLOAT while generates
	fp-bit.c


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33802 138bc75d-0d04-0410-961f-82ee72b054a4
parent 85eaefbc
Tue May 9 20:52:43 2000 Denis Chertykov <denisc@overta.ru>
* config/avr/avr-protos.h (extra_constraint): change a type of
second argument from char to int to avoid warnings.
(asm_output_byte): Likewise.
* config/avr/avr.c (MAX_LD_OFFSET) New macro.
(initial_elimination_offset): Handle elimination from
FRAME_POINTER_REGNUM to STACK_POINTER_REGNUM.
(legitimate_address_p): Use MAX_LD_OFFSET.
(legitimize_address): Likewise.
(out_movqi_r_mr): Likewise.
(out_movhi_r_mr): Likewise, use `fatal_insn' instead of `fatal'.
(out_movsi_r_mr): Use MAX_LD_OFFSET.
(out_movsi_mr_r): Likewise.
(out_movqi_mr_r): Likewise.
(out_movhi_mr_r): Likewise.
(notice_update_cc): Correct CC for the ashrqi3 with the shift
count as CONST_INT != 6.
(ashlqi3_out): Coding style modifications. Run `fatal_insn' if
shift count is a CONSTANT_P, but not a CONST_INT.
(ashlhi3_out): Coding style modifications.
(ashlsi3_out): Likewise.
(ashrhi3_out): Likewise.
(ashrsi3_out): Likewise.
(lshrhi3_out): Likewise.
(lshrsi3_out): Likewise.
(ashrqi3_out): Generate shift for any known constant count without
scratch register. Run `fatal_insn' if shift count is a CONSTANT_P,
but not a CONST_INT.
(lshrqi3_out): Coding style modifications. Run `fatal_insn' if
shift count is a CONSTANT_P, but not a CONST_INT.
(extra_constraint): change a type of
second argument from char to int to avoid warnings.
(asm_output_byte): Likewise.
(asm_file_end): Output size generated commands count as a hex
number too.
* config/avr/avr.h (RETURN_ADDR_RTX): New macro.
* config/avr/avr.md (addhi3): Fragment commented by &&0 is
removed.
(ashlqi3): Values of "length" attribute changed. Shift count
uses constraints 'n' instead of 'i'.
(ashrqi3): Likewise. Values of "cc" attribute changed. Generate
shifts without clobber register.
(lshrqi3): Shift count uses constraints 'n' instead of 'i'.
(call_insn): Correct test for which_alternative == 1 (was 0).
(call_value_insn): Likewise.
* config/avr/t-avr: Remove definition of FLOAT while generates
fp-bit.c
2000-05-09 Bruce Korb <bkorb@gnu.org>
 
* fixinc/check.tpl: Template for checking fixes
......
......@@ -110,7 +110,7 @@ extern char * lshrsi3_out PARAMS ((rtx insn, rtx operands[], int *len));
extern enum reg_class preferred_reload_class PARAMS ((rtx x,
enum reg_class class));
extern int avr_address_cost PARAMS ((rtx x));
extern int extra_constraint PARAMS ((rtx x, char c));
extern int extra_constraint PARAMS ((rtx x, int c));
extern rtx legitimize_address PARAMS ((rtx x, rtx oldx,
enum machine_mode mode));
extern int adjust_insn_length PARAMS ((rtx insn, int len));
......@@ -123,7 +123,7 @@ extern int default_rtx_costs PARAMS ((rtx X, RTX_CODE code,
RTX_CODE outer_code));
extern void asm_output_char PARAMS ((FILE *file, rtx value));
extern void asm_output_short PARAMS ((FILE *file, rtx value));
extern void asm_output_byte PARAMS ((FILE *file, char value));
extern void asm_output_byte PARAMS ((FILE *file, int value));
extern enum reg_class secondary_input_reload_class PARAMS ((enum reg_class,
enum machine_mode,
rtx));
......
This diff is collapsed.
......@@ -1079,6 +1079,9 @@ enum reg_class {
registers. This macro must be defined if `ELIMINABLE_REGS' is
defined. */
#define RETURN_ADDR_RTX(count, x) \
gen_rtx_MEM (Pmode, memory_address (Pmode, plus_constant (tem, 1)))
#define PUSH_ROUNDING(NPUSHED) (NPUSHED)
/* A C expression that is the number of bytes actually pushed onto the
stack when an instruction attempts to push NPUSHED bytes.
......
......@@ -254,7 +254,7 @@
case 1: /* mov r,L */
return (AS1 (clr,%A0) CR_TAB
AS1 (clr,%B0));
case 2: /* mov r,d */
case 2: /* ld d,i */
if (operands[1] == const1_rtx
&& (link = find_reg_note (insn, REG_WAS_0, 0))
/* Make sure the insn that stored the 0 is still present. */
......@@ -272,7 +272,7 @@
return out_movhi_r_mr (insn, operands, NULL);
case 4: /* mov m,r*/
{
rtx save1=NULL;
rtx save1 = NULL;
if (operands[1] == const0_rtx)
{
save1 = operands[1];
......@@ -543,15 +543,6 @@
short tmp = INTVAL (operands[2]);
operands[2] = GEN_INT(tmp);
}
if (! (reload_completed | reload_in_progress))
{
if (REGNO (operands[0]) != REGNO (operands[1])
&& REGNO (operands[0]) != REGNO (operands[2])&&0)
{
emit_move_insn (operands[0], operands[1]);
operands[1] = operands[0];
}
}
}")
......@@ -871,10 +862,10 @@
(define_insn "ashlqi3"
[(set (match_operand:QI 0 "register_operand" "=r,!d,r,r")
(ashift:QI (match_operand:QI 1 "register_operand" "0,0,0,0")
(match_operand:QI 2 "general_operand" "r,i,i,Qm")))]
(match_operand:QI 2 "general_operand" "r,n,n,Qm")))]
""
"* return ashlqi3_out (insn, operands, NULL);"
[(set_attr "length" "6,4,6,7")
[(set_attr "length" "5,4,6,7")
(set_attr "cc" "clobber,set_czn,set_czn,clobber")])
(define_insn "ashlhi3"
......@@ -903,12 +894,11 @@
(define_insn "ashrqi3"
[(set (match_operand:QI 0 "register_operand" "=r,r,r,r,r")
(ashiftrt:QI (match_operand:QI 1 "register_operand" "0,0,0,0,0")
(match_operand:QI 2 "general_operand" "r,P,K,i,Qm")))
(clobber (match_scratch:QI 3 "=X,X,X,&d,X"))]
(match_operand:QI 2 "general_operand" "r,P,K,n,Qm")))]
""
"* return ashrqi3_out (insn,operands, NULL);"
[(set_attr "length" "6,1,2,4,7")
(set_attr "cc" "clobber,clobber,clobber,clobber,clobber")])
"* return ashrqi3_out (insn, operands, NULL);"
[(set_attr "length" "5,1,2,5,7")
(set_attr "cc" "clobber,set_zn,set_zn,clobber,clobber")])
(define_insn "ashrhi3"
[(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r,r")
......@@ -936,7 +926,7 @@
(define_insn "lshrqi3"
[(set (match_operand:QI 0 "register_operand" "=r,d,r,r")
(lshiftrt:QI (match_operand:QI 1 "register_operand" "0,0,0,0")
(match_operand:QI 2 "general_operand" "r,i,i,Qm")))]
(match_operand:QI 2 "general_operand" "r,n,n,Qm")))]
""
"* return lshrqi3_out (insn,operands, NULL);"
[(set_attr "length" "6,4,6,7")
......@@ -1621,7 +1611,7 @@
(set (attr "length")
(cond [(eq (symbol_ref "which_alternative") (const_int 0))
(const_int 1)
(eq (symbol_ref "which_alternative") (const_int 0))
(eq (symbol_ref "which_alternative") (const_int 1))
(const_int 3)
(eq (symbol_ref "!AVR_MEGA")
(const_int 0))
......@@ -1651,7 +1641,7 @@
(set (attr "length")
(cond [(eq (symbol_ref "which_alternative") (const_int 0))
(const_int 1)
(eq (symbol_ref "which_alternative") (const_int 0))
(eq (symbol_ref "which_alternative") (const_int 1))
(const_int 3)
(eq (symbol_ref "!AVR_MEGA")
(const_int 0))
......
......@@ -32,7 +32,6 @@ TARGET_LIBGCC2_CFLAGS = -DDF=SF -Dinhibit_libc
#LIBGCC2 = $(LIBGCC1)
fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/avr/t-avr
echo '#define FLOAT' > fp-bit.c
echo '#define FLOAT_ONLY' >> fp-bit.c
echo '#define CMPtype QItype' >> fp-bit.c
echo '#define DF SF' >> fp-bit.c
......
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