ip2k-protos.h (function_prologue, [...]): Update to match target hook specification.
* ip2k-protos.h (function_prologue, function_epilogue, encode_section_info): Update to match target hook specification. * ip2k.c: Wrap `MDR' code in IP2K_MD_REORG_PASS. (function_prologue, function_epilogue, encode_section_info): Update to match target hook specification. * ip2k.h (SELECT_SECTION, SELECT_RTX_SECTION, ASM_OPEN_PAREN, ASM_CLOSE_PAREN, EASY_DIV_EXPR): Delete. (NOTICE_UPDATE_CC): Cast to void. * ip2k.md: Add defaults in switch statements. From-SVN: r56809
This commit is contained in:
parent
0484cb35de
commit
c8bf1a1a91
5 changed files with 71 additions and 57 deletions
|
@ -1,3 +1,15 @@
|
|||
2002-09-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* ip2k-protos.h (function_prologue, function_epilogue,
|
||||
encode_section_info): Update to match target hook specification.
|
||||
* ip2k.c: Wrap `MDR' code in IP2K_MD_REORG_PASS.
|
||||
(function_prologue, function_epilogue, encode_section_info):
|
||||
Update to match target hook specification.
|
||||
* ip2k.h (SELECT_SECTION, SELECT_RTX_SECTION, ASM_OPEN_PAREN,
|
||||
ASM_CLOSE_PAREN, EASY_DIV_EXPR): Delete.
|
||||
(NOTICE_UPDATE_CC): Cast to void.
|
||||
* ip2k.md: Add defaults in switch statements.
|
||||
|
||||
2002-09-04 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
* doc/trouble.texi (Interoperation): Update information about C++ ABI
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
extern void asm_file_start PARAMS ((FILE *));
|
||||
extern void asm_file_end PARAMS ((FILE *));
|
||||
|
||||
extern void function_prologue PARAMS ((FILE *, int));
|
||||
extern void function_epilogue PARAMS ((FILE *, int));
|
||||
extern void function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
|
||||
extern void function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
|
||||
extern int find_one_set_bit_p PARAMS ((HOST_WIDE_INT));
|
||||
extern int find_one_clear_bit_p PARAMS ((HOST_WIDE_INT));
|
||||
|
||||
#ifdef TREE_CODE
|
||||
extern void unique_section PARAMS ((tree, int));
|
||||
extern void encode_section_info PARAMS ((tree));
|
||||
extern void encode_section_info PARAMS ((tree, int));
|
||||
extern void asm_output_section_name PARAMS ((FILE *, tree, const char *,
|
||||
int));
|
||||
extern int valid_machine_type_attribute PARAMS ((tree, tree, tree, tree));
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#define CHAIN_FRAMES (frame_pointer_needed || FRAME_POINTER_REQUIRED)
|
||||
|
||||
static int ip2k_naked_function_p PARAMS ((tree));
|
||||
#ifdef IP2K_MD_REORG_PASS
|
||||
static void mdr_resequence_xy_yx PARAMS ((rtx));
|
||||
static void mdr_pres_replace_and_recurse PARAMS ((rtx, rtx, rtx));
|
||||
static void mdr_propagate_reg_equivs_sequence PARAMS ((rtx, rtx, rtx));
|
||||
|
@ -59,10 +60,7 @@ static void mdr_propagate_reg_equivs PARAMS ((rtx));
|
|||
static int track_dp_reload PARAMS ((rtx , rtx *, int , int));
|
||||
static void mdr_try_dp_reload_elim PARAMS ((rtx));
|
||||
static void mdr_try_move_dp_reload PARAMS ((rtx));
|
||||
static int ip2k_check_can_adjust_stack_ref PARAMS ((rtx, int));
|
||||
static void ip2k_adjust_stack_ref PARAMS ((rtx *, int));
|
||||
static void mdr_try_move_pushes PARAMS ((rtx));
|
||||
static int ip2k_xexp_not_uses_reg_for_mem PARAMS ((rtx, unsigned int));
|
||||
static void mdr_try_propagate_clr_sequence PARAMS ((rtx, unsigned int));
|
||||
static void mdr_try_propagate_clr PARAMS ((rtx));
|
||||
static void mdr_try_propagate_move_sequence PARAMS ((rtx, rtx, rtx));
|
||||
|
@ -70,6 +68,10 @@ static void mdr_try_propagate_move PARAMS ((rtx));
|
|||
static void mdr_try_remove_redundant_insns PARAMS ((rtx));
|
||||
static int track_w_reload PARAMS ((rtx, rtx *, int , int));
|
||||
static void mdr_try_wreg_elim PARAMS ((rtx));
|
||||
#endif /* IP2K_MD_REORG_PASS */
|
||||
static int ip2k_check_can_adjust_stack_ref PARAMS ((rtx, int));
|
||||
static void ip2k_adjust_stack_ref PARAMS ((rtx *, int));
|
||||
static int ip2k_xexp_not_uses_reg_for_mem PARAMS ((rtx, unsigned int));
|
||||
|
||||
|
||||
/* Initialize the GCC target structure. */
|
||||
|
@ -175,7 +177,7 @@ ip2k_naked_function_p (func)
|
|||
void
|
||||
function_prologue (file, size)
|
||||
FILE *file;
|
||||
int size;
|
||||
HOST_WIDE_INT size;
|
||||
{
|
||||
int leaf_func_p;
|
||||
int main_p;
|
||||
|
@ -297,7 +299,7 @@ function_prologue (file, size)
|
|||
void
|
||||
function_epilogue (file, size)
|
||||
FILE *file;
|
||||
int size;
|
||||
HOST_WIDE_INT size;
|
||||
{
|
||||
int leaf_func_p;
|
||||
int reg,savelimit;
|
||||
|
@ -3178,8 +3180,9 @@ valid_machine_decl_attribute (decl, attributes, attr, args)
|
|||
/* Encode section information about tree DECL. */
|
||||
|
||||
void
|
||||
encode_section_info (decl)
|
||||
encode_section_info (decl, first)
|
||||
tree decl;
|
||||
int first ATTRIBUTE_UNUSED;
|
||||
{
|
||||
if (! DECL_P (decl))
|
||||
return;
|
||||
|
@ -3366,6 +3369,7 @@ ip2k_address_cost (x)
|
|||
much cheaper and the move from this to the original source operand will be
|
||||
no more expensive than the original move. */
|
||||
|
||||
#ifdef IP2K_MD_REORG_PASS
|
||||
static void
|
||||
mdr_resequence_xy_yx (first_insn)
|
||||
rtx first_insn;
|
||||
|
@ -4111,6 +4115,7 @@ mdr_try_move_dp_reload (first_insn)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif /* IP2K_MD_REORG_PASS */
|
||||
|
||||
/* Look to see if the expression, x, can have any stack references offset by
|
||||
a fixed constant, offset. If it definitely can then returns non-zero. */
|
||||
|
@ -4204,6 +4209,7 @@ ip2k_adjust_stack_ref (x, offset)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef IP2K_MD_REORG_PASS
|
||||
/* As part of the machine-dependent reorg we look to move push instructions
|
||||
to earlier points within the file. Moving these out of the way allows more
|
||||
peepholes to match. */
|
||||
|
@ -4647,6 +4653,7 @@ mdr_try_propagate_clr (first_insn)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif /* IP2K_MD_REORG_PASS */
|
||||
|
||||
/* Look to see if the expression, x, does not make any memory references
|
||||
via the specified register. This is very conservative and only returns
|
||||
|
@ -4704,6 +4711,7 @@ ip2k_xexp_not_uses_reg_for_mem (x, regno)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef IP2K_MD_REORG_PASS
|
||||
/* Assist the following function, mdr_try_propagate_move(). */
|
||||
|
||||
static void
|
||||
|
@ -5260,6 +5268,7 @@ mdr_try_wreg_elim (first_insn)
|
|||
|
||||
free (ip2k_we_jump_targets);
|
||||
}
|
||||
#endif /* IP2K_MD_REORG_PASS */
|
||||
|
||||
/* We perform a lot of untangling of the RTL within the reorg pass since
|
||||
the IP2k requires some really bizarre (and really undesireable) things
|
||||
|
@ -5269,9 +5278,11 @@ mdr_try_wreg_elim (first_insn)
|
|||
|
||||
void
|
||||
machine_dependent_reorg (first_insn)
|
||||
rtx first_insn;
|
||||
rtx first_insn ATTRIBUTE_UNUSED;
|
||||
{
|
||||
#ifdef IP2K_MD_REORG_PASS
|
||||
rtx insn, set;
|
||||
#endif
|
||||
|
||||
CC_STATUS_INIT;
|
||||
|
||||
|
|
|
@ -1960,30 +1960,6 @@ do { \
|
|||
operation to identify the following data as writable initialized
|
||||
data. Normally `".data"' is right. */
|
||||
|
||||
|
||||
#undef SELECT_SECTION /* Hide default. */
|
||||
#define SELECT_SECTION(EXP,RELOC) data_section ()
|
||||
/* `SELECT_SECTION (EXP, RELOC)'
|
||||
A C statement or statements to switch to the appropriate section
|
||||
for output of EXP. You can assume that EXP is either a `VAR_DECL'
|
||||
node or a constant of some sort. RELOC indicates whether the
|
||||
initial value of EXP requires link-time relocations. Select the
|
||||
section by calling `text_section' or one of the alternatives for
|
||||
other sections.
|
||||
|
||||
Do not define this macro if you put all read-only variables and
|
||||
constants in the read-only data section (usually the text section). */
|
||||
|
||||
/* `SELECT_RTX_SECTION (MODE, RTX)'
|
||||
A C statement or statements to switch to the appropriate section
|
||||
for output of RTX in mode MODE. You can assume that RTX is some
|
||||
kind of constant in RTL. The argument MODE is redundant except in
|
||||
the case of a `const_int' rtx. Select the section by calling
|
||||
`text_section' or one of the alternatives for other sections.
|
||||
|
||||
Do not define this macro if you put all constants in the read-only
|
||||
data section. */
|
||||
|
||||
#define JUMP_TABLES_IN_TEXT_SECTION 1
|
||||
/* Define this macro if jump tables (for `tablejump' insns) should be
|
||||
output in the text section, along with the assembler instructions.
|
||||
|
@ -2073,18 +2049,6 @@ do { \
|
|||
If you do not define this macro, the default is that only the
|
||||
character `;' is treated as a logical line separator. */
|
||||
|
||||
#define ASM_OPEN_PAREN "("
|
||||
#define ASM_CLOSE_PAREN ")"
|
||||
/* These macros are defined as C string constant, describing the
|
||||
syntax in the assembler for grouping arithmetic expressions. The
|
||||
following definitions are correct for most assemblers:
|
||||
|
||||
#define ASM_OPEN_PAREN "("
|
||||
#define ASM_CLOSE_PAREN ")"
|
||||
|
||||
These macros are provided by `real.h' for writing the definitions of
|
||||
`ASM_OUTPUT_DOUBLE' and the like: */
|
||||
|
||||
#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
|
||||
do { \
|
||||
fputs ("\t.comm ", (STREAM)); \
|
||||
|
@ -2335,15 +2299,6 @@ do { \
|
|||
register. Most RISC machines have this property and most CISC
|
||||
machines do not. */
|
||||
|
||||
#define EASY_DIV_EXPR TRUNC_DIV_EXPR
|
||||
/* An alias for a tree code that is the easiest kind of division to
|
||||
compile code for in the general case. It may be `TRUNC_DIV_EXPR',
|
||||
`FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'. These four
|
||||
division operators differ in how they round the result to an
|
||||
integer. `EASY_DIV_EXPR' is used when it is permissible to use
|
||||
any of those kinds of division and the choice should be made on
|
||||
the basis of efficiency. */
|
||||
|
||||
#define MOVE_MAX 1
|
||||
/* The maximum number of bytes that a single instruction can move
|
||||
quickly between memory and registers or between two memory
|
||||
|
@ -2472,7 +2427,7 @@ extern int ip2k_reorg_merge_qimode;
|
|||
after execution of an instruction whose pattern is EXP.
|
||||
Do not alter them if the instruction would not alter the cc's. */
|
||||
|
||||
#define NOTICE_UPDATE_CC(EXP, INSN) (0)
|
||||
#define NOTICE_UPDATE_CC(EXP, INSN) (void)(0)
|
||||
|
||||
/* Output assembler code to FILE to increment profiler label # LABELNO
|
||||
for profiling a function entry. */
|
||||
|
|
|
@ -387,6 +387,8 @@
|
|||
if (!find_regno_note (insn, REG_DEAD, REG_IP))
|
||||
OUT_AS1 (dec, ipl);
|
||||
return \"\";
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -414,6 +416,8 @@
|
|||
if (!find_regno_note (insn, REG_DEAD, REG_IP))
|
||||
OUT_AS1 (dec, ipl);
|
||||
return \"\";
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -457,6 +461,8 @@
|
|||
OUT_AS2 (sub, ipl, w);
|
||||
}
|
||||
return \"\";
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -620,6 +626,8 @@
|
|||
AS2 (mov, %L0, w) CR_TAB
|
||||
AS1 (pop, %H2%>) CR_TAB
|
||||
AS2 (mov, %L2, w);
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -726,7 +734,9 @@
|
|||
AS1 (pop, %B2%>) CR_TAB
|
||||
AS1 (pop, %C2%>) CR_TAB
|
||||
AS2 (mov, %D2, w);
|
||||
}
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
;; We have to be *very* careful with this one to use predicates that do not
|
||||
|
@ -981,6 +991,8 @@
|
|||
p += sprintf (p, \"\;and\\tw,#$%2.2x\;or\\t%%0,w\", mask);
|
||||
return buff;
|
||||
}
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}"
|
||||
[(set_attr "skip" "yes,yes,no,no,no,no,no")
|
||||
|
@ -1145,6 +1157,8 @@
|
|||
AS2 (mov, w, %H1) CR_TAB
|
||||
AS2 (addc, 1(SP), w);
|
||||
}
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}"
|
||||
[(set_attr "clobberw" "no,yes,yes,yes,yes,yes,yes,yes")])
|
||||
|
@ -2050,6 +2064,8 @@
|
|||
AS2 (mov, %A0, w) CR_TAB
|
||||
AS2 (mov, w, %A2) CR_TAB
|
||||
AS2 (subc, %A0, w);
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -2214,6 +2230,8 @@
|
|||
AS2 (mov, %S0, w) CR_TAB
|
||||
AS2 (mov, w, %S2) CR_TAB
|
||||
AS2 (subc, %S0, w);
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -3338,6 +3356,8 @@
|
|||
AS1 (page, 1b) CR_TAB
|
||||
AS1 (jmp, 1b);
|
||||
}
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -3782,6 +3802,8 @@
|
|||
AS1 (page, 1b) CR_TAB
|
||||
AS1 (jmp, 1b);
|
||||
}
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -3848,6 +3870,8 @@
|
|||
AS2 (mulu, w, %e2) CR_TAB
|
||||
AS2 (mov, w, mulh) CR_TAB
|
||||
AS2 (mov, %0, w);
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -4202,6 +4226,8 @@
|
|||
AS1 (page, 1b) CR_TAB
|
||||
AS1 (jmp, 1b);
|
||||
}
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -4425,6 +4451,8 @@
|
|||
AS2 (mov, %L0, w) CR_TAB
|
||||
AS2 (mov, w, %H1) CR_TAB
|
||||
AS2 (mov, %H0, w);
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -5287,6 +5315,8 @@
|
|||
OUT_AS2 (mov, w, %1);
|
||||
OUT_AS2 (add, w, %5);
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
OUT_AS2 (cmp, w, %2);
|
||||
|
@ -5315,6 +5345,8 @@
|
|||
OUT_AS1 (page, __indcall);
|
||||
OUT_AS1 (jmp, __indcall%>%>);
|
||||
return \"\";
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -5595,6 +5627,8 @@
|
|||
OUT_AS1 (sz, );
|
||||
return AS1 (page, %2) CR_TAB
|
||||
AS1 (jmp, %2);
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -5641,6 +5675,8 @@
|
|||
OUT_AS1 (sz, );
|
||||
return AS1 (page, %2) CR_TAB
|
||||
AS1 (jmp, %2);
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue