avr.c (ret_cond_branch): New argument (reverse) added.
* config/avr/avr.c (ret_cond_branch): New argument (reverse) added. If REVERSE nonzero then condition code in X must be reversed. (encode_section_info): Optimise if/else. (avr_function_value): Fix formatting. * config/avr/avr.md (branch): Call to ret_cond_branch changed. (difficult_branch): Likewise. (rvbranch): Likewise. (difficult_rvbranch): Likewise. * config/avr/avr-protos.h (ret_cond_branch): Prototype changed. * config/avr/libgcc.S: Fix comment. From-SVN: r39163
This commit is contained in:
parent
04e91ffb1e
commit
56b871c135
|
@ -1,3 +1,19 @@
|
|||
Sun Jan 21 09:44:17 2001 Denis Chertykov <denisc@overta.ru>
|
||||
|
||||
* config/avr/avr.c (ret_cond_branch): New argument (reverse) added.
|
||||
If REVERSE nonzero then condition code in X must be reversed.
|
||||
(encode_section_info): Optimise if/else.
|
||||
(avr_function_value): Fix formatting.
|
||||
|
||||
* config/avr/avr.md (branch): Call to ret_cond_branch changed.
|
||||
(difficult_branch): Likewise.
|
||||
(rvbranch): Likewise.
|
||||
(difficult_rvbranch): Likewise.
|
||||
|
||||
* config/avr/avr-protos.h (ret_cond_branch): Prototype changed.
|
||||
|
||||
* config/avr/libgcc.S: Fix comment.
|
||||
|
||||
2001-01-20 Michael Sokolov <msokolov@ivan.Harhan.ORG>
|
||||
|
||||
* sdbout.c (PUT_SDB_DEF): Fix after last bogus change.
|
||||
|
|
|
@ -95,7 +95,7 @@ extern const char * out_movsi_mr_r PARAMS ((rtx insn, rtx op[], int *l));
|
|||
extern const char * output_movsisf PARAMS ((rtx insn, rtx operands[], int *l));
|
||||
extern const char * out_tstsi PARAMS ((rtx insn, int *l));
|
||||
extern const char * out_tsthi PARAMS ((rtx insn, int *l));
|
||||
extern const char * ret_cond_branch PARAMS ((RTX_CODE cond, int len));
|
||||
extern const char * ret_cond_branch PARAMS ((rtx x, int len, int reverse));
|
||||
|
||||
extern const char * ashlqi3_out PARAMS ((rtx insn, rtx operands[], int *len));
|
||||
extern const char * ashlhi3_out PARAMS ((rtx insn, rtx operands[], int *len));
|
||||
|
|
|
@ -1194,14 +1194,19 @@ avr_jump_mode (x, insn)
|
|||
return 2;
|
||||
}
|
||||
|
||||
/* return a AVR condition jump commands.
|
||||
LEN is a number returned by avr_jump_mode function. */
|
||||
/* return an AVR condition jump commands.
|
||||
X is a comparison RTX.
|
||||
LEN is a number returned by avr_jump_mode function.
|
||||
if REVERSE nonzero then condition code in X must be reversed. */
|
||||
|
||||
const char *
|
||||
ret_cond_branch (cond, len)
|
||||
RTX_CODE cond;
|
||||
ret_cond_branch (x, len, reverse)
|
||||
rtx x;
|
||||
int len;
|
||||
int reverse;
|
||||
{
|
||||
RTX_CODE cond = reverse ? reverse_condition (GET_CODE (x)) : GET_CODE (x);
|
||||
|
||||
switch (cond)
|
||||
{
|
||||
case GT:
|
||||
|
@ -1262,6 +1267,22 @@ ret_cond_branch (cond, len)
|
|||
AS1 (brsh,_PC_+4) CR_TAB
|
||||
AS1 (jmp,%0)));
|
||||
default:
|
||||
if (reverse)
|
||||
{
|
||||
switch (len)
|
||||
{
|
||||
case 1:
|
||||
return AS1 (br%k1,%0);
|
||||
case 2:
|
||||
return (AS1 (br%j1,_PC_+2) CR_TAB
|
||||
AS1 (rjmp,%0));
|
||||
default:
|
||||
return (AS1 (br%j1,_PC_+4) CR_TAB
|
||||
AS1 (jmp,%0));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (len)
|
||||
{
|
||||
case 1:
|
||||
|
@ -1274,6 +1295,7 @@ ret_cond_branch (cond, len)
|
|||
AS1 (jmp,%0));
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -4736,8 +4758,7 @@ encode_section_info (decl)
|
|||
{
|
||||
if (TREE_CODE (decl) == FUNCTION_DECL)
|
||||
SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
|
||||
|
||||
if ((TREE_STATIC (decl) || DECL_EXTERNAL (decl))
|
||||
else if ((TREE_STATIC (decl) || DECL_EXTERNAL (decl))
|
||||
&& TREE_CODE (decl) == VAR_DECL
|
||||
&& avr_progmem_p (decl))
|
||||
{
|
||||
|
@ -5102,6 +5123,7 @@ avr_function_value (type, func)
|
|||
tree func ATTRIBUTE_UNUSED;
|
||||
{
|
||||
unsigned int offs;
|
||||
|
||||
if (TYPE_MODE (type) != BLKmode)
|
||||
return avr_libcall_value (TYPE_MODE (type));
|
||||
|
||||
|
|
|
@ -1937,8 +1937,7 @@
|
|||
"! (GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|
||||
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
|
||||
"*
|
||||
return ret_cond_branch (GET_CODE (operands[1]),
|
||||
avr_jump_mode (operands[0],insn));"
|
||||
return ret_cond_branch (operands[1], avr_jump_mode (operands[0],insn), 0);"
|
||||
[(set_attr "type" "branch")
|
||||
(set_attr "cc" "clobber")])
|
||||
|
||||
|
@ -1952,8 +1951,7 @@
|
|||
"(GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|
||||
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
|
||||
"*
|
||||
return ret_cond_branch (GET_CODE (operands[1]),
|
||||
avr_jump_mode (operands[0],insn));"
|
||||
return ret_cond_branch (operands[1], avr_jump_mode (operands[0],insn), 0);"
|
||||
[(set_attr "type" "branch1")
|
||||
(set_attr "cc" "clobber")])
|
||||
|
||||
|
@ -1968,8 +1966,7 @@
|
|||
"! (GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|
||||
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
|
||||
"*
|
||||
return ret_cond_branch (reverse_condition (GET_CODE (operands[1])),
|
||||
avr_jump_mode (operands[0],insn));"
|
||||
return ret_cond_branch (operands[1], avr_jump_mode (operands[0], insn), 1);"
|
||||
[(set_attr "type" "branch1")
|
||||
(set_attr "cc" "clobber")])
|
||||
|
||||
|
@ -1982,8 +1979,7 @@
|
|||
"(GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == GTU
|
||||
|| GET_CODE (operands[1]) == LE || GET_CODE (operands[1]) == LEU)"
|
||||
"*
|
||||
return ret_cond_branch (reverse_condition (GET_CODE (operands[1])),
|
||||
avr_jump_mode (operands[0],insn));"
|
||||
return ret_cond_branch (operands[1], avr_jump_mode (operands[0], insn), 1);"
|
||||
[(set_attr "type" "branch")
|
||||
(set_attr "cc" "clobber")])
|
||||
|
||||
|
|
|
@ -597,7 +597,7 @@ __prologue_saves__:
|
|||
#endif /* defined (L_prologue) */
|
||||
|
||||
/*
|
||||
* This is a epilogue subroutine
|
||||
* This is an epilogue subroutine
|
||||
*/
|
||||
#if defined (L_epilogue)
|
||||
|
||||
|
|
Loading…
Reference in New Issue