/* Subroutines used for code generation on Vitesse IQ2000 processors
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+ Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
int num_gp; /* Number of gp registers saved. */
} iq2000_frame_info;
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
/* Current frame information, calculated by compute_frame_size. */
long total_size; /* # bytes that the entire frame takes up. */
/* Initialize the GCC target structure. */
static struct machine_function* iq2000_init_machine_status (void);
static bool iq2000_handle_option (size_t, const char *, int);
-static void iq2000_select_rtx_section (enum machine_mode, rtx, unsigned HOST_WIDE_INT);
+static section *iq2000_select_rtx_section (enum machine_mode, rtx,
+ unsigned HOST_WIDE_INT);
static void iq2000_init_builtins (void);
static rtx iq2000_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
-static bool iq2000_return_in_memory (tree, tree);
+static bool iq2000_return_in_memory (const_tree, const_tree);
static void iq2000_setup_incoming_varargs (CUMULATIVE_ARGS *,
enum machine_mode, tree, int *,
int);
-static bool iq2000_rtx_costs (rtx, int, int, int *);
-static int iq2000_address_cost (rtx);
-static void iq2000_select_section (tree, int, unsigned HOST_WIDE_INT);
-static bool iq2000_return_in_memory (tree, tree);
+static bool iq2000_rtx_costs (rtx, int, int, int *, bool);
+static int iq2000_address_cost (rtx, bool);
+static section *iq2000_select_section (tree, int, unsigned HOST_WIDE_INT);
static bool iq2000_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
- tree, bool);
+ const_tree, bool);
static int iq2000_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
+static void iq2000_va_start (tree, rtx);
#undef TARGET_INIT_BUILTINS
#define TARGET_INIT_BUILTINS iq2000_init_builtins
#undef TARGET_ASM_SELECT_SECTION
#define TARGET_ASM_SELECT_SECTION iq2000_select_section
+/* The assembler supports switchable .bss sections, but
+ iq2000_select_section doesn't yet make use of them. */
+#undef TARGET_HAVE_SWITCHABLE_BSS_SECTIONS
+#define TARGET_HAVE_SWITCHABLE_BSS_SECTIONS false
+
#undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
#undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
#undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY iq2000_return_in_memory
#undef TARGET_STRICT_ARGUMENT_NAMING
#define TARGET_STRICT_ARGUMENT_NAMING hook_bool_CUMULATIVE_ARGS_true
+#undef TARGET_EXPAND_BUILTIN_VA_START
+#define TARGET_EXPAND_BUILTIN_VA_START iq2000_va_start
+
struct gcc_target targetm = TARGET_INITIALIZER;
\f
/* Return nonzero if we split the address into high and low parts. */
{
error (reason);
debug_rtx (insn);
- abort ();
+ fancy_abort (__FILE__, __LINE__, __FUNCTION__);
}
\f
/* Return the appropriate instructions to move one operand to another. */
/* Provide the costs of an addressing mode that contains ADDR. */
static int
-iq2000_address_cost (rtx addr)
+iq2000_address_cost (rtx addr, bool speed)
{
switch (GET_CODE (addr))
{
case LABEL_REF:
case HIGH:
case LO_SUM:
- return iq2000_address_cost (plus1) + 1;
+ return iq2000_address_cost (plus1, speed) + 1;
default:
break;
rtx reg2;
test = map_test_to_internal_test (test_code);
- if (test == ITEST_MAX)
- abort ();
+ gcc_assert (test != ITEST_MAX);
p_info = &info[(int) test];
eqne_p = (p_info->test_code == XOR);
{
if (p_info->const_add != 0)
{
- HOST_WIDE_INT new = INTVAL (cmp1) + p_info->const_add;
+ HOST_WIDE_INT new_const = INTVAL (cmp1) + p_info->const_add;
/* If modification of cmp1 caused overflow,
we would get the wrong answer if we follow the usual path;
thus, x > 0xffffffffU would turn into x > 0U. */
if ((p_info->unsignedp
- ? (unsigned HOST_WIDE_INT) new >
+ ? (unsigned HOST_WIDE_INT) new_const >
(unsigned HOST_WIDE_INT) INTVAL (cmp1)
- : new > INTVAL (cmp1))
+ : new_const > INTVAL (cmp1))
!= (p_info->const_add > 0))
{
/* This test is always true, but if INVERT is true then
return result;
}
else
- cmp1 = GEN_INT (new);
+ cmp1 = GEN_INT (new_const);
}
}
"function_adv({gp reg found = %d, arg # = %2d, words = %2d}, %4s, ",
cum->gp_reg_found, cum->arg_number, cum->arg_words,
GET_MODE_NAME (mode));
- fprintf (stderr, HOST_PTR_PRINTF, (const PTR) type);
+ fprintf (stderr, "%p", (void *) type);
fprintf (stderr, ", %d )\n\n", named);
}
break;
default:
- if (GET_MODE_CLASS (mode) != MODE_COMPLEX_INT
- && GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT)
- abort ();
+ gcc_assert (GET_MODE_CLASS (mode) == MODE_COMPLEX_INT
+ || GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT);
cum->gp_reg_found = 1;
cum->arg_words += ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1)
cum->arg_words += 2;
break;
+ case TImode:
+ cum->gp_reg_found = 1;
+ cum->arg_words += 4;
+ break;
+
case QImode:
case HImode:
case SImode:
and type TYPE in CUM, or 0 if the argument is to be passed on the stack. */
struct rtx_def *
-function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
+function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, const_tree type,
int named)
{
rtx ret;
"function_arg( {gp reg found = %d, arg # = %2d, words = %2d}, %4s, ",
cum->gp_reg_found, cum->arg_number, cum->arg_words,
GET_MODE_NAME (mode));
- fprintf (stderr, HOST_PTR_PRINTF, (const PTR) type);
+ fprintf (stderr, "%p", (const void *) type);
fprintf (stderr, ", %d ) = ", named);
}
break;
default:
- if (GET_MODE_CLASS (mode) != MODE_COMPLEX_INT
- && GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT)
- abort ();
+ gcc_assert (GET_MODE_CLASS (mode) == MODE_COMPLEX_INT
+ || GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT);
/* Drops through. */
case BLKmode:
case DImode:
cum->arg_words += (cum->arg_words & 1);
regbase = GP_ARG_FIRST;
+ break;
+
+ case TImode:
+ cum->arg_words += (cum->arg_words & 3);
+ regbase = GP_ARG_FIRST;
+ break;
}
if (*arg_words >= (unsigned) MAX_ARGS_IN_REGISTERS)
}
else
{
- if (regbase == -1)
- abort ();
+ gcc_assert (regbase != -1);
if (! type || TREE_CODE (type) != RECORD_TYPE
|| ! named || ! TYPE_SIZE_UNIT (type)
\f
/* Implement va_start. */
-void
+static void
iq2000_va_start (tree valist, rtx nextarg)
{
int int_arg_words;
/* Find out how many non-float named formals. */
int gpr_save_area_size;
/* Note UNITS_PER_WORD is 4 bytes. */
- int_arg_words = current_function_args_info.arg_words;
+ int_arg_words = crtl->args.info.arg_words;
if (int_arg_words < 8 )
/* Adjust for the prologue's economy measure. */
{
struct machine_function *f;
- f = ggc_alloc_cleared (sizeof (struct machine_function));
+ f = GGC_CNEW (struct machine_function);
return f;
}
mask = 0;
extra_size = IQ2000_STACK_ALIGN ((0));
var_size = IQ2000_STACK_ALIGN (size);
- args_size = IQ2000_STACK_ALIGN (current_function_outgoing_args_size);
+ args_size = IQ2000_STACK_ALIGN (crtl->outgoing_args_size);
/* If a function dynamically allocates the stack and
has 0 for STACK_DYNAMIC_OFFSET then allocate some stack space. */
- if (args_size == 0 && current_function_calls_alloca)
+ if (args_size == 0 && cfun->calls_alloca)
args_size = 4 * UNITS_PER_WORD;
total_size = var_size + args_size + extra_size;
}
/* We need to restore these for the handler. */
- if (current_function_calls_eh_return)
+ if (crtl->calls_eh_return)
{
unsigned int i;
&& ! profile_flag)
total_size = extra_size = 0;
- total_size += IQ2000_STACK_ALIGN (current_function_pretend_args_size);
+ total_size += IQ2000_STACK_ALIGN (crtl->args.pretend_args_size);
/* Save other computed information. */
cfun->machine->total_size = total_size;
HOST_WIDE_INT gp_offset;
HOST_WIDE_INT end_offset;
- if (frame_pointer_needed
- && ! BITSET_P (mask, HARD_FRAME_POINTER_REGNUM - GP_REG_FIRST))
- abort ();
+ gcc_assert (!frame_pointer_needed
+ || BITSET_P (mask, HARD_FRAME_POINTER_REGNUM - GP_REG_FIRST));
if (mask == 0)
{
if (gp_offset < 0 || end_offset < 0)
internal_error
- ("gp_offset (%ld) or end_offset (%ld) is less than zero.",
+ ("gp_offset (%ld) or end_offset (%ld) is less than zero",
(long) gp_offset, (long) end_offset);
else if (gp_offset < 32768)
/* If struct value address is treated as the first argument. */
if (aggregate_value_p (DECL_RESULT (fndecl), fndecl)
- && ! current_function_returns_pcc_struct
+ && !cfun->returns_pcc_struct
&& targetm.calls.struct_value_rtx (TREE_TYPE (fndecl), 1) == 0)
{
tree type = build_pointer_type (fntype);
{
int words;
- if (GET_CODE (entry_parm) != REG)
- abort ();
+ gcc_assert (GET_CODE (entry_parm) == REG);
/* Passed in a register, so will get homed automatically. */
if (GET_MODE (entry_parm) == BLKmode)
PUT_CODE (SET_SRC (pattern), ASHIFTRT);
insn = emit_insn (pattern);
-
- /* Global life information isn't valid at this point, so we
- can't check whether these shifts are actually used. Mark
- them MAYBE_DEAD so that flow2 will remove them, and not
- complain about dead code in the prologue. */
- REG_NOTES(insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, NULL_RTX,
- REG_NOTES (insn));
}
}
save_restore_insns (0);
- if (current_function_calls_eh_return)
+ if (crtl->calls_eh_return)
{
rtx eh_ofs = EH_RETURN_STACKADJ_RTX;
emit_insn (gen_addsi3 (eh_ofs, eh_ofs, tsize_rtx));
emit_insn (gen_blockage ());
- if (tsize != 0 || current_function_calls_eh_return)
+ if (tsize != 0 || crtl->calls_eh_return)
{
emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
tsize_rtx));
}
}
- if (current_function_calls_eh_return)
+ if (crtl->calls_eh_return)
{
/* Perform the additional bump for __throw. */
emit_move_insn (gen_rtx_REG (Pmode, HARD_FRAME_POINTER_REGNUM),
stack_pointer_rtx);
- emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (Pmode,
- HARD_FRAME_POINTER_REGNUM)));
+ emit_use (gen_rtx_REG (Pmode, HARD_FRAME_POINTER_REGNUM));
emit_jump_insn (gen_eh_return_internal ());
}
else
if (! reload_completed)
return 0;
- if (regs_ever_live[31] || profile_flag)
+ if (df_regs_ever_live_p (31) || profile_flag)
return 0;
if (cfun->machine->initialized)
/* Choose the section to use for the constant rtx expression X that has
mode MODE. */
-static void
+static section *
iq2000_select_rtx_section (enum machine_mode mode, rtx x ATTRIBUTE_UNUSED,
unsigned HOST_WIDE_INT align)
{
/* For embedded applications, always put constants in read-only data,
in order to reduce RAM usage. */
- /* For embedded applications, always put constants in read-only data,
- in order to reduce RAM usage. */
- mergeable_constant_section (mode, align, 0);
+ return mergeable_constant_section (mode, align, 0);
}
/* Choose the section to use for DECL. RELOC is true if its value contains
ENCODE_SECTION_INFO in iq2000.h so that references to these symbols
are done correctly. */
-static void
+static section *
iq2000_select_section (tree decl, int reloc ATTRIBUTE_UNUSED,
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
{
|| TREE_CONSTANT (DECL_INITIAL (decl))))
/* Deal with calls from output_constant_def_contents. */
|| TREE_CODE (decl) != VAR_DECL)
- readonly_data_section ();
+ return readonly_data_section;
else
- data_section ();
+ return data_section;
}
else
{
|| TREE_CONSTANT (DECL_INITIAL (decl))))
/* Deal with calls from output_constant_def_contents. */
|| TREE_CODE (decl) != VAR_DECL)
- readonly_data_section ();
+ return readonly_data_section;
else
- data_section ();
+ return data_section;
}
}
/* Return register to use for a function return value with VALTYPE for function
FUNC. */
rtx
-iq2000_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
+iq2000_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
{
int reg = GP_RETURN;
enum machine_mode mode = TYPE_MODE (valtype);
static bool
iq2000_pass_by_reference (CUMULATIVE_ARGS *cum, enum machine_mode mode,
- tree type, bool named ATTRIBUTE_UNUSED)
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
int size;
}
default:
- abort ();
+ gcc_unreachable ();
}
/* NOTREACHED */
}
#define def_builtin(NAME, TYPE, CODE) \
- lang_hooks.builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \
- NULL, NULL_TREE)
+ add_builtin_function ((NAME), (TYPE), (CODE), BUILT_IN_MD, \
+ NULL, NULL_TREE)
static void
iq2000_init_builtins (void)
def_builtin ("__builtin_syscall", void_ftype, IQ2000_BUILTIN_SYSCALL);
}
-/* Builtin for ICODE having ARGCOUNT args in ARGLIST where each arg
+/* Builtin for ICODE having ARGCOUNT args in EXP where each arg
has an rtx CODE. */
static rtx
-expand_one_builtin (enum insn_code icode, rtx target, tree arglist,
+expand_one_builtin (enum insn_code icode, rtx target, tree exp,
enum rtx_code *code, int argcount)
{
rtx pat;
mode[0] = insn_data[icode].operand[0].mode;
for (i = 0; i < argcount; i++)
{
- arg[i] = TREE_VALUE (arglist);
- arglist = TREE_CHAIN (arglist);
+ arg[i] = CALL_EXPR_ARG (exp, i);
op[i] = expand_expr (arg[i], NULL_RTX, VOIDmode, 0);
mode[i] = insn_data[icode].operand[i].mode;
if (code[i] == CONST_INT && GET_CODE (op[i]) != CONST_INT)
pat = GEN_FCN (icode) (op[0], op[1], op[2], op[3]);
break;
default:
- abort ();
+ gcc_unreachable ();
}
if (! pat)
enum machine_mode mode ATTRIBUTE_UNUSED,
int ignore ATTRIBUTE_UNUSED)
{
- tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
- tree arglist = TREE_OPERAND (exp, 1);
+ tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0);
int fcode = DECL_FUNCTION_CODE (fndecl);
enum rtx_code code [5];
break;
case IQ2000_BUILTIN_ADO16:
- return expand_one_builtin (CODE_FOR_ado16, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_ado16, target, exp, code, 2);
case IQ2000_BUILTIN_RAM:
code[1] = CONST_INT;
code[2] = CONST_INT;
code[3] = CONST_INT;
- return expand_one_builtin (CODE_FOR_ram, target, arglist, code, 4);
+ return expand_one_builtin (CODE_FOR_ram, target, exp, code, 4);
case IQ2000_BUILTIN_CHKHDR:
- return expand_one_builtin (CODE_FOR_chkhdr, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_chkhdr, target, exp, code, 2);
case IQ2000_BUILTIN_PKRL:
- return expand_one_builtin (CODE_FOR_pkrl, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_pkrl, target, exp, code, 2);
case IQ2000_BUILTIN_CFC0:
code[0] = CONST_INT;
- return expand_one_builtin (CODE_FOR_cfc0, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_cfc0, target, exp, code, 1);
case IQ2000_BUILTIN_CFC1:
code[0] = CONST_INT;
- return expand_one_builtin (CODE_FOR_cfc1, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_cfc1, target, exp, code, 1);
case IQ2000_BUILTIN_CFC2:
code[0] = CONST_INT;
- return expand_one_builtin (CODE_FOR_cfc2, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_cfc2, target, exp, code, 1);
case IQ2000_BUILTIN_CFC3:
code[0] = CONST_INT;
- return expand_one_builtin (CODE_FOR_cfc3, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_cfc3, target, exp, code, 1);
case IQ2000_BUILTIN_CTC0:
code[1] = CONST_INT;
- return expand_one_builtin (CODE_FOR_ctc0, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_ctc0, target, exp, code, 2);
case IQ2000_BUILTIN_CTC1:
code[1] = CONST_INT;
- return expand_one_builtin (CODE_FOR_ctc1, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_ctc1, target, exp, code, 2);
case IQ2000_BUILTIN_CTC2:
code[1] = CONST_INT;
- return expand_one_builtin (CODE_FOR_ctc2, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_ctc2, target, exp, code, 2);
case IQ2000_BUILTIN_CTC3:
code[1] = CONST_INT;
- return expand_one_builtin (CODE_FOR_ctc3, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_ctc3, target, exp, code, 2);
case IQ2000_BUILTIN_MFC0:
code[0] = CONST_INT;
- return expand_one_builtin (CODE_FOR_mfc0, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_mfc0, target, exp, code, 1);
case IQ2000_BUILTIN_MFC1:
code[0] = CONST_INT;
- return expand_one_builtin (CODE_FOR_mfc1, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_mfc1, target, exp, code, 1);
case IQ2000_BUILTIN_MFC2:
code[0] = CONST_INT;
- return expand_one_builtin (CODE_FOR_mfc2, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_mfc2, target, exp, code, 1);
case IQ2000_BUILTIN_MFC3:
code[0] = CONST_INT;
- return expand_one_builtin (CODE_FOR_mfc3, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_mfc3, target, exp, code, 1);
case IQ2000_BUILTIN_MTC0:
code[1] = CONST_INT;
- return expand_one_builtin (CODE_FOR_mtc0, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_mtc0, target, exp, code, 2);
case IQ2000_BUILTIN_MTC1:
code[1] = CONST_INT;
- return expand_one_builtin (CODE_FOR_mtc1, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_mtc1, target, exp, code, 2);
case IQ2000_BUILTIN_MTC2:
code[1] = CONST_INT;
- return expand_one_builtin (CODE_FOR_mtc2, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_mtc2, target, exp, code, 2);
case IQ2000_BUILTIN_MTC3:
code[1] = CONST_INT;
- return expand_one_builtin (CODE_FOR_mtc3, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_mtc3, target, exp, code, 2);
case IQ2000_BUILTIN_LUR:
- return expand_one_builtin (CODE_FOR_lur, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_lur, target, exp, code, 2);
case IQ2000_BUILTIN_RB:
- return expand_one_builtin (CODE_FOR_rb, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_rb, target, exp, code, 2);
case IQ2000_BUILTIN_RX:
- return expand_one_builtin (CODE_FOR_rx, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_rx, target, exp, code, 2);
case IQ2000_BUILTIN_SRRD:
- return expand_one_builtin (CODE_FOR_srrd, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_srrd, target, exp, code, 1);
case IQ2000_BUILTIN_SRWR:
- return expand_one_builtin (CODE_FOR_srwr, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_srwr, target, exp, code, 2);
case IQ2000_BUILTIN_WB:
- return expand_one_builtin (CODE_FOR_wb, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_wb, target, exp, code, 2);
case IQ2000_BUILTIN_WX:
- return expand_one_builtin (CODE_FOR_wx, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_wx, target, exp, code, 2);
case IQ2000_BUILTIN_LUC32L:
- return expand_one_builtin (CODE_FOR_luc32l, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_luc32l, target, exp, code, 2);
case IQ2000_BUILTIN_LUC64:
- return expand_one_builtin (CODE_FOR_luc64, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_luc64, target, exp, code, 2);
case IQ2000_BUILTIN_LUC64L:
- return expand_one_builtin (CODE_FOR_luc64l, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_luc64l, target, exp, code, 2);
case IQ2000_BUILTIN_LUK:
- return expand_one_builtin (CODE_FOR_luk, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_luk, target, exp, code, 2);
case IQ2000_BUILTIN_LULCK:
- return expand_one_builtin (CODE_FOR_lulck, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_lulck, target, exp, code, 1);
case IQ2000_BUILTIN_LUM32:
- return expand_one_builtin (CODE_FOR_lum32, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_lum32, target, exp, code, 2);
case IQ2000_BUILTIN_LUM32L:
- return expand_one_builtin (CODE_FOR_lum32l, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_lum32l, target, exp, code, 2);
case IQ2000_BUILTIN_LUM64:
- return expand_one_builtin (CODE_FOR_lum64, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_lum64, target, exp, code, 2);
case IQ2000_BUILTIN_LUM64L:
- return expand_one_builtin (CODE_FOR_lum64l, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_lum64l, target, exp, code, 2);
case IQ2000_BUILTIN_LURL:
- return expand_one_builtin (CODE_FOR_lurl, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_lurl, target, exp, code, 2);
case IQ2000_BUILTIN_MRGB:
code[2] = CONST_INT;
- return expand_one_builtin (CODE_FOR_mrgb, target, arglist, code, 3);
+ return expand_one_builtin (CODE_FOR_mrgb, target, exp, code, 3);
case IQ2000_BUILTIN_SRRDL:
- return expand_one_builtin (CODE_FOR_srrdl, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_srrdl, target, exp, code, 1);
case IQ2000_BUILTIN_SRULCK:
- return expand_one_builtin (CODE_FOR_srulck, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_srulck, target, exp, code, 1);
case IQ2000_BUILTIN_SRWRU:
- return expand_one_builtin (CODE_FOR_srwru, target, arglist, code, 2);
+ return expand_one_builtin (CODE_FOR_srwru, target, exp, code, 2);
case IQ2000_BUILTIN_TRAPQFL:
- return expand_one_builtin (CODE_FOR_trapqfl, target, arglist, code, 0);
+ return expand_one_builtin (CODE_FOR_trapqfl, target, exp, code, 0);
case IQ2000_BUILTIN_TRAPQNE:
- return expand_one_builtin (CODE_FOR_trapqne, target, arglist, code, 0);
+ return expand_one_builtin (CODE_FOR_trapqne, target, exp, code, 0);
case IQ2000_BUILTIN_TRAPREL:
- return expand_one_builtin (CODE_FOR_traprel, target, arglist, code, 1);
+ return expand_one_builtin (CODE_FOR_traprel, target, exp, code, 1);
case IQ2000_BUILTIN_WBU:
- return expand_one_builtin (CODE_FOR_wbu, target, arglist, code, 3);
+ return expand_one_builtin (CODE_FOR_wbu, target, exp, code, 3);
case IQ2000_BUILTIN_SYSCALL:
- return expand_one_builtin (CODE_FOR_syscall, target, arglist, code, 0);
+ return expand_one_builtin (CODE_FOR_syscall, target, exp, code, 0);
}
return NULL_RTX;
/* Worker function for TARGET_RETURN_IN_MEMORY. */
static bool
-iq2000_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+iq2000_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
{
return ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
|| (int_size_in_bytes (type) == -1));
else if (letter == 'Z')
{
- int regnum;
-
- if (code != REG)
- abort ();
-
- regnum = REGNO (op);
- abort ();
-
- fprintf (file, "%s,", reg_names[regnum]);
+ gcc_unreachable ();
}
else if (code == REG || code == SUBREG)
}
static bool
-iq2000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int * total)
+iq2000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int * total,
+ bool speed ATTRIBUTE_UNUSED)
{
enum machine_mode mode = GET_MODE (x);