m32r.h (REGISTER_MOVE_COST, [...]): Remove.
* config/m32r/m32r.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove. * config/m32r/m32r.c (TARGET_MEMORY_MOVE_COSTS): Define. (m32r_memory_move_cost): New function. From-SVN: r163966
This commit is contained in:
parent
21e9284929
commit
7149f02cac
3 changed files with 26 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-09-07 Anatoly Sokolov <aesok@post.ru>
|
||||
|
||||
* config/m32r/m32r.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
|
||||
* config/m32r/m32r.c (TARGET_MEMORY_MOVE_COSTS): Define.
|
||||
(m32r_memory_move_cost): New function.
|
||||
|
||||
2010-09-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* config.gcc: Append t-android for Android targets.
|
||||
|
|
|
@ -89,6 +89,7 @@ static void m32r_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
|
|||
tree, int *, int);
|
||||
static void init_idents (void);
|
||||
static bool m32r_rtx_costs (rtx, int, int, int *, bool speed);
|
||||
static int m32r_memory_move_cost (enum machine_mode, reg_class_t, bool);
|
||||
static bool m32r_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
|
||||
const_tree, bool);
|
||||
static int m32r_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
|
||||
|
@ -152,6 +153,9 @@ static const struct attribute_spec m32r_attribute_table[] =
|
|||
#undef TARGET_IN_SMALL_DATA_P
|
||||
#define TARGET_IN_SMALL_DATA_P m32r_in_small_data_p
|
||||
|
||||
|
||||
#undef TARGET_MEMORY_MOVE_COSTS
|
||||
#define TARGET_MEMORY_MOVE_COSTS m32r_memory_move_costs
|
||||
#undef TARGET_RTX_COSTS
|
||||
#define TARGET_RTX_COSTS m32r_rtx_costs
|
||||
#undef TARGET_ADDRESS_COST
|
||||
|
@ -1366,6 +1370,22 @@ m32r_issue_rate (void)
|
|||
|
||||
/* Cost functions. */
|
||||
|
||||
/* Implement TARGET_HANDLE_OPTION.
|
||||
|
||||
Memory is 3 times as expensive as registers.
|
||||
??? Is that the right way to look at it? */
|
||||
|
||||
static int
|
||||
m32r_memory_move_cost (enum machine_mode mode,
|
||||
reg_class_t rclass ATTRIBUTE_UNUSED,
|
||||
bool in ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (GET_MODE_SIZE (mode) <= UNITS_PER_WORD)
|
||||
return 6;
|
||||
else
|
||||
return 12;
|
||||
}
|
||||
|
||||
static bool
|
||||
m32r_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
|
||||
bool speed ATTRIBUTE_UNUSED)
|
||||
|
|
|
@ -1067,16 +1067,6 @@ L2: .word STATIC
|
|||
|
||||
/* Costs. */
|
||||
|
||||
/* Compute extra cost of moving data between one register class
|
||||
and another. */
|
||||
#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) 2
|
||||
|
||||
/* Compute the cost of moving data between registers and memory. */
|
||||
/* Memory is 3 times as expensive as registers.
|
||||
??? Is that the right way to look at it? */
|
||||
#define MEMORY_MOVE_COST(MODE,CLASS,IN_P) \
|
||||
(GET_MODE_SIZE (MODE) <= UNITS_PER_WORD ? 6 : 12)
|
||||
|
||||
/* The cost of a branch insn. */
|
||||
/* A value of 2 here causes GCC to avoid using branches in comparisons like
|
||||
while (a < N && a). Branches aren't that expensive on the M32R so
|
||||
|
|
Loading…
Add table
Reference in a new issue