Commit 1f494b6d by Jan Hubicka Committed by Jan Hubicka

sparc.h (BRANCH_COST): Fix macro definition.


	* sparc.h (BRANCH_COST): Fix macro definition.
	* avr.c (avr_operand_rtx_cost): Add speed argument.
	(avr_rtx_costs): Update calls of avr_operand_rtx_cost.

From-SVN: r139824
parent f5e85907
2008-08-31 Jan Hubicka <jh@suse.cz>
* sparc.h (BRANCH_COST): Fix macro definition.
* avr.c (avr_operand_rtx_cost): Add speed argument.
(avr_rtx_costs): Update calls of avr_operand_rtx_cost.
2008-08-31 Richard Guenther <rguenther@suse.de> 2008-08-31 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (verify_types_in_gimple_assign): Dump mismatched * tree-cfg.c (verify_types_in_gimple_assign): Dump mismatched
......
...@@ -80,7 +80,7 @@ static unsigned int avr_section_type_flags (tree, const char *, int); ...@@ -80,7 +80,7 @@ static unsigned int avr_section_type_flags (tree, const char *, int);
static void avr_reorg (void); static void avr_reorg (void);
static void avr_asm_out_ctor (rtx, int); static void avr_asm_out_ctor (rtx, int);
static void avr_asm_out_dtor (rtx, int); static void avr_asm_out_dtor (rtx, int);
static int avr_operand_rtx_cost (rtx, enum machine_mode, enum rtx_code); static int avr_operand_rtx_cost (rtx, enum machine_mode, enum rtx_code, bool);
static bool avr_rtx_costs (rtx, int, int, int *, bool); static bool avr_rtx_costs (rtx, int, int, int *, bool);
static int avr_address_cost (rtx, bool); static int avr_address_cost (rtx, bool);
static bool avr_return_in_memory (const_tree, const_tree); static bool avr_return_in_memory (const_tree, const_tree);
...@@ -4992,7 +4992,7 @@ order_regs_for_local_alloc (void) ...@@ -4992,7 +4992,7 @@ order_regs_for_local_alloc (void)
static int static int
avr_operand_rtx_cost (rtx x, enum machine_mode mode, enum rtx_code outer, avr_operand_rtx_cost (rtx x, enum machine_mode mode, enum rtx_code outer,
bool speed ATTRIBUTE_UNUSED) bool speed)
{ {
enum rtx_code code = GET_CODE (x); enum rtx_code code = GET_CODE (x);
int total; int total;
...@@ -5012,7 +5012,7 @@ avr_operand_rtx_cost (rtx x, enum machine_mode mode, enum rtx_code outer, ...@@ -5012,7 +5012,7 @@ avr_operand_rtx_cost (rtx x, enum machine_mode mode, enum rtx_code outer,
} }
total = 0; total = 0;
avr_rtx_costs (x, code, outer, &total); avr_rtx_costs (x, code, outer, &total, speed);
return total; return total;
} }
...@@ -5062,7 +5062,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5062,7 +5062,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
default: default:
return false; return false;
} }
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
return true; return true;
case ABS: case ABS:
...@@ -5076,24 +5076,24 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5076,24 +5076,24 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
default: default:
return false; return false;
} }
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
return true; return true;
case NOT: case NOT:
*total = COSTS_N_INSNS (GET_MODE_SIZE (mode)); *total = COSTS_N_INSNS (GET_MODE_SIZE (mode));
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
return true; return true;
case ZERO_EXTEND: case ZERO_EXTEND:
*total = COSTS_N_INSNS (GET_MODE_SIZE (mode) *total = COSTS_N_INSNS (GET_MODE_SIZE (mode)
- GET_MODE_SIZE (GET_MODE (XEXP (x, 0)))); - GET_MODE_SIZE (GET_MODE (XEXP (x, 0))));
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
return true; return true;
case SIGN_EXTEND: case SIGN_EXTEND:
*total = COSTS_N_INSNS (GET_MODE_SIZE (mode) + 2 *total = COSTS_N_INSNS (GET_MODE_SIZE (mode) + 2
- GET_MODE_SIZE (GET_MODE (XEXP (x, 0)))); - GET_MODE_SIZE (GET_MODE (XEXP (x, 0))));
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
return true; return true;
case PLUS: case PLUS:
...@@ -5102,14 +5102,14 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5102,14 +5102,14 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
case QImode: case QImode:
*total = COSTS_N_INSNS (1); *total = COSTS_N_INSNS (1);
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
break; break;
case HImode: case HImode:
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (2); *total = COSTS_N_INSNS (2);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else if (INTVAL (XEXP (x, 1)) >= -63 && INTVAL (XEXP (x, 1)) <= 63) else if (INTVAL (XEXP (x, 1)) >= -63 && INTVAL (XEXP (x, 1)) <= 63)
*total = COSTS_N_INSNS (1); *total = COSTS_N_INSNS (1);
...@@ -5121,7 +5121,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5121,7 +5121,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (4); *total = COSTS_N_INSNS (4);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else if (INTVAL (XEXP (x, 1)) >= -63 && INTVAL (XEXP (x, 1)) <= 63) else if (INTVAL (XEXP (x, 1)) >= -63 && INTVAL (XEXP (x, 1)) <= 63)
*total = COSTS_N_INSNS (1); *total = COSTS_N_INSNS (1);
...@@ -5132,22 +5132,22 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5132,22 +5132,22 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
default: default:
return false; return false;
} }
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
return true; return true;
case MINUS: case MINUS:
case AND: case AND:
case IOR: case IOR:
*total = COSTS_N_INSNS (GET_MODE_SIZE (mode)); *total = COSTS_N_INSNS (GET_MODE_SIZE (mode));
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
return true; return true;
case XOR: case XOR:
*total = COSTS_N_INSNS (GET_MODE_SIZE (mode)); *total = COSTS_N_INSNS (GET_MODE_SIZE (mode));
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
return true; return true;
case MULT: case MULT:
...@@ -5174,8 +5174,8 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5174,8 +5174,8 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
default: default:
return false; return false;
} }
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
return true; return true;
case DIV: case DIV:
...@@ -5186,8 +5186,8 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5186,8 +5186,8 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
*total = COSTS_N_INSNS (AVR_HAVE_JMP_CALL ? 2 : 1); *total = COSTS_N_INSNS (AVR_HAVE_JMP_CALL ? 2 : 1);
else else
return false; return false;
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
return true; return true;
case ASHIFT: case ASHIFT:
...@@ -5197,7 +5197,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5197,7 +5197,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (!speed ? 4 : 17); *total = COSTS_N_INSNS (!speed ? 4 : 17);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else else
{ {
...@@ -5215,7 +5215,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5215,7 +5215,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (!speed ? 5 : 41); *total = COSTS_N_INSNS (!speed ? 5 : 41);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else else
switch (INTVAL (XEXP (x, 1))) switch (INTVAL (XEXP (x, 1)))
...@@ -5245,14 +5245,14 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5245,14 +5245,14 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
*total = COSTS_N_INSNS (!speed ? 5 : 8); *total = COSTS_N_INSNS (!speed ? 5 : 8);
break; break;
case 6: case 6:
*total = COSTS_N_INSNS (ptimize_size ? 5 : 9); *total = COSTS_N_INSNS (!speed ? 5 : 9);
break; break;
case 5: case 5:
*total = COSTS_N_INSNS (!speed ? 5 : 10); *total = COSTS_N_INSNS (!speed ? 5 : 10);
break; break;
default: default:
*total = COSTS_N_INSNS (!speed ? 5 : 41); *total = COSTS_N_INSNS (!speed ? 5 : 41);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
break; break;
...@@ -5260,7 +5260,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5260,7 +5260,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (!speed ? 7 : 113); *total = COSTS_N_INSNS (!speed ? 7 : 113);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else else
switch (INTVAL (XEXP (x, 1))) switch (INTVAL (XEXP (x, 1)))
...@@ -5284,14 +5284,14 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5284,14 +5284,14 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
break; break;
default: default:
*total = COSTS_N_INSNS (!speed ? 7 : 113); *total = COSTS_N_INSNS (!speed ? 7 : 113);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
break; break;
default: default:
return false; return false;
} }
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
return true; return true;
case ASHIFTRT: case ASHIFTRT:
...@@ -5301,7 +5301,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5301,7 +5301,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (!speed ? 4 : 17); *total = COSTS_N_INSNS (!speed ? 4 : 17);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else else
{ {
...@@ -5321,7 +5321,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5321,7 +5321,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (!speed ? 5 : 41); *total = COSTS_N_INSNS (!speed ? 5 : 41);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else else
switch (INTVAL (XEXP (x, 1))) switch (INTVAL (XEXP (x, 1)))
...@@ -5357,7 +5357,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5357,7 +5357,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
break; break;
default: default:
*total = COSTS_N_INSNS (!speed ? 5 : 41); *total = COSTS_N_INSNS (!speed ? 5 : 41);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
break; break;
...@@ -5365,7 +5365,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5365,7 +5365,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (!speed ? 7 : 113); *total = COSTS_N_INSNS (!speed ? 7 : 113);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else else
switch (INTVAL (XEXP (x, 1))) switch (INTVAL (XEXP (x, 1)))
...@@ -5389,14 +5389,14 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5389,14 +5389,14 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
break; break;
default: default:
*total = COSTS_N_INSNS (!speed ? 7 : 113); *total = COSTS_N_INSNS (!speed ? 7 : 113);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
break; break;
default: default:
return false; return false;
} }
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
return true; return true;
case LSHIFTRT: case LSHIFTRT:
...@@ -5406,7 +5406,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5406,7 +5406,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (!speed ? 4 : 17); *total = COSTS_N_INSNS (!speed ? 4 : 17);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else else
{ {
...@@ -5424,7 +5424,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5424,7 +5424,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (!speed ? 5 : 41); *total = COSTS_N_INSNS (!speed ? 5 : 41);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else else
switch (INTVAL (XEXP (x, 1))) switch (INTVAL (XEXP (x, 1)))
...@@ -5463,7 +5463,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5463,7 +5463,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
break; break;
default: default:
*total = COSTS_N_INSNS (!speed ? 5 : 41); *total = COSTS_N_INSNS (!speed ? 5 : 41);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
break; break;
...@@ -5471,7 +5471,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5471,7 +5471,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
{ {
*total = COSTS_N_INSNS (!speed ? 7 : 113); *total = COSTS_N_INSNS (!speed ? 7 : 113);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
else else
switch (INTVAL (XEXP (x, 1))) switch (INTVAL (XEXP (x, 1)))
...@@ -5495,14 +5495,14 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5495,14 +5495,14 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
break; break;
default: default:
*total = COSTS_N_INSNS (!speed ? 7 : 113); *total = COSTS_N_INSNS (!speed ? 7 : 113);
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
} }
break; break;
default: default:
return false; return false;
} }
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
return true; return true;
case COMPARE: case COMPARE:
...@@ -5511,13 +5511,13 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5511,13 +5511,13 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
case QImode: case QImode:
*total = COSTS_N_INSNS (1); *total = COSTS_N_INSNS (1);
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
break; break;
case HImode: case HImode:
*total = COSTS_N_INSNS (2); *total = COSTS_N_INSNS (2);
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
else if (INTVAL (XEXP (x, 1)) != 0) else if (INTVAL (XEXP (x, 1)) != 0)
*total += COSTS_N_INSNS (1); *total += COSTS_N_INSNS (1);
break; break;
...@@ -5525,7 +5525,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5525,7 +5525,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
case SImode: case SImode:
*total = COSTS_N_INSNS (4); *total = COSTS_N_INSNS (4);
if (GET_CODE (XEXP (x, 1)) != CONST_INT) if (GET_CODE (XEXP (x, 1)) != CONST_INT)
*total += avr_operand_rtx_cost (XEXP (x, 1), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 1), mode, code, speed);
else if (INTVAL (XEXP (x, 1)) != 0) else if (INTVAL (XEXP (x, 1)) != 0)
*total += COSTS_N_INSNS (3); *total += COSTS_N_INSNS (3);
break; break;
...@@ -5533,7 +5533,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total, ...@@ -5533,7 +5533,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
default: default:
return false; return false;
} }
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code); *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, speed);
return true; return true;
default: default:
......
...@@ -2196,7 +2196,7 @@ do { \ ...@@ -2196,7 +2196,7 @@ do { \
On Niagara-2, a not-taken branch costs 1 cycle whereas a taken On Niagara-2, a not-taken branch costs 1 cycle whereas a taken
branch costs 6 cycles. */ branch costs 6 cycles. */
#define BRANCH_COST (speed_p, predictable_p) \ #define BRANCH_COST(speed_p, predictable_p) \
((sparc_cpu == PROCESSOR_V9 \ ((sparc_cpu == PROCESSOR_V9 \
|| sparc_cpu == PROCESSOR_ULTRASPARC) \ || sparc_cpu == PROCESSOR_ULTRASPARC) \
? 7 \ ? 7 \
......
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