Commit e5778b1e by Kaveh R. Ghazi Committed by Kaveh Ghazi

m88k-protos.h: New file.

        * m88k-protos.h: New file.

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

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

        * m88k.md: Likewise.

        * tekXD88.h: Likewise.

From-SVN: r31359
parent 5505f548
2000-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2000-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* m88k-protos.h: New file.
* m88k.c: Include tm_p.h. Add static prototypes. Fix compile
time warnings.
* m88k.h: Move prototypes to m88k-protos.h. Fix compile time warnings.
* m88k.md: Likewise.
* tekXD88.h: Likewise.
2000-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* m68k-protos.h: New file. * m68k-protos.h: New file.
* m68k.c: Include tm_p.h. Add static prototypes. Fix compile * m68k.c: Include tm_p.h. Add static prototypes. Fix compile
......
/* Definitions of target machine for GNU compiler for
Motorola m88100 in an 88open OCS/BCS environment.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com).
Currently maintained by (gcc@dg-rtp.dg.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
extern int m88k_debugger_offset PARAMS ((rtx, int));
extern void emit_bcnd PARAMS ((enum rtx_code, rtx));
extern void expand_block_move PARAMS ((rtx, rtx, rtx *));
extern void print_operand PARAMS ((FILE *, rtx, int));
extern void print_operand_address PARAMS ((FILE *, rtx));
extern const char *output_load_const_int PARAMS ((enum machine_mode, rtx *));
extern const char *output_load_const_float PARAMS ((rtx *));
extern const char *output_load_const_double PARAMS ((rtx *));
extern const char *output_load_const_dimode PARAMS ((rtx *));
extern const char *output_and PARAMS ((rtx[]));
extern const char *output_ior PARAMS ((rtx[]));
extern const char *output_xor PARAMS ((rtx[]));
extern const char *output_call PARAMS ((rtx[], rtx));
extern struct rtx_def *emit_test PARAMS ((enum rtx_code, enum machine_mode));
extern struct rtx_def *legitimize_address PARAMS ((int, rtx, rtx, rtx));
extern struct rtx_def *legitimize_operand PARAMS ((rtx, enum machine_mode));
extern int pic_address_needs_scratch PARAMS ((rtx));
extern int symbolic_address_p PARAMS ((rtx));
extern int condition_value PARAMS ((rtx));
extern int emit_move_sequence PARAMS ((rtx *, enum machine_mode, rtx));
extern int mostly_false_jump PARAMS ((rtx, rtx));
extern int real_power_of_2_operand PARAMS ((rtx, enum machine_mode));
extern int move_operand PARAMS ((rtx, enum machine_mode));
extern int call_address_operand PARAMS ((rtx, enum machine_mode));
extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode));
extern int arith_operand PARAMS ((rtx, enum machine_mode));
extern int arith5_operand PARAMS ((rtx, enum machine_mode));
extern int arith32_operand PARAMS ((rtx, enum machine_mode));
extern int arith64_operand PARAMS ((rtx, enum machine_mode));
extern int int5_operand PARAMS ((rtx, enum machine_mode));
extern int int32_operand PARAMS ((rtx, enum machine_mode));
extern int add_operand PARAMS ((rtx, enum machine_mode));
extern int reg_or_bbx_mask_operand PARAMS ((rtx, enum machine_mode));
extern int real_or_0_operand PARAMS ((rtx, enum machine_mode));
extern int partial_ccmode_register_operand PARAMS ((rtx, enum machine_mode));
extern int relop PARAMS ((rtx, enum machine_mode));
extern int even_relop PARAMS ((rtx, enum machine_mode));
extern int odd_relop PARAMS ((rtx, enum machine_mode));
extern int relop_no_unsigned PARAMS ((rtx, enum machine_mode));
extern int equality_op PARAMS ((rtx, enum machine_mode));
extern int pc_or_label_ref PARAMS ((rtx, enum machine_mode));
extern int symbolic_operand PARAMS ((rtx, enum machine_mode));
#ifdef TREE_CODE
extern void m88k_va_start PARAMS ((int, tree, rtx));
#endif /* TREE_CODE */
#endif /* RTX_CODE */
#ifdef ANSI_PROTOTYPES
struct m88k_lang_independent_options;
#endif
extern void output_file_start PARAMS ((FILE *,
struct m88k_lang_independent_options *,
int,
struct m88k_lang_independent_options *,
int));
extern int null_prologue PARAMS ((void));
extern int integer_ok_for_set PARAMS ((unsigned));
extern void m88k_layout_frame PARAMS ((void));
extern void m88k_expand_prologue PARAMS ((void));
extern void m88k_begin_prologue PARAMS ((FILE *, int));
extern void m88k_end_prologue PARAMS ((FILE *));
extern void m88k_expand_epilogue PARAMS ((void));
extern void m88k_begin_epilogue PARAMS ((FILE *));
extern void m88k_end_epilogue PARAMS ((FILE *, int));
extern void output_function_profiler PARAMS ((FILE *, int, const char *, int));
extern void output_function_block_profiler PARAMS ((FILE *, int));
extern void output_block_profiler PARAMS ((FILE *, int));
extern void output_ascii PARAMS ((FILE *, const char *, int,
const unsigned char *, int));
extern void output_label PARAMS ((int));
extern struct rtx_def *m88k_builtin_saveregs PARAMS ((void));
extern enum m88k_instruction classify_integer PARAMS ((enum machine_mode, int));
extern int mak_mask_p PARAMS ((int));
#ifdef TREE_CODE
extern struct rtx_def *m88k_function_arg PARAMS ((CUMULATIVE_ARGS,
enum machine_mode, tree,
int));
extern struct rtx_def *m88k_va_arg PARAMS ((tree, tree));
extern tree m88k_build_va_list PARAMS ((void));
#endif /* TREE_CODE */
/* Definitions of target machine for GNU compiler for /* Definitions of target machine for GNU compiler for
Motorola m88100 in an 88open OCS/BCS environment. Motorola m88100 in an 88open OCS/BCS environment.
Copyright (C) 1988, 92-97, 1998 Free Software Foundation, Inc. Copyright (C) 1988, 92-99, 2000 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com). Contributed by Michael Tiemann (tiemann@cygnus.com).
Currently maintained by (gcc@dg-rtp.dg.com) Currently maintained by (gcc@dg-rtp.dg.com)
...@@ -93,9 +93,9 @@ enum processor_type { ...@@ -93,9 +93,9 @@ enum processor_type {
/* External variables/functions defined in m88k.c. */ /* External variables/functions defined in m88k.c. */
extern char *m88k_pound_sign; extern const char *m88k_pound_sign;
extern char *m88k_short_data; extern const char *m88k_short_data;
extern char *m88k_version; extern const char *m88k_version;
extern char m88k_volatile_code; extern char m88k_volatile_code;
extern unsigned m88k_gp_threshold; extern unsigned m88k_gp_threshold;
...@@ -111,46 +111,6 @@ extern struct rtx_def *m88k_compare_op1; ...@@ -111,46 +111,6 @@ extern struct rtx_def *m88k_compare_op1;
extern enum processor_type m88k_cpu; extern enum processor_type m88k_cpu;
extern int null_prologue ();
extern int integer_ok_for_set ();
extern int m88k_debugger_offset ();
extern void emit_bcnd ();
extern void expand_block_move ();
extern void m88k_layout_frame ();
extern void m88k_expand_prologue ();
extern void m88k_begin_prologue ();
extern void m88k_end_prologue ();
extern void m88k_expand_epilogue ();
extern void m88k_begin_epilogue ();
extern void m88k_end_epilogue ();
extern void output_function_profiler ();
extern void output_function_block_profiler ();
extern void output_block_profiler ();
extern void output_file_start ();
extern void output_ascii ();
extern void output_label ();
extern void print_operand ();
extern void print_operand_address ();
extern char *output_load_const_int ();
extern char *output_load_const_float ();
extern char *output_load_const_double ();
extern char *output_load_const_dimode ();
extern char *output_and ();
extern char *output_ior ();
extern char *output_xor ();
extern char *output_call ();
extern struct rtx_def *emit_test ();
extern struct rtx_def *legitimize_address ();
extern struct rtx_def *legitimize_operand ();
extern struct rtx_def *m88k_function_arg ();
extern struct rtx_def *m88k_builtin_saveregs ();
extern enum m88k_instruction classify_integer ();
/* external variables defined elsewhere in the compiler */ /* external variables defined elsewhere in the compiler */
extern int target_flags; /* -m compiler switches */ extern int target_flags; /* -m compiler switches */
...@@ -329,7 +289,7 @@ extern int flag_pic; /* -fpic */ ...@@ -329,7 +289,7 @@ extern int flag_pic; /* -fpic */
\ \
if (m88k_short_data) \ if (m88k_short_data) \
{ \ { \
char *p = m88k_short_data; \ const char *p = m88k_short_data; \
while (*p) \ while (*p) \
if (*p >= '0' && *p <= '9') \ if (*p >= '0' && *p <= '9') \
p++; \ p++; \
...@@ -1076,17 +1036,14 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, ...@@ -1076,17 +1036,14 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
/* Define the `__builtin_va_list' type for the ABI. */ /* Define the `__builtin_va_list' type for the ABI. */
#define BUILD_VA_LIST_TYPE(VALIST) \ #define BUILD_VA_LIST_TYPE(VALIST) \
(VALIST) = m88k_build_va_list () (VALIST) = m88k_build_va_list ()
extern union tree_node *m88k_build_va_list ();
/* Implement `va_start' for varargs and stdarg. */ /* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \
m88k_va_start (stdarg, valist, nextarg) m88k_va_start (stdarg, valist, nextarg)
extern void m88k_va_start ();
/* Implement `va_arg'. */ /* Implement `va_arg'. */
#define EXPAND_BUILTIN_VA_ARG(valist, type) \ #define EXPAND_BUILTIN_VA_ARG(valist, type) \
m88k_va_arg (valist, type) m88k_va_arg (valist, type)
extern struct rtx_def *m88k_va_arg ();
/* Generate the assembly code for function entry. */ /* Generate the assembly code for function entry. */
#define FUNCTION_PROLOGUE(FILE, SIZE) m88k_begin_prologue(FILE, SIZE) #define FUNCTION_PROLOGUE(FILE, SIZE) m88k_begin_prologue(FILE, SIZE)
...@@ -1858,8 +1815,11 @@ extern struct rtx_def *m88k_va_arg (); ...@@ -1858,8 +1815,11 @@ extern struct rtx_def *m88k_va_arg ();
/* Override svr[34].h. */ /* Override svr[34].h. */
#undef ASM_FILE_START #undef ASM_FILE_START
#define ASM_FILE_START(FILE) \ #define ASM_FILE_START(FILE) \
output_file_start (FILE, f_options, sizeof f_options / sizeof f_options[0], \ output_file_start (FILE, \
W_options, sizeof W_options / sizeof W_options[0]) (struct m88k_lang_independent_options *) f_options, \
sizeof f_options / sizeof f_options[0], \
(struct m88k_lang_independent_options *) W_options, \
sizeof W_options / sizeof W_options[0])
#undef ASM_FILE_END #undef ASM_FILE_END
...@@ -1898,7 +1858,7 @@ extern struct rtx_def *m88k_va_arg (); ...@@ -1898,7 +1858,7 @@ extern struct rtx_def *m88k_va_arg ();
#define ASM_OUTPUT_OPCODE(STREAM, PTR) \ #define ASM_OUTPUT_OPCODE(STREAM, PTR) \
{ \ { \
int ch; \ int ch; \
char *orig_ptr; \ const char *orig_ptr; \
\ \
for (orig_ptr = (PTR); \ for (orig_ptr = (PTR); \
(ch = *(PTR)) && ch != ' ' && ch != '\t' && ch != '\n' && ch != '%'; \ (ch = *(PTR)) && ch != ' ' && ch != '\t' && ch != '\n' && ch != '%'; \
...@@ -1929,7 +1889,7 @@ extern struct rtx_def *m88k_va_arg (); ...@@ -1929,7 +1889,7 @@ extern struct rtx_def *m88k_va_arg ();
is our `condition code' register), so that condition codes can easily is our `condition code' register), so that condition codes can easily
be clobbered by an asm. The carry bit in the PSR is now used. */ be clobbered by an asm. The carry bit in the PSR is now used. */
#define ADDITIONAL_REGISTER_NAMES {"psr", 0, "cc", 0} #define ADDITIONAL_REGISTER_NAMES {{"psr", 0}, {"cc", 0}}
/* How to renumber registers for dbx and gdb. */ /* How to renumber registers for dbx and gdb. */
#define DBX_REGISTER_NUMBER(REGNO) (REGNO) #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
...@@ -1985,7 +1945,7 @@ extern struct rtx_def *m88k_va_arg (); ...@@ -1985,7 +1945,7 @@ extern struct rtx_def *m88k_va_arg ();
#undef ASM_FINISH_DECLARE_OBJECT #undef ASM_FINISH_DECLARE_OBJECT
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
do { \ do { \
char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
&& DECLARE_ASM_NAME \ && DECLARE_ASM_NAME \
&& ! AT_END && TOP_LEVEL \ && ! AT_END && TOP_LEVEL \
...@@ -2117,8 +2077,8 @@ do { \ ...@@ -2117,8 +2077,8 @@ do { \
do { \ do { \
union { REAL_VALUE_TYPE d; long l[2]; } x; \ union { REAL_VALUE_TYPE d; long l[2]; } x; \
x.d = (VALUE); \ x.d = (VALUE); \
fprintf (FILE, "\t%s\t 0x%.8x, 0x%.8x\n", INT_ASM_OP, \ fprintf (FILE, "\t%s\t 0x%.8lx, 0x%.8lx\n", INT_ASM_OP, \
x.l[0], x.l[1]); \ (long) x.l[0], (long) x.l[1]); \
} while (0) } while (0)
/* This is how to output an assembler line defining a `float' constant. */ /* This is how to output an assembler line defining a `float' constant. */
...@@ -2317,7 +2277,7 @@ do { \ ...@@ -2317,7 +2277,7 @@ do { \
#define PUT_SDB_SCL(a) \ #define PUT_SDB_SCL(a) \
do { \ do { \
register int s = (a); \ register int s = (a); \
register char *scl; \ register const char *scl; \
switch (s) \ switch (s) \
{ \ { \
case C_EFCN: scl = "end of function"; break; \ case C_EFCN: scl = "end of function"; break; \
...@@ -2357,9 +2317,10 @@ do { \ ...@@ -2357,9 +2317,10 @@ do { \
do { \ do { \
register int t = (a); \ register int t = (a); \
static char buffer[100]; \ static char buffer[100]; \
register char *p = buffer, *q; \ register char *p = buffer; \
register const char *q; \
register int typ = t; \ register int typ = t; \
register int i,d; \ register int i; \
\ \
for (i = 0; i <= 5; i++) \ for (i = 0; i <= 5; i++) \
{ \ { \
...@@ -2611,6 +2572,7 @@ sdata_section () \ ...@@ -2611,6 +2572,7 @@ sdata_section () \
#define ENCODE_SECTION_INFO(DECL) \ #define ENCODE_SECTION_INFO(DECL) \
do { \ do { \
if (m88k_gp_threshold > 0) \ if (m88k_gp_threshold > 0) \
{ \
if (TREE_CODE (DECL) == VAR_DECL) \ if (TREE_CODE (DECL) == VAR_DECL) \
{ \ { \
if (!TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL)) \ if (!TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL)) \
...@@ -2625,6 +2587,7 @@ sdata_section () \ ...@@ -2625,6 +2587,7 @@ sdata_section () \
&& flag_writable_strings \ && flag_writable_strings \
&& TREE_STRING_LENGTH (DECL) <= m88k_gp_threshold) \ && TREE_STRING_LENGTH (DECL) <= m88k_gp_threshold) \
SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (DECL), 0)) = 1; \ SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (DECL), 0)) = 1; \
} \
} while (0) } while (0)
/* Print operand X (an rtx) in assembler syntax to file FILE. /* Print operand X (an rtx) in assembler syntax to file FILE.
......
;;- Machine description for the Motorola 88000 for GNU C compiler ;;- Machine description for the Motorola 88000 for GNU C compiler
;;; Copyright (C) 1988, 92-96, 1998, 1999 Free Software Foundation, Inc. ;; Copyright (C) 1988, 92-96, 98, 99, 2000 Free Software Foundation, Inc.
;; Contributed by Michael Tiemann (tiemann@mcc.com) ;; Contributed by Michael Tiemann (tiemann@mcc.com)
;; Currently maintained by (gcc@dg-rtp.dg.com) ;; Currently maintained by (gcc@dg-rtp.dg.com)
...@@ -23,14 +23,6 @@ ...@@ -23,14 +23,6 @@
;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al.
;; RCS rev field. This is a NOP, just to get the RCS id into the
;; program image.
(define_expand "m88k_rcs_id"
[(match_operand:SI 0 "" "")]
""
"{ static char rcs_id[] = \"$What: <@(#) m88k.md,v 1.1.1.2.2.2> $\";
FAIL; }")
;; Attribute describing the processor. This attribute must match exactly ;; Attribute describing the processor. This attribute must match exactly
;; with the processor_type enumeration in m88k.h. ;; with the processor_type enumeration in m88k.h.
...@@ -3058,7 +3050,7 @@ ...@@ -3058,7 +3050,7 @@
" "
{ {
operands[1] = legitimize_operand (operands[1], DFmode); operands[1] = legitimize_operand (operands[1], DFmode);
if (real_power_of_2_operand (operands[2])) if (real_power_of_2_operand (operands[2], DFmode))
{ {
union real_extract u; union real_extract u;
bcopy (&CONST_DOUBLE_LOW (operands[2]), &u, sizeof u); bcopy (&CONST_DOUBLE_LOW (operands[2]), &u, sizeof u);
......
/* Tektronix XD88 UTekV 3.2e (svr3 derived from UniSoft System V/88) /* Tektronix XD88 UTekV 3.2e (svr3 derived from UniSoft System V/88)
Copyright (C) 1993 Free Software Foundation, Inc. Copyright (C) 1993, 2000 Free Software Foundation, Inc.
Contributed by Kaveh R. Ghazi (ghazi@caip.rutgers.edu) 2/22/93. Contributed by Kaveh R. Ghazi (ghazi@caip.rutgers.edu) 2/22/93.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -36,8 +36,12 @@ ...@@ -36,8 +36,12 @@
/* I don't know if this SDB thing is needed or not --KRG */ /* I don't know if this SDB thing is needed or not --KRG */
/* Use T_ARG as T_VOID. T_VOID is not defined in <syms.h> as it should be. */ /* Use T_ARG as T_VOID. T_VOID is not defined in <syms.h> as it
should be. If we're cross compiling, then don't do this because
"gsyms.h" has T_VOID. */
#ifndef CROSS_COMPILE
#define T_VOID T_ARG #define T_VOID T_ARG
#endif
/* The bundled ld program needs link editor directives which normally /* The bundled ld program needs link editor directives which normally
......
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