+2011-05-10 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/48896
+ * config/avr/avr.c (avr_ret_register): Return unsigned int
+ instead of int.
+ (avr_function_value): Mark fn_decl_or_type as unused, don't pass
+ it to avr_libcall_value.
+ avr_expand_builtin): Use EXPAND_NORMAL as arg 4 in calls to
+ expand_expr.
+ (avr_expand_binop_builtin): Ditto.
+ (avr_expand_unop_builtin): Ditto.
+
2011-05-10 DJ Delorie <dj@redhat.com>
* config/rx/rx.h (JUMP_ALIGN, LABEL_ALIGN, LOOP_ALIGN): Define.
/* Returns register number for function return value.*/
-static inline int
+static inline unsigned int
avr_ret_register (void)
{
return 24;
function returns a value of data type VALTYPE. */
static rtx
-avr_function_value (const_tree type, const_tree fn_decl_or_type,
- bool outgoing ATTRIBUTE_UNUSED)
+avr_function_value (const_tree type,
+ const_tree fn_decl_or_type ATTRIBUTE_UNUSED,
+ bool outgoing ATTRIBUTE_UNUSED)
{
unsigned int offs;
- const_rtx func = fn_decl_or_type;
-
- if (fn_decl_or_type
- && !DECL_P (fn_decl_or_type))
- fn_decl_or_type = NULL;
if (TYPE_MODE (type) != BLKmode)
- return avr_libcall_value (TYPE_MODE (type), func);
+ return avr_libcall_value (TYPE_MODE (type), NULL_RTX);
offs = int_size_in_bytes (type);
if (offs < 2)
{
rtx pat;
tree arg0 = CALL_EXPR_ARG (exp, 0);
- rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0);
+ rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, EXPAND_NORMAL);
enum machine_mode op0mode = GET_MODE (op0);
enum machine_mode tmode = insn_data[icode].operand[0].mode;
enum machine_mode mode0 = insn_data[icode].operand[1].mode;
rtx pat;
tree arg0 = CALL_EXPR_ARG (exp, 0);
tree arg1 = CALL_EXPR_ARG (exp, 1);
- rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0);
- rtx op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0);
+ rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, EXPAND_NORMAL);
+ rtx op1 = expand_expr (arg1, NULL_RTX, VOIDmode, EXPAND_NORMAL);
enum machine_mode op0mode = GET_MODE (op0);
enum machine_mode op1mode = GET_MODE (op1);
enum machine_mode tmode = insn_data[icode].operand[0].mode;
case AVR_BUILTIN_DELAY_CYCLES:
{
arg0 = CALL_EXPR_ARG (exp, 0);
- op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0);
+ op0 = expand_expr (arg0, NULL_RTX, VOIDmode, EXPAND_NORMAL);
if (! CONST_INT_P (op0))
error ("__builtin_avr_delay_cycles expects a compile time integer constant.");