arc-protos.h: New file.
* arc-protos.h: New file. * arc.c: Include tm_p.h. Add static prototypes. Fix compile time warnings. * arc.h: Move prototypes to arc-protos.h. Fix compile time warnings. * arc.md: Likewise. From-SVN: r31417
This commit is contained in:
parent
699851185a
commit
2b046bda6e
5 changed files with 175 additions and 68 deletions
|
@ -1,3 +1,15 @@
|
||||||
|
2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
|
* arc-protos.h: New file.
|
||||||
|
|
||||||
|
* arc.c: Include tm_p.h. Add static prototypes. Fix compile
|
||||||
|
time warnings.
|
||||||
|
|
||||||
|
* arc.h: Move prototypes to arc-protos.h. Fix compile time
|
||||||
|
warnings.
|
||||||
|
|
||||||
|
* arc.md: Likewise.
|
||||||
|
|
||||||
2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
* dsp16xx-protos.h: New file.
|
* dsp16xx-protos.h: New file.
|
||||||
|
|
84
gcc/config/arc/arc-protos.h
Normal file
84
gcc/config/arc/arc-protos.h
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
/* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
|
||||||
|
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU CC.
|
||||||
|
|
||||||
|
GNU CC 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)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU CC is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU CC; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifdef RTX_CODE
|
||||||
|
#ifdef TREE_CODE
|
||||||
|
extern void arc_va_start PARAMS ((int, tree, rtx));
|
||||||
|
extern rtx arc_va_arg PARAMS ((tree, tree));
|
||||||
|
#endif /* TREE_CODE */
|
||||||
|
|
||||||
|
extern enum machine_mode arc_select_cc_mode PARAMS ((enum rtx_code, rtx, rtx));
|
||||||
|
|
||||||
|
/* Define the function that build the compare insn for scc and bcc. */
|
||||||
|
extern struct rtx_def *gen_compare_reg PARAMS ((enum rtx_code, rtx, rtx));
|
||||||
|
|
||||||
|
/* Declarations for various fns used in the .md file. */
|
||||||
|
extern const char *output_shift PARAMS ((rtx *));
|
||||||
|
|
||||||
|
extern int symbolic_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int arc_double_limm_p PARAMS ((rtx));
|
||||||
|
extern int arc_address_cost PARAMS ((rtx));
|
||||||
|
extern int arc_eligible_for_epilogue_delay PARAMS ((rtx, int));
|
||||||
|
extern void arc_initialize_trampoline PARAMS ((rtx, rtx, rtx));
|
||||||
|
extern void arc_print_operand PARAMS ((FILE *, rtx, int));
|
||||||
|
extern void arc_print_operand_address PARAMS ((FILE *, rtx));
|
||||||
|
extern void arc_final_prescan_insn PARAMS ((rtx, rtx *, int));
|
||||||
|
extern int call_address_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int call_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int symbolic_memory_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int short_immediate_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int long_immediate_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int long_immediate_loadstore_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int move_src_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int move_double_src_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int move_dest_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int load_update_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int store_update_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int nonvol_nonimm_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int const_sint32_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int const_uint32_operand PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int proper_comparison_operator PARAMS ((rtx, enum machine_mode));
|
||||||
|
extern int shift_operator PARAMS ((rtx, enum machine_mode));
|
||||||
|
#endif /* RTX_CODE */
|
||||||
|
|
||||||
|
#ifdef TREE_CODE
|
||||||
|
extern enum arc_function_type arc_compute_function_type PARAMS ((tree));
|
||||||
|
extern int arc_comp_type_attributes PARAMS ((tree, tree));
|
||||||
|
extern void arc_set_default_type_attributes PARAMS ((tree));
|
||||||
|
extern int arc_valid_machine_decl_attribute PARAMS ((tree, tree, tree, tree));
|
||||||
|
extern void arc_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *,
|
||||||
|
enum machine_mode, tree,
|
||||||
|
int *, int));
|
||||||
|
#endif /* TREE_CODE */
|
||||||
|
|
||||||
|
|
||||||
|
extern void arc_init PARAMS ((void));
|
||||||
|
extern void arc_asm_file_start PARAMS ((FILE *));
|
||||||
|
extern unsigned int arc_compute_frame_size PARAMS ((int));
|
||||||
|
extern void arc_save_restore PARAMS ((FILE *, const char *, unsigned int,
|
||||||
|
unsigned int, const char *));
|
||||||
|
extern void arc_output_function_prologue PARAMS ((FILE *, int));
|
||||||
|
extern void arc_output_function_epilogue PARAMS ((FILE *, int));
|
||||||
|
extern int arc_delay_slots_for_epilogue PARAMS ((void));
|
||||||
|
extern void arc_finalize_pic PARAMS ((void));
|
||||||
|
extern void arc_ccfsm_at_label PARAMS ((const char *, int));
|
||||||
|
extern int arc_ccfsm_branch_deleted_p PARAMS ((void));
|
||||||
|
extern void arc_ccfsm_record_branch_deleted PARAMS ((void));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Subroutines used for code generation on the Argonaut ARC cpu.
|
/* Subroutines used for code generation on the Argonaut ARC cpu.
|
||||||
Copyright (C) 1994, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1994, 95, 97-99, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU CC.
|
This file is part of GNU CC.
|
||||||
|
|
||||||
|
@ -36,14 +36,16 @@ Boston, MA 02111-1307, USA. */
|
||||||
#include "function.h"
|
#include "function.h"
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
#include "recog.h"
|
#include "recog.h"
|
||||||
|
#include "toplev.h"
|
||||||
|
#include "tm_p.h"
|
||||||
|
|
||||||
/* Which cpu we're compiling for (NULL(=base), ???). */
|
/* Which cpu we're compiling for (NULL(=base), ???). */
|
||||||
char *arc_cpu_string;
|
const char *arc_cpu_string;
|
||||||
int arc_cpu_type;
|
int arc_cpu_type;
|
||||||
|
|
||||||
/* Name of mangle string to add to symbols to separate code compiled for each
|
/* Name of mangle string to add to symbols to separate code compiled for each
|
||||||
cpu (or NULL). */
|
cpu (or NULL). */
|
||||||
char *arc_mangle_cpu;
|
const char *arc_mangle_cpu;
|
||||||
|
|
||||||
/* Save the operands last given to a compare for use when we
|
/* Save the operands last given to a compare for use when we
|
||||||
generate a scc or bcc insn. */
|
generate a scc or bcc insn. */
|
||||||
|
@ -51,14 +53,14 @@ rtx arc_compare_op0, arc_compare_op1;
|
||||||
|
|
||||||
/* Name of text, data, and rodata sections, as specified on command line.
|
/* Name of text, data, and rodata sections, as specified on command line.
|
||||||
Selected by -m{text,data,rodata} flags. */
|
Selected by -m{text,data,rodata} flags. */
|
||||||
char *arc_text_string = ARC_DEFAULT_TEXT_SECTION;
|
const char *arc_text_string = ARC_DEFAULT_TEXT_SECTION;
|
||||||
char *arc_data_string = ARC_DEFAULT_DATA_SECTION;
|
const char *arc_data_string = ARC_DEFAULT_DATA_SECTION;
|
||||||
char *arc_rodata_string = ARC_DEFAULT_RODATA_SECTION;
|
const char *arc_rodata_string = ARC_DEFAULT_RODATA_SECTION;
|
||||||
|
|
||||||
/* Name of text, data, and rodata sections used in varasm.c. */
|
/* Name of text, data, and rodata sections used in varasm.c. */
|
||||||
char *arc_text_section;
|
const char *arc_text_section;
|
||||||
char *arc_data_section;
|
const char *arc_data_section;
|
||||||
char *arc_rodata_section;
|
const char *arc_rodata_section;
|
||||||
|
|
||||||
/* Array of valid operand punctuation characters. */
|
/* Array of valid operand punctuation characters. */
|
||||||
char arc_punct_chars[256];
|
char arc_punct_chars[256];
|
||||||
|
@ -80,15 +82,17 @@ static int arc_ccfsm_target_label;
|
||||||
arc_print_operand. */
|
arc_print_operand. */
|
||||||
static int last_insn_set_cc_p;
|
static int last_insn_set_cc_p;
|
||||||
static int current_insn_set_cc_p;
|
static int current_insn_set_cc_p;
|
||||||
static void record_cc_ref ();
|
static void record_cc_ref PARAMS ((rtx));
|
||||||
|
static void arc_init_reg_tables PARAMS ((void));
|
||||||
void arc_init_reg_tables ();
|
static int get_arc_condition_code PARAMS ((rtx));
|
||||||
|
|
||||||
/* Called by OVERRIDE_OPTIONS to initialize various things. */
|
/* Called by OVERRIDE_OPTIONS to initialize various things. */
|
||||||
|
|
||||||
void
|
void
|
||||||
arc_init (void)
|
arc_init (void)
|
||||||
{
|
{
|
||||||
|
char *tmp;
|
||||||
|
|
||||||
if (arc_cpu_string == 0
|
if (arc_cpu_string == 0
|
||||||
|| !strcmp (arc_cpu_string, "base"))
|
|| !strcmp (arc_cpu_string, "base"))
|
||||||
{
|
{
|
||||||
|
@ -108,12 +112,12 @@ arc_init (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the pseudo-ops for the various standard sections. */
|
/* Set the pseudo-ops for the various standard sections. */
|
||||||
arc_text_section = xmalloc (strlen (arc_text_string) + sizeof (ARC_SECTION_FORMAT) + 1);
|
arc_text_section = tmp = xmalloc (strlen (arc_text_string) + sizeof (ARC_SECTION_FORMAT) + 1);
|
||||||
sprintf (arc_text_section, ARC_SECTION_FORMAT, arc_text_string);
|
sprintf (tmp, ARC_SECTION_FORMAT, arc_text_string);
|
||||||
arc_data_section = xmalloc (strlen (arc_data_string) + sizeof (ARC_SECTION_FORMAT) + 1);
|
arc_data_section = tmp = xmalloc (strlen (arc_data_string) + sizeof (ARC_SECTION_FORMAT) + 1);
|
||||||
sprintf (arc_data_section, ARC_SECTION_FORMAT, arc_data_string);
|
sprintf (tmp, ARC_SECTION_FORMAT, arc_data_string);
|
||||||
arc_rodata_section = xmalloc (strlen (arc_rodata_string) + sizeof (ARC_SECTION_FORMAT) + 1);
|
arc_rodata_section = tmp = xmalloc (strlen (arc_rodata_string) + sizeof (ARC_SECTION_FORMAT) + 1);
|
||||||
sprintf (arc_rodata_section, ARC_SECTION_FORMAT, arc_rodata_string);
|
sprintf (tmp, ARC_SECTION_FORMAT, arc_rodata_string);
|
||||||
|
|
||||||
arc_init_reg_tables ();
|
arc_init_reg_tables ();
|
||||||
|
|
||||||
|
@ -127,7 +131,7 @@ arc_init (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The condition codes of the ARC, and the inverse function. */
|
/* The condition codes of the ARC, and the inverse function. */
|
||||||
static char *arc_condition_codes[] =
|
static const char *const arc_condition_codes[] =
|
||||||
{
|
{
|
||||||
"al", 0, "eq", "ne", "p", "n", "c", "nc", "v", "nv",
|
"al", 0, "eq", "ne", "p", "n", "c", "nc", "v", "nv",
|
||||||
"gt", "le", "ge", "lt", "hi", "ls", "pnz", 0
|
"gt", "le", "ge", "lt", "hi", "ls", "pnz", 0
|
||||||
|
@ -167,7 +171,7 @@ get_arc_condition_code (comparison)
|
||||||
enum machine_mode
|
enum machine_mode
|
||||||
arc_select_cc_mode (op, x, y)
|
arc_select_cc_mode (op, x, y)
|
||||||
enum rtx_code op;
|
enum rtx_code op;
|
||||||
rtx x, y;
|
rtx x, y ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
|
@ -187,6 +191,8 @@ arc_select_cc_mode (op, x, y)
|
||||||
case ASHIFTRT :
|
case ASHIFTRT :
|
||||||
case LSHIFTRT :
|
case LSHIFTRT :
|
||||||
return CCZNCmode;
|
return CCZNCmode;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return CCmode;
|
return CCmode;
|
||||||
|
@ -238,7 +244,7 @@ unsigned int arc_mode_class [NUM_MACHINE_MODES];
|
||||||
|
|
||||||
enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
|
enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
|
||||||
|
|
||||||
void
|
static void
|
||||||
arc_init_reg_tables ()
|
arc_init_reg_tables ()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -309,8 +315,8 @@ arc_init_reg_tables ()
|
||||||
|
|
||||||
int
|
int
|
||||||
arc_valid_machine_decl_attribute (type, attributes, identifier, args)
|
arc_valid_machine_decl_attribute (type, attributes, identifier, args)
|
||||||
tree type;
|
tree type ATTRIBUTE_UNUSED;
|
||||||
tree attributes;
|
tree attributes ATTRIBUTE_UNUSED;
|
||||||
tree identifier;
|
tree identifier;
|
||||||
tree args;
|
tree args;
|
||||||
{
|
{
|
||||||
|
@ -333,7 +339,7 @@ arc_valid_machine_decl_attribute (type, attributes, identifier, args)
|
||||||
|
|
||||||
int
|
int
|
||||||
arc_comp_type_attributes (type1, type2)
|
arc_comp_type_attributes (type1, type2)
|
||||||
tree type1, type2;
|
tree type1 ATTRIBUTE_UNUSED, type2 ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -342,7 +348,7 @@ arc_comp_type_attributes (type1, type2)
|
||||||
|
|
||||||
void
|
void
|
||||||
arc_set_default_type_attributes (type)
|
arc_set_default_type_attributes (type)
|
||||||
tree type;
|
tree type ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,7 +380,7 @@ call_operand (op, mode)
|
||||||
int
|
int
|
||||||
symbolic_operand (op, mode)
|
symbolic_operand (op, mode)
|
||||||
rtx op;
|
rtx op;
|
||||||
enum machine_mode mode;
|
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
switch (GET_CODE (op))
|
switch (GET_CODE (op))
|
||||||
{
|
{
|
||||||
|
@ -393,7 +399,7 @@ symbolic_operand (op, mode)
|
||||||
int
|
int
|
||||||
symbolic_memory_operand (op, mode)
|
symbolic_memory_operand (op, mode)
|
||||||
rtx op;
|
rtx op;
|
||||||
enum machine_mode mode;
|
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
if (GET_CODE (op) == SUBREG)
|
if (GET_CODE (op) == SUBREG)
|
||||||
op = SUBREG_REG (op);
|
op = SUBREG_REG (op);
|
||||||
|
@ -409,7 +415,7 @@ symbolic_memory_operand (op, mode)
|
||||||
int
|
int
|
||||||
short_immediate_operand (op, mode)
|
short_immediate_operand (op, mode)
|
||||||
rtx op;
|
rtx op;
|
||||||
enum machine_mode mode;
|
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
if (GET_CODE (op) != CONST_INT)
|
if (GET_CODE (op) != CONST_INT)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -422,7 +428,7 @@ short_immediate_operand (op, mode)
|
||||||
int
|
int
|
||||||
long_immediate_operand (op, mode)
|
long_immediate_operand (op, mode)
|
||||||
rtx op;
|
rtx op;
|
||||||
enum machine_mode mode;
|
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
switch (GET_CODE (op))
|
switch (GET_CODE (op))
|
||||||
{
|
{
|
||||||
|
@ -437,6 +443,8 @@ long_immediate_operand (op, mode)
|
||||||
represented this way (the multiplication patterns can cause these
|
represented this way (the multiplication patterns can cause these
|
||||||
to be generated). They also occur for SFmode values. */
|
to be generated). They also occur for SFmode values. */
|
||||||
return 1;
|
return 1;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -450,7 +458,7 @@ long_immediate_operand (op, mode)
|
||||||
int
|
int
|
||||||
long_immediate_loadstore_operand (op, mode)
|
long_immediate_loadstore_operand (op, mode)
|
||||||
rtx op;
|
rtx op;
|
||||||
enum machine_mode mode;
|
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
if (GET_CODE (op) != MEM)
|
if (GET_CODE (op) != MEM)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -480,6 +488,8 @@ long_immediate_loadstore_operand (op, mode)
|
||||||
&& !SMALL_INT (INTVAL (XEXP (op, 1))))
|
&& !SMALL_INT (INTVAL (XEXP (op, 1))))
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -644,7 +654,7 @@ nonvol_nonimm_operand (op, mode)
|
||||||
int
|
int
|
||||||
const_sint32_operand (op, mode)
|
const_sint32_operand (op, mode)
|
||||||
rtx op;
|
rtx op;
|
||||||
enum machine_mode mode;
|
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
/* All allowed constants will fit a CONST_INT. */
|
/* All allowed constants will fit a CONST_INT. */
|
||||||
return (GET_CODE (op) == CONST_INT
|
return (GET_CODE (op) == CONST_INT
|
||||||
|
@ -658,7 +668,7 @@ const_sint32_operand (op, mode)
|
||||||
int
|
int
|
||||||
const_uint32_operand (op, mode)
|
const_uint32_operand (op, mode)
|
||||||
rtx op;
|
rtx op;
|
||||||
enum machine_mode mode;
|
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
#if HOST_BITS_PER_WIDE_INT > 32
|
#if HOST_BITS_PER_WIDE_INT > 32
|
||||||
/* All allowed constants will fit a CONST_INT. */
|
/* All allowed constants will fit a CONST_INT. */
|
||||||
|
@ -679,7 +689,7 @@ const_uint32_operand (op, mode)
|
||||||
int
|
int
|
||||||
proper_comparison_operator (op, mode)
|
proper_comparison_operator (op, mode)
|
||||||
rtx op;
|
rtx op;
|
||||||
enum machine_mode mode;
|
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
enum rtx_code code = GET_CODE (op);
|
enum rtx_code code = GET_CODE (op);
|
||||||
|
|
||||||
|
@ -759,7 +769,7 @@ void
|
||||||
arc_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
|
arc_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
|
||||||
CUMULATIVE_ARGS *cum;
|
CUMULATIVE_ARGS *cum;
|
||||||
enum machine_mode mode;
|
enum machine_mode mode;
|
||||||
tree type;
|
tree type ATTRIBUTE_UNUSED;
|
||||||
int *pretend_size;
|
int *pretend_size;
|
||||||
int no_rtl;
|
int no_rtl;
|
||||||
{
|
{
|
||||||
|
@ -843,6 +853,8 @@ arc_address_cost (addr)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 4;
|
return 4;
|
||||||
|
@ -1381,7 +1393,7 @@ arc_finalize_pic ()
|
||||||
int
|
int
|
||||||
shift_operator (op, mode)
|
shift_operator (op, mode)
|
||||||
rtx op;
|
rtx op;
|
||||||
enum machine_mode mode;
|
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
switch (GET_CODE (op))
|
switch (GET_CODE (op))
|
||||||
{
|
{
|
||||||
|
@ -1408,15 +1420,14 @@ shift_operator (op, mode)
|
||||||
/* ??? We use the loop register here. We don't use it elsewhere (yet) and
|
/* ??? We use the loop register here. We don't use it elsewhere (yet) and
|
||||||
using it here will give us a chance to play with it. */
|
using it here will give us a chance to play with it. */
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
output_shift (operands)
|
output_shift (operands)
|
||||||
rtx *operands;
|
rtx *operands;
|
||||||
{
|
{
|
||||||
static int loopend_lab;
|
|
||||||
rtx shift = operands[3];
|
rtx shift = operands[3];
|
||||||
enum machine_mode mode = GET_MODE (shift);
|
enum machine_mode mode = GET_MODE (shift);
|
||||||
enum rtx_code code = GET_CODE (shift);
|
enum rtx_code code = GET_CODE (shift);
|
||||||
char *shift_one;
|
const char *shift_one;
|
||||||
|
|
||||||
if (mode != SImode)
|
if (mode != SImode)
|
||||||
abort ();
|
abort ();
|
||||||
|
@ -1472,6 +1483,8 @@ output_shift (operands)
|
||||||
/* The ARC doesn't have a rol insn. Use something else. */
|
/* The ARC doesn't have a rol insn. Use something else. */
|
||||||
output_asm_insn ("asl.f 0,%0\n\tadc %0,0,0", operands);
|
output_asm_insn ("asl.f 0,%0\n\tadc %0,0,0", operands);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Must loop. */
|
/* Must loop. */
|
||||||
|
@ -1487,7 +1500,7 @@ output_shift (operands)
|
||||||
if (optimize)
|
if (optimize)
|
||||||
{
|
{
|
||||||
if (flag_pic)
|
if (flag_pic)
|
||||||
sprintf ("lr %%4,[status]\n\tadd %%4,%%4,6\t%s single insn loop start",
|
sprintf (buf, "lr %%4,[status]\n\tadd %%4,%%4,6\t%s single insn loop start",
|
||||||
ASM_COMMENT_START);
|
ASM_COMMENT_START);
|
||||||
else
|
else
|
||||||
sprintf (buf, "mov %%4,%%%%st(1f)\t%s (single insn loop start) >> 2",
|
sprintf (buf, "mov %%4,%%%%st(1f)\t%s (single insn loop start) >> 2",
|
||||||
|
@ -1531,7 +1544,7 @@ output_shift (operands)
|
||||||
|
|
||||||
void
|
void
|
||||||
arc_initialize_trampoline (tramp, fnaddr, cxt)
|
arc_initialize_trampoline (tramp, fnaddr, cxt)
|
||||||
rtx tramp, fnaddr, cxt;
|
rtx tramp ATTRIBUTE_UNUSED, fnaddr ATTRIBUTE_UNUSED, cxt ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1601,9 +1614,11 @@ arc_print_operand (file, x, code)
|
||||||
arc_condition_codes[arc_ccfsm_current_cc]);
|
arc_condition_codes[arc_ccfsm_current_cc]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* This insn is executed for either path, so don't
|
{
|
||||||
conditionalize it at all. */
|
/* This insn is executed for either path, so don't
|
||||||
; /* nothing to do */
|
conditionalize it at all. */
|
||||||
|
; /* nothing to do */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1677,7 +1692,7 @@ arc_print_operand (file, x, code)
|
||||||
|
|
||||||
split_double (x, &first, &second);
|
split_double (x, &first, &second);
|
||||||
fprintf (file, "0x%08lx",
|
fprintf (file, "0x%08lx",
|
||||||
code == 'L' ? INTVAL (first) : INTVAL (second));
|
(long)(code == 'L' ? INTVAL (first) : INTVAL (second)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
output_operand_lossage ("invalid operand to %H/%L code");
|
output_operand_lossage ("invalid operand to %H/%L code");
|
||||||
|
@ -1882,8 +1897,8 @@ record_cc_ref (insn)
|
||||||
void
|
void
|
||||||
arc_final_prescan_insn (insn, opvec, noperands)
|
arc_final_prescan_insn (insn, opvec, noperands)
|
||||||
rtx insn;
|
rtx insn;
|
||||||
rtx *opvec;
|
rtx *opvec ATTRIBUTE_UNUSED;
|
||||||
int noperands;
|
int noperands ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
/* BODY will hold the body of INSN. */
|
/* BODY will hold the body of INSN. */
|
||||||
register rtx body = PATTERN (insn);
|
register rtx body = PATTERN (insn);
|
||||||
|
@ -2167,7 +2182,7 @@ arc_final_prescan_insn (insn, opvec, noperands)
|
||||||
|
|
||||||
void
|
void
|
||||||
arc_ccfsm_at_label (prefix, num)
|
arc_ccfsm_at_label (prefix, num)
|
||||||
char *prefix;
|
const char *prefix;
|
||||||
int num;
|
int num;
|
||||||
{
|
{
|
||||||
if (arc_ccfsm_state == 3 && arc_ccfsm_target_label == num
|
if (arc_ccfsm_state == 3 && arc_ccfsm_target_label == num
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
|
/* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
|
||||||
Copyright (C) 1994, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1994, 95, 97, 98, 99, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU CC.
|
This file is part of GNU CC.
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
|
||||||
#undef PTRDIFF_TYPE
|
#undef PTRDIFF_TYPE
|
||||||
#undef WCHAR_TYPE
|
#undef WCHAR_TYPE
|
||||||
#undef WCHAR_TYPE_SIZE
|
#undef WCHAR_TYPE_SIZE
|
||||||
|
#undef ASM_OUTPUT_LABELREF
|
||||||
|
|
||||||
/* Print subsidiary information on the compiler version in use. */
|
/* Print subsidiary information on the compiler version in use. */
|
||||||
#define TARGET_VERSION fprintf (stderr, " (arc)")
|
#define TARGET_VERSION fprintf (stderr, " (arc)")
|
||||||
|
@ -147,8 +148,8 @@ extern int target_flags;
|
||||||
extern char *m88k_short_data;
|
extern char *m88k_short_data;
|
||||||
#define TARGET_OPTIONS { { "short-data-", &m88k_short_data } } */
|
#define TARGET_OPTIONS { { "short-data-", &m88k_short_data } } */
|
||||||
|
|
||||||
extern char *arc_cpu_string;
|
extern const char *arc_cpu_string;
|
||||||
extern char *arc_text_string,*arc_data_string,*arc_rodata_string;
|
extern const char *arc_text_string,*arc_data_string,*arc_rodata_string;
|
||||||
|
|
||||||
#define TARGET_OPTIONS \
|
#define TARGET_OPTIONS \
|
||||||
{ \
|
{ \
|
||||||
|
@ -176,7 +177,6 @@ extern int arc_cpu_type;
|
||||||
Don't use this macro to turn on various extra optimizations for
|
Don't use this macro to turn on various extra optimizations for
|
||||||
`-O'. That is what `OPTIMIZATION_OPTIONS' is for. */
|
`-O'. That is what `OPTIMIZATION_OPTIONS' is for. */
|
||||||
|
|
||||||
extern void arc_init ();
|
|
||||||
|
|
||||||
#define OVERRIDE_OPTIONS \
|
#define OVERRIDE_OPTIONS \
|
||||||
do { \
|
do { \
|
||||||
|
@ -688,7 +688,7 @@ extern enum reg_class arc_regno_reg_class[];
|
||||||
#define ROUND_ADVANCE_CUM(CUM, MODE, TYPE) \
|
#define ROUND_ADVANCE_CUM(CUM, MODE, TYPE) \
|
||||||
((((MODE) == BLKmode ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) \
|
((((MODE) == BLKmode ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) \
|
||||||
> BITS_PER_WORD) \
|
> BITS_PER_WORD) \
|
||||||
? ((CUM) + 1 & ~1) \
|
? (((CUM) + 1) & ~1) \
|
||||||
: (CUM))
|
: (CUM))
|
||||||
|
|
||||||
/* Return boolean indicating arg of type TYPE and mode MODE will be passed in
|
/* Return boolean indicating arg of type TYPE and mode MODE will be passed in
|
||||||
|
@ -1055,7 +1055,6 @@ do { \
|
||||||
|
|
||||||
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
|
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
|
||||||
return the mode to be used for the comparison. */
|
return the mode to be used for the comparison. */
|
||||||
extern enum machine_mode arc_select_cc_mode ();
|
|
||||||
#define SELECT_CC_MODE(OP, X, Y) \
|
#define SELECT_CC_MODE(OP, X, Y) \
|
||||||
arc_select_cc_mode (OP, X, Y)
|
arc_select_cc_mode (OP, X, Y)
|
||||||
|
|
||||||
|
@ -1155,7 +1154,7 @@ arc_select_cc_mode (OP, X, Y)
|
||||||
#define ARC_DEFAULT_DATA_SECTION ".data"
|
#define ARC_DEFAULT_DATA_SECTION ".data"
|
||||||
#define ARC_DEFAULT_RODATA_SECTION ".rodata"
|
#define ARC_DEFAULT_RODATA_SECTION ".rodata"
|
||||||
|
|
||||||
extern char *arc_text_section,*arc_data_section,*arc_rodata_section;
|
extern const char *arc_text_section, *arc_data_section, *arc_rodata_section;
|
||||||
|
|
||||||
/* initfini.c uses this in an asm. */
|
/* initfini.c uses this in an asm. */
|
||||||
#if defined (CRT_INIT) || defined (CRT_FINI)
|
#if defined (CRT_INIT) || defined (CRT_FINI)
|
||||||
|
@ -1257,7 +1256,6 @@ do { \
|
||||||
/* Control the assembler format that we output. */
|
/* Control the assembler format that we output. */
|
||||||
|
|
||||||
/* Output at beginning of assembler file. */
|
/* Output at beginning of assembler file. */
|
||||||
extern void arc_asm_file_start ();
|
|
||||||
#undef ASM_FILE_START
|
#undef ASM_FILE_START
|
||||||
#define ASM_FILE_START(FILE) arc_asm_file_start (FILE)
|
#define ASM_FILE_START(FILE) arc_asm_file_start (FILE)
|
||||||
|
|
||||||
|
@ -1365,7 +1363,7 @@ do { \
|
||||||
/* On the ARC we want to have libgcc's for multiple cpus in one binary.
|
/* On the ARC we want to have libgcc's for multiple cpus in one binary.
|
||||||
We can't use `assemble_name' here as that will call ASM_OUTPUT_LABELREF
|
We can't use `assemble_name' here as that will call ASM_OUTPUT_LABELREF
|
||||||
and we'll get another suffix added on if -mmangle-cpu. */
|
and we'll get another suffix added on if -mmangle-cpu. */
|
||||||
extern char *arc_mangle_cpu;
|
extern const char *arc_mangle_cpu;
|
||||||
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, SYMREF) \
|
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, SYMREF) \
|
||||||
do { \
|
do { \
|
||||||
if (TARGET_MANGLE_CPU_LIBGCC) \
|
if (TARGET_MANGLE_CPU_LIBGCC) \
|
||||||
|
@ -1384,7 +1382,7 @@ do { \
|
||||||
/* We work around a dwarfout.c deficiency by watching for labels from it and
|
/* We work around a dwarfout.c deficiency by watching for labels from it and
|
||||||
not adding the '_' prefix nor the cpu suffix. There is a comment in
|
not adding the '_' prefix nor the cpu suffix. There is a comment in
|
||||||
dwarfout.c that says it should be using ASM_OUTPUT_INTERNAL_LABEL. */
|
dwarfout.c that says it should be using ASM_OUTPUT_INTERNAL_LABEL. */
|
||||||
extern char *arc_mangle_cpu;
|
extern const char *arc_mangle_cpu;
|
||||||
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
|
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
|
||||||
do { \
|
do { \
|
||||||
if ((NAME)[0] == '.' && (NAME)[1] == 'L') \
|
if ((NAME)[0] == '.' && (NAME)[1] == 'L') \
|
||||||
|
@ -1519,8 +1517,12 @@ do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", 1 << (LOG)); } while (0)
|
||||||
/* Debugging information. */
|
/* Debugging information. */
|
||||||
|
|
||||||
/* Generate DBX and DWARF debugging information. */
|
/* Generate DBX and DWARF debugging information. */
|
||||||
|
#ifndef DBX_DEBUGGING_INFO
|
||||||
#define DBX_DEBUGGING_INFO
|
#define DBX_DEBUGGING_INFO
|
||||||
|
#endif
|
||||||
|
#ifndef DWARF_DEBUGGING_INFO
|
||||||
#define DWARF_DEBUGGING_INFO
|
#define DWARF_DEBUGGING_INFO
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Prefer STABS (for now). */
|
/* Prefer STABS (for now). */
|
||||||
#undef PREFERRED_DEBUGGING_TYPE
|
#undef PREFERRED_DEBUGGING_TYPE
|
||||||
|
@ -1593,19 +1595,16 @@ do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", 1 << (LOG)); } while (0)
|
||||||
/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
|
/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
|
||||||
is a valid machine specific attribute for DECL.
|
is a valid machine specific attribute for DECL.
|
||||||
The attributes in ATTRIBUTES have previously been assigned to TYPE. */
|
The attributes in ATTRIBUTES have previously been assigned to TYPE. */
|
||||||
extern int arc_valid_machine_attribute ();
|
|
||||||
#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
|
#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
|
||||||
arc_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
|
arc_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
|
||||||
|
|
||||||
/* A C expression that returns zero if the attributes on TYPE1 and TYPE2 are
|
/* A C expression that returns zero if the attributes on TYPE1 and TYPE2 are
|
||||||
incompatible, one if they are compatible, and two if they are
|
incompatible, one if they are compatible, and two if they are
|
||||||
nearly compatible (which causes a warning to be generated). */
|
nearly compatible (which causes a warning to be generated). */
|
||||||
extern int arc_comp_type_attributes ();
|
|
||||||
#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
|
#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
|
||||||
arc_comp_type_attributes (TYPE1, TYPE2)
|
arc_comp_type_attributes (TYPE1, TYPE2)
|
||||||
|
|
||||||
/* Give newly defined TYPE some default attributes. */
|
/* Give newly defined TYPE some default attributes. */
|
||||||
extern void arc_set_default_type_attributes ();
|
|
||||||
#define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) \
|
#define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) \
|
||||||
arc_set_default_type_attributes (TYPE)
|
arc_set_default_type_attributes (TYPE)
|
||||||
|
|
||||||
|
@ -1618,12 +1617,6 @@ arc_set_default_type_attributes (TYPE)
|
||||||
since it hasn't been defined! */
|
since it hasn't been defined! */
|
||||||
extern struct rtx_def *arc_compare_op0, *arc_compare_op1;
|
extern struct rtx_def *arc_compare_op0, *arc_compare_op1;
|
||||||
|
|
||||||
/* Define the function that build the compare insn for scc and bcc. */
|
|
||||||
extern struct rtx_def *gen_compare_reg ();
|
|
||||||
|
|
||||||
/* Declarations for various fns used in the .md file. */
|
|
||||||
extern char *output_shift ();
|
|
||||||
|
|
||||||
/* ARC function types. */
|
/* ARC function types. */
|
||||||
enum arc_function_type {
|
enum arc_function_type {
|
||||||
ARC_FUNCTION_UNKNOWN, ARC_FUNCTION_NORMAL,
|
ARC_FUNCTION_UNKNOWN, ARC_FUNCTION_NORMAL,
|
||||||
|
@ -1634,7 +1627,6 @@ enum arc_function_type {
|
||||||
#define ARC_INTERRUPT_P(TYPE) \
|
#define ARC_INTERRUPT_P(TYPE) \
|
||||||
((TYPE) == ARC_FUNCTION_ILINK1 || (TYPE) == ARC_FUNCTION_ILINK2)
|
((TYPE) == ARC_FUNCTION_ILINK1 || (TYPE) == ARC_FUNCTION_ILINK2)
|
||||||
/* Compute the type of a function from its DECL. */
|
/* Compute the type of a function from its DECL. */
|
||||||
enum arc_function_type arc_compute_function_type ();
|
|
||||||
|
|
||||||
|
|
||||||
/* Implement `va_start' for varargs and stdarg. */
|
/* Implement `va_start' for varargs and stdarg. */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;; Machine description of the Argonaut ARC cpu for GNU C compiler
|
;; Machine description of the Argonaut ARC cpu for GNU C compiler
|
||||||
;; Copyright (C) 1994, 1997, 1998, 1999 Free Software Foundation, Inc.
|
;; Copyright (C) 1994, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; This file is part of GNU CC.
|
;; This file is part of GNU CC.
|
||||||
|
|
||||||
|
@ -290,6 +290,8 @@
|
||||||
return \"ld%V1 %0,%1\;ld%V1 %R0,%R1\";
|
return \"ld%V1 %0,%1\;ld%V1 %R0,%R1\";
|
||||||
case 3 :
|
case 3 :
|
||||||
return \"st%V0 %1,%0\;st%V0 %R1,%R0\";
|
return \"st%V0 %1,%0\;st%V0 %R1,%R0\";
|
||||||
|
default:
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
[(set_attr "type" "move,move,load,store")
|
[(set_attr "type" "move,move,load,store")
|
||||||
|
@ -393,6 +395,8 @@
|
||||||
return \"ld%V1 %0,%1\;ld%V1 %R0,%R1\";
|
return \"ld%V1 %0,%1\;ld%V1 %R0,%R1\";
|
||||||
case 3 :
|
case 3 :
|
||||||
return \"st%V0 %1,%0\;st%V0 %R1,%R0\";
|
return \"st%V0 %1,%0\;st%V0 %R1,%R0\";
|
||||||
|
default:
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
[(set_attr "type" "move,move,load,store")
|
[(set_attr "type" "move,move,load,store")
|
||||||
|
|
Loading…
Add table
Reference in a new issue