mn10300-protos.h: New file.

* mn10300-protos.h: New file.

        * mn10300.c: Include tm_p.h.  Add static prototypes.  Fix compile
        time warnings.

        * mn10300.h: Move prototypes to mn10300-protos.h.  Fix compile time
        warnings.

        * mn10300.md: Likewise.

From-SVN: r31428
This commit is contained in:
Kaveh R. Ghazi 2000-01-14 23:03:45 +00:00 committed by Kaveh Ghazi
parent ac42d1e9b1
commit 69bc71fad0
5 changed files with 123 additions and 56 deletions

View File

@ -1,3 +1,15 @@
2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* mn10300-protos.h: New file.
* mn10300.c: Include tm_p.h. Add static prototypes. Fix compile
time warnings.
* mn10300.h: Move prototypes to mn10300-protos.h. Fix compile time
warnings.
* mn10300.md: Likewise.
2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* mn10200-protos.h: New file.

View File

@ -0,0 +1,56 @@
/* Definitions of target machine for GNU compiler. Matsushita MN10300 series
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
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 mn10300_va_start PARAMS ((int, tree, rtx));
#endif /* TREE_CODE */
extern struct rtx_def *legitimize_address PARAMS ((rtx, rtx, enum machine_mode));
extern void print_operand PARAMS ((FILE *, rtx, int));
extern void print_operand_address PARAMS ((FILE *, rtx));
extern void notice_update_cc PARAMS ((rtx, rtx));
extern enum reg_class secondary_reload_class PARAMS ((enum reg_class,
enum machine_mode, rtx));
extern char *output_tst PARAMS ((rtx, rtx));
extern int symbolic_operand PARAMS ((rtx, enum machine_mode));
extern int call_address_operand PARAMS ((rtx, enum machine_mode));
extern int impossible_plus_operand PARAMS ((rtx, enum machine_mode));
extern int const_8bit_operand PARAMS ((rtx, enum machine_mode));
#endif /* RTX_CODE */
#ifdef TREE_CODE
extern struct rtx_def *function_arg PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode, tree, int));
extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode, tree, int));
extern struct rtx_def *mn10300_va_arg PARAMS ((tree, tree));
#endif /* TREE_CODE */
extern struct rtx_def *mn10300_builtin_saveregs PARAMS ((void));
extern void asm_file_start PARAMS ((FILE *));
extern void expand_prologue PARAMS ((void));
extern void expand_epilogue PARAMS ((void));
extern int initial_offset PARAMS ((int, int));
extern int can_use_return_insn PARAMS ((void));
extern int mask_ok_for_mem_btst PARAMS ((int, int));

View File

@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for Matsushita MN10300 series
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
This file is part of GNU CC.
@ -36,6 +36,8 @@ Boston, MA 02111-1307, USA. */
#include "expr.h"
#include "function.h"
#include "obstack.h"
#include "toplev.h"
#include "tm_p.h"
/* The size of the callee register save area. Right now we save everything
on entry since it costs us nothing in code size. It does cost us from a
@ -168,6 +170,8 @@ print_operand (file, x, code)
print_operand_address (file,
GEN_INT (CONST_DOUBLE_LOW (x)));
break;
default:
break;
}
break;
}
@ -220,6 +224,8 @@ print_operand (file, x, code)
print_operand_address (file,
GEN_INT (CONST_DOUBLE_HIGH (x)));
break;
default:
break;
}
break;
}
@ -549,7 +555,7 @@ notice_update_cc (body, insn)
int
call_address_operand (op, mode)
rtx op;
enum machine_mode mode;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == REG);
}
@ -564,8 +570,6 @@ secondary_reload_class (class, mode, in)
enum machine_mode mode;
rtx in;
{
int regno;
/* Memory loads less than a full word wide can't have an
address or stack pointer destination. They must use
a data register as an intermediate register. */
@ -742,7 +746,7 @@ function_arg (cum, mode, type, named)
CUMULATIVE_ARGS *cum;
enum machine_mode mode;
tree type;
int named;
int named ATTRIBUTE_UNUSED;
{
rtx result = 0;
int size, align;
@ -795,7 +799,7 @@ function_arg_partial_nregs (cum, mode, type, named)
CUMULATIVE_ARGS *cum;
enum machine_mode mode;
tree type;
int named;
int named ATTRIBUTE_UNUSED;
{
int size, align;
@ -924,11 +928,8 @@ output_tst (operand, insn)
int
impossible_plus_operand (op, mode)
rtx op;
enum machine_mode mode;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
extern rtx *reg_equiv_mem;
rtx reg1, reg2;
if (GET_CODE (op) != PLUS)
return 0;
@ -945,7 +946,7 @@ impossible_plus_operand (op, mode)
int
const_8bit_operand (op, mode)
register rtx op;
enum machine_mode mode;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == CONST_INT
&& INTVAL (op) >= 0
@ -981,7 +982,7 @@ mask_ok_for_mem_btst (len, bit)
int
symbolic_operand (op, mode)
register rtx op;
enum machine_mode mode;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
@ -1016,8 +1017,8 @@ symbolic_operand (op, mode)
rtx
legitimize_address (x, oldx, mode)
rtx x;
rtx oldx;
enum machine_mode mode;
rtx oldx ATTRIBUTE_UNUSED;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
/* Uh-oh. We might have an address for x[n-100000]. This needs
special handling to avoid creating an indexed memory address
@ -1029,7 +1030,7 @@ legitimize_address (x, oldx, mode)
by the index expression is computed first, then added to x to form
the entire address. */
rtx regx1, regx2, regy1, regy2, y;
rtx regx1, regy1, regy2, y;
/* Strip off any CONST. */
y = XEXP (x, 1);

View File

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Matsushita MN10300 series
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
This file is part of GNU CC.
@ -251,19 +251,19 @@ enum reg_class {
of length N_REG_CLASSES. */
#define REG_CLASS_CONTENTS \
{ 0, /* No regs */ \
0x0000f, /* DATA_REGS */ \
0x001f0, /* ADDRESS_REGS */ \
0x00200, /* SP_REGS */ \
0x001ff, /* DATA_OR_ADDRESS_REGS */\
0x003f0, /* SP_OR_ADDRESS_REGS */\
0x2fc00, /* EXTENDED_REGS */ \
0x2fc0f, /* DATA_OR_EXTENDED_REGS */ \
0x2fdf0, /* ADDRESS_OR_EXTENDED_REGS */ \
0x2fe00, /* SP_OR_EXTENDED_REGS */ \
0x2fff0, /* SP_OR_ADDRESS_OR_EXTENDED_REGS */ \
0x2fdff, /* GENERAL_REGS */ \
0x2ffff, /* ALL_REGS */ \
{ {0}, /* No regs */ \
{0x0000f}, /* DATA_REGS */ \
{0x001f0}, /* ADDRESS_REGS */ \
{0x00200}, /* SP_REGS */ \
{0x001ff}, /* DATA_OR_ADDRESS_REGS */\
{0x003f0}, /* SP_OR_ADDRESS_REGS */\
{0x2fc00}, /* EXTENDED_REGS */ \
{0x2fc0f}, /* DATA_OR_EXTENDED_REGS */ \
{0x2fdf0}, /* ADDRESS_OR_EXTENDED_REGS */ \
{0x2fe00}, /* SP_OR_EXTENDED_REGS */ \
{0x2fff0}, /* SP_OR_ADDRESS_OR_EXTENDED_REGS */ \
{0x2fdff}, /* GENERAL_REGS */ \
{0x2ffff}, /* ALL_REGS */ \
}
/* The same information, inverted:
@ -504,7 +504,6 @@ struct cum_arg {int nbytes; };
/* On the MN10300 all args are pushed. */
extern struct rtx_def *function_arg ();
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
function_arg (&CUM, MODE, TYPE, NAMED)
@ -606,16 +605,13 @@ extern struct rtx_def *function_arg ();
Ordinarily they are not call used registers, but they are for
_builtin_saveregs, so we must make this explicit. */
extern struct rtx_def *mn10300_builtin_saveregs ();
#define EXPAND_BUILTIN_SAVEREGS() mn10300_builtin_saveregs ()
/* Implement `va_start' for varargs and stdarg. */
extern void mn10300_va_start();
#define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \
mn10300_va_start (stdarg, valist, nextarg)
/* Implement `va_arg'. */
extern struct rtx_def *mn10300_va_arg();
#define EXPAND_BUILTIN_VA_ARG(valist, type) \
mn10300_va_arg (valist, type)
@ -754,7 +750,6 @@ extern struct rtx_def *mn10300_va_arg();
It is always safe for this macro to do nothing. It exists to recognize
opportunities to optimize the output. */
extern struct rtx_def *legitimize_address ();
#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \
{ rtx orig_x = (X); \
(X) = legitimize_address (X, OLDX, MODE); \
@ -1088,16 +1083,3 @@ do { char dstr[30]; \
#define FILE_ASM_OP "\t.file\n"
extern void asm_file_start ();
extern int const_costs ();
extern void print_operand ();
extern void print_operand_address ();
extern void expand_prologue ();
extern void expand_epilogue ();
extern void notice_update_cc ();
extern int call_address_operand ();
extern int impossible_plus_operand ();
extern enum reg_class secondary_reload_class ();
extern int initial_offset ();
extern char *output_tst ();
int symbolic_operand ();

View File

@ -1,5 +1,5 @@
;; GCC machine description for Matsushita MN10300
;; Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
;; Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
;; Contributed by Jeff Law (law@cygnus.com).
;; This file is part of GNU CC.
@ -97,6 +97,8 @@
case 8:
case 9:
return \"movbu %1,%0\";
default:
abort();
}
}"
[(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
@ -133,6 +135,8 @@
case 8:
case 9:
return \"movbu %1,%0\";
default:
abort();
}
}"
[(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
@ -193,6 +197,8 @@
case 8:
case 9:
return \"movhu %1,%0\";
default:
abort();
}
}"
[(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
@ -228,6 +234,8 @@
case 8:
case 9:
return \"movhu %1,%0\";
default:
abort();
}
}"
[(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
@ -332,6 +340,8 @@
return \"movu %1,%0\";
}
return \"mov %1,%0\";
default:
abort();
}
}"
[(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
@ -375,6 +385,8 @@
return \"movu %1,%0\";
}
return \"mov %1,%0\";
default:
abort();
}
}"
[(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit")])
@ -517,6 +529,8 @@
output_asm_insn (\"mov %H1,%H0\", operands);
return \"\";
}
default:
abort();
}
}"
[(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
@ -659,6 +673,8 @@
output_asm_insn (\"mov %H1,%H0\", operands);
return \"\";
}
default:
abort();
}
}"
[(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
@ -807,6 +823,8 @@
return \"mov %1,%0\;add %2,%0\";
return \"mov %2,%0\;add %1,%0\";
}
default:
abort();
}
}"
[(set_attr "cc" "set_zn,none_0hit,none_0hit,set_zn,none_0hit,set_zn")])
@ -847,6 +865,8 @@
== REGNO_REG_CLASS (true_regnum (operands[0])))
return \"mov %1,%0\;add %2,%0\";
return \"mov %2,%0\;add %1,%0\";
default:
abort();
}
}"
[(set_attr "cc" "set_zn,none_0hit,none_0hit,set_zn,none_0hit,set_zn")])
@ -1506,7 +1526,7 @@
""
"
{
if (! call_address_operand (XEXP (operands[0], 0)))
if (! call_address_operand (XEXP (operands[0], 0), VOIDmode))
XEXP (operands[0], 0) = force_reg (SImode, XEXP (operands[0], 0));
emit_call_insn (gen_call_internal (XEXP (operands[0], 0), operands[1]));
DONE;
@ -1535,7 +1555,7 @@
""
"
{
if (! call_address_operand (XEXP (operands[1], 0)))
if (! call_address_operand (XEXP (operands[1], 0), VOIDmode))
XEXP (operands[1], 0) = force_reg (SImode, XEXP (operands[1], 0));
emit_call_insn (gen_call_value_internal (operands[0],
XEXP (operands[1], 0),
@ -1996,9 +2016,7 @@
""
"*
{
int i, need_comma;
int d2, d3, a2, a3;
int exreg1;
int need_comma;
need_comma = 0;
fputs (\"\\tret [\", asm_out_file);
@ -2046,9 +2064,7 @@
""
"*
{
int i, need_comma;
int d2, d3, a2, a3;
int exreg1;
int need_comma;
need_comma = 0;
fputs (\"\\tmovm [\", asm_out_file);