aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh Ghazi <ghazi@caip.rutgers.edu>2000-01-14 22:57:31 +0000
committerKaveh Ghazi <ghazi@caip.rutgers.edu>2000-01-14 22:57:31 +0000
commit19d6d8653acfcc1b864eae94da58ea08ab612c5d (patch)
treed21e98a1f3dae1d6df9a637e4dc488b46bd38a31
parent03debbeb67dc42c1da46c6caf741949670578cc9 (diff)
* h8300-protos.h: New file.
* h8300.c: Include tm_p.h. Add static prototypes. Fix compile time warnings. * h8300.h: Move prototypes to h8300-protos.h. Fix compile time warnings. * h8300.md: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@31426 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/h8300/h8300-protos.h75
-rw-r--r--gcc/config/h8300/h8300.c135
-rw-r--r--gcc/config/h8300/h8300.h35
-rw-r--r--gcc/config/h8300/h8300.md7
5 files changed, 178 insertions, 86 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f620b904b19..3c931061957 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,17 @@
2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ * h8300-protos.h: New file.
+
+ * h8300.c: Include tm_p.h. Add static prototypes. Fix compile
+ time warnings.
+
+ * h8300.h: Move prototypes to h8300-protos.h. Fix compile time
+ warnings.
+
+ * h8300.md: Likewise.
+
+2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
* varasm.c (asm_output_bss): Mark parameters with ATTRIBUTE_UNUSED.
(asm_emit_uninitialised): Likewise.
diff --git a/gcc/config/h8300/h8300-protos.h b/gcc/config/h8300/h8300-protos.h
new file mode 100644
index 00000000000..0f4bf78e5d8
--- /dev/null
+++ b/gcc/config/h8300/h8300-protos.h
@@ -0,0 +1,75 @@
+/* Definitions of target machine for GNU compiler.
+ Hitachi H8/300 version generating coff
+ Copyright (C) 2000 Free SoftwareFoundation, Inc.
+ Contributed by Steve Chamberlain (sac@cygnus.com),
+ Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@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. */
+
+/* Declarations for functions used in insn-output.c. */
+#ifdef RTX_CODE
+extern const char *emit_a_shift PARAMS ((rtx, rtx *));
+extern const char *output_adds_subs PARAMS ((rtx *));
+extern const char * output_simode_bld PARAMS ((int, int, rtx[]));
+extern void print_operand_address PARAMS ((FILE *, rtx));
+extern const char *byte_reg PARAMS ((rtx, int));
+extern int const_costs PARAMS ((rtx, enum rtx_code));
+extern void print_operand PARAMS ((FILE *, rtx, int));
+extern void final_prescan_insn PARAMS ((rtx, rtx *, int));
+extern int do_movsi PARAMS ((rtx[]));
+extern void notice_update_cc PARAMS ((rtx, rtx));
+extern int expand_a_shift PARAMS ((enum machine_mode, int, rtx[]));
+extern int fix_bit_operand PARAMS ((rtx *, int, enum rtx_code));
+extern int h8300_adjust_insn_length PARAMS ((rtx, int));
+
+extern int general_operand_src PARAMS ((rtx, enum machine_mode));
+extern int general_operand_dst PARAMS ((rtx, enum machine_mode));
+extern int o_operand PARAMS ((rtx, enum machine_mode));
+extern int p_operand PARAMS ((rtx, enum machine_mode));
+extern int call_insn_operand PARAMS ((rtx, enum machine_mode));
+extern int adds_subs_operand PARAMS ((rtx, enum machine_mode));
+extern int one_insn_adds_subs_operand PARAMS ((rtx, enum machine_mode));
+extern int small_call_insn_operand PARAMS ((rtx, enum machine_mode));
+extern int jump_address_operand PARAMS ((rtx, enum machine_mode));
+extern int bit_operand PARAMS ((rtx, enum machine_mode));
+extern int bit_memory_operand PARAMS ((rtx, enum machine_mode));
+extern int eq_operator PARAMS ((rtx, enum machine_mode));
+extern int bit_operator PARAMS ((rtx, enum machine_mode));
+extern int nshift_operator 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 h8300_valid_machine_decl_attribute PARAMS ((tree, tree, tree,
+ tree));
+extern int h8300_funcvec_function_p PARAMS ((tree));
+extern int h8300_eightbit_data_p PARAMS ((tree));
+extern int h8300_tiny_data_p PARAMS ((tree));
+extern void h8300_encode_label PARAMS ((tree));
+#endif /* TREE_CODE */
+
+extern int handle_pragma PARAMS ((int (*)(void), void (*)(int), const char *));
+extern void h8300_init_once PARAMS ((void));
+extern void function_prologue PARAMS ((FILE *, int));
+extern void function_epilogue PARAMS ((FILE *, int));
+extern void asm_file_start PARAMS ((FILE *));
+extern void asm_file_end PARAMS ((FILE *));
+extern int ok_for_bclr PARAMS ((int));
+extern int small_power_of_two PARAMS ((int));
+extern int initial_offset PARAMS ((int, int));
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index ede0839b297..132a6949211 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for Hitachi H8/300.
- Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 1999 Free Software
+ Copyright (C) 1992, 93-99, 2000 Free Software
Foundation, Inc.
Contributed by Steve Chamberlain (sac@cygnus.com),
Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
@@ -38,13 +38,15 @@ Boston, MA 02111-1307, USA. */
#include "expr.h"
#include "function.h"
#include "obstack.h"
+#include "toplev.h"
+#include "tm_p.h"
/* Forward declarations. */
-void print_operand_address ();
-
static int h8300_interrupt_function_p PROTO ((tree));
static int h8300_monitor_function_p PROTO ((tree));
static int h8300_os_task_function_p PROTO ((tree));
+static void dosize PROTO ((FILE *, const char *, unsigned int));
+static const char *cond_string PROTO ((enum rtx_code));
/* CPU_TYPE, says what cpu we're compiling for. */
int cpu_type;
@@ -64,29 +66,26 @@ int monitor;
/* True if a #pragma saveall has been seen for the current function. */
int pragma_saveall;
-static char *names_big[] =
+static const char *const names_big[] =
{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7"};
-static char *names_extended[] =
+static const char *const names_extended[] =
{"er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7"};
-static char *names_upper_extended[] =
+static const char *const names_upper_extended[] =
{"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7"};
/* Points to one of the above. */
/* ??? The above could be put in an array indexed by CPU_TYPE. */
-char **h8_reg_names;
+const char * const *h8_reg_names;
/* Various operations needed by the following, indexed by CPU_TYPE. */
-static char *h8_push_ops[2] =
-{"push", "push.l"};
-static char *h8_pop_ops[2] =
-{"pop", "pop.l"};
-static char *h8_mov_ops[2] =
-{"mov.w", "mov.l"};
+static const char *const h8_push_ops[2] = {"push", "push.l"};
+static const char *const h8_pop_ops[2] = {"pop", "pop.l"};
+static const char *const h8_mov_ops[2] = {"mov.w", "mov.l"};
-char *h8_push_op, *h8_pop_op, *h8_mov_op;
+const char *h8_push_op, *h8_pop_op, *h8_mov_op;
/* Initialize various cpu specific globals at start up. */
@@ -109,12 +108,12 @@ h8300_init_once ()
h8_mov_op = h8_mov_ops[cpu_type];
}
-char *
+const char *
byte_reg (x, b)
rtx x;
int b;
{
- static char *names_small[] =
+ static const char *const names_small[] =
{"r0l", "r0h", "r1l", "r1h", "r2l", "r2h", "r3l", "r3h",
"r4l", "r4h", "r5l", "r5h", "r6l", "r6h", "r7l", "r7h"};
@@ -146,7 +145,7 @@ byte_reg (x, b)
static void
dosize (file, op, size)
FILE *file;
- char *op;
+ const char *op;
unsigned int size;
{
/* On the h8300h and h8300s, for sizes <= 8 bytes it is as good or
@@ -238,7 +237,6 @@ function_prologue (file, size)
FILE *file;
int size;
{
- register int mask = 0;
int fsize = (size + STACK_BOUNDARY / 8 - 1) & -STACK_BOUNDARY / 8;
int idx;
@@ -382,8 +380,6 @@ function_epilogue (file, size)
FILE *file;
int size;
{
- register int regno;
- register int mask = 0;
int fsize = (size + STACK_BOUNDARY / 8 - 1) & -STACK_BOUNDARY / 8;
int idx;
rtx insn = get_last_insn ();
@@ -514,6 +510,7 @@ out:
/* Output assembly code for the start of the file. */
+void
asm_file_start (file)
FILE *file;
{
@@ -612,7 +609,7 @@ general_operand_dst (op, mode)
int
o_operand (operand, mode)
rtx operand;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (operand) == CONST_INT
&& CONST_OK_FOR_O (INTVAL (operand)));
@@ -623,7 +620,7 @@ o_operand (operand, mode)
int
p_operand (operand, mode)
rtx operand;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (operand) == CONST_INT
&& CONST_OK_FOR_P (INTVAL (operand)));
@@ -634,7 +631,7 @@ p_operand (operand, mode)
int
call_insn_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) == MEM)
{
@@ -650,7 +647,7 @@ call_insn_operand (op, mode)
int
adds_subs_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) == CONST_INT)
{
@@ -676,7 +673,7 @@ adds_subs_operand (op, mode)
int
one_insn_adds_subs_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
int val = INTVAL (op);
@@ -688,7 +685,7 @@ one_insn_adds_subs_operand (op, mode)
return 0;
}
-char *
+const char *
output_adds_subs (operands)
rtx *operands;
{
@@ -760,7 +757,7 @@ output_adds_subs (operands)
int
small_call_insn_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) == MEM)
{
@@ -840,7 +837,7 @@ bit_operand (op, mode)
int
bit_memory_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == MEM
&& EXTRA_CONSTRAINT (op, 'U'));
@@ -851,7 +848,7 @@ bit_memory_operand (op, mode)
int
eq_operator (x, mode)
rtx x;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (x) == EQ || GET_CODE (x) == NE);
}
@@ -868,9 +865,9 @@ eq_operator (x, mode)
int
handle_pragma (p_getc, p_ungetc, pname)
- int (* p_getc) PROTO ((void));
- void (* p_ungetc) PROTO ((int));
- char * pname;
+ int (* ATTRIBUTE_UNUSED p_getc) PROTO ((void));
+ void (* ATTRIBUTE_UNUSED p_ungetc) PROTO ((int));
+ const char *pname;
{
int retval = 0;
@@ -886,7 +883,7 @@ handle_pragma (p_getc, p_ungetc, pname)
the rtx to represent where it is passed. CUM represents the state after
the last argument. NAMED is not used. */
-static char *hand_list[] =
+static const char *const hand_list[] =
{
"__main",
"__cmpsi2",
@@ -917,7 +914,7 @@ function_arg (cum, mode, type, named)
int named;
{
rtx result = 0;
- char *fname;
+ const char *fname;
int regpass = 0;
/* Never pass unnamed arguments in registers. */
@@ -932,7 +929,7 @@ function_arg (cum, mode, type, named)
if (cum->libcall)
{
- char **p;
+ const char * const *p;
fname = XSTR (cum->libcall, 0);
@@ -1064,7 +1061,7 @@ const_costs (r, c)
/* Return assembly language string which identifies a comparison type. */
-static char *
+static const char *
cond_string (code)
enum rtx_code code;
{
@@ -1105,7 +1102,7 @@ print_operand (file, x, code)
int code;
{
/* This is used for communication between the 'P' and 'U' codes. */
- static char *last_p;
+ static const char *last_p;
/* This is used for communication between codes V,W,Z and Y. */
static int bitint;
@@ -1243,6 +1240,8 @@ print_operand (file, x, code)
case AND:
fprintf (file, "band");
break;
+ default:
+ break;
}
break;
case 'c':
@@ -1257,6 +1256,8 @@ print_operand (file, x, code)
case AND:
fprintf (file, "biand");
break;
+ default:
+ break;
}
break;
case 'd':
@@ -1294,7 +1295,7 @@ print_operand (file, x, code)
REAL_VALUE_TYPE rv;
REAL_VALUE_FROM_CONST_DOUBLE (rv, x);
REAL_VALUE_TO_TARGET_SINGLE (rv, val);
- fprintf (file, "#%d", ((val >> 16) & 0xffff));
+ fprintf (file, "#%ld", ((val >> 16) & 0xffff));
break;
}
default:
@@ -1324,7 +1325,7 @@ print_operand (file, x, code)
REAL_VALUE_TYPE rv;
REAL_VALUE_FROM_CONST_DOUBLE (rv, x);
REAL_VALUE_TO_TARGET_SINGLE (rv, val);
- fprintf (file, "#%d", (val & 0xffff));
+ fprintf (file, "#%ld", (val & 0xffff));
break;
}
default:
@@ -1449,9 +1450,11 @@ print_operand (file, x, code)
REAL_VALUE_TYPE rv;
REAL_VALUE_FROM_CONST_DOUBLE (rv, x);
REAL_VALUE_TO_TARGET_SINGLE (rv, val);
- fprintf (file, "#%d", val);
+ fprintf (file, "#%ld", val);
break;
}
+ default:
+ break;
}
}
}
@@ -1527,8 +1530,8 @@ print_operand_address (file, addr)
void
final_prescan_insn (insn, operand, num_operands)
- rtx insn, *operand;
- int num_operands;
+ rtx insn, *operand ATTRIBUTE_UNUSED;
+ int num_operands ATTRIBUTE_UNUSED;
{
/* This holds the last insn address. */
static int last_insn_address = 0;
@@ -1576,6 +1579,7 @@ do_movsi (operands)
int
initial_offset (from, to)
+ int from, to;
{
int offset = 0;
@@ -1603,7 +1607,7 @@ initial_offset (from, to)
/* Update the condition code from the insn. */
-int
+void
notice_update_cc (body, insn)
rtx body;
rtx insn;
@@ -1657,7 +1661,7 @@ notice_update_cc (body, insn)
int
bit_operator (x, mode)
rtx x;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
enum rtx_code code = GET_CODE (x);
@@ -1838,7 +1842,7 @@ bit_operator (x, mode)
int
nshift_operator (x, mode)
rtx x;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (x))
{
@@ -1918,7 +1922,7 @@ enum shift_mode
struct shift_insn
{
- char *assembler;
+ const char *assembler;
int cc_valid;
};
@@ -2068,6 +2072,11 @@ static const char *const rotate_two[3][3] =
}
};
+static enum shift_alg get_shift_alg PARAMS ((enum attr_cpu, enum shift_type,
+ enum machine_mode, int,
+ const char **, const char **,
+ int *));
+
/* Given CPU, MODE, SHIFT_TYPE, and shift count COUNT, determine the best
algorithm for doing the shift. The assembler code is stored in ASSEMBLER.
We don't achieve maximum efficiency in all cases, but the hooks are here
@@ -2332,7 +2341,7 @@ get_shift_alg (cpu, shift_type, mode, count, assembler_p,
return SHIFT_SPECIAL;
}
}
- else if (!TARGET_H8300 && (count == 13 || count == 14)
+ else if ((!TARGET_H8300 && (count == 13 || count == 14))
|| count == 15)
{
if (count == 15 && shift_type == SHIFT_ASHIFTRT)
@@ -2586,16 +2595,15 @@ get_shift_alg (cpu, shift_type, mode, count, assembler_p,
/* Emit the assembler code for doing shifts. */
-char *
+const char *
emit_a_shift (insn, operands)
- rtx insn;
+ rtx insn ATTRIBUTE_UNUSED;
rtx *operands;
{
static int loopend_lab;
- char *assembler;
- char *assembler2;
+ const char *assembler;
+ const char *assembler2;
int cc_valid;
- rtx inside = PATTERN (insn);
rtx shift = operands[3];
enum machine_mode mode = GET_MODE (shift);
enum rtx_code code = GET_CODE (shift);
@@ -2690,8 +2698,8 @@ emit_a_shift (insn, operands)
{
int m = GET_MODE_BITSIZE (mode) - n;
int mask = (shift_type == SHIFT_ASHIFT
- ? ((1 << GET_MODE_BITSIZE (mode) - n) - 1) << n
- : (1 << GET_MODE_BITSIZE (mode) - n) - 1);
+ ? ((1 << (GET_MODE_BITSIZE (mode) - n)) - 1) << n
+ : (1 << (GET_MODE_BITSIZE (mode) - n)) - 1);
char insn_buf[200];
/* Not all possibilities of rotate are supported. They shouldn't
be generated, but let's watch for 'em. */
@@ -2718,17 +2726,18 @@ emit_a_shift (insn, operands)
switch (mode)
{
case QImode:
- sprintf (insn_buf, "and #%d,%%X0",
- mask, n);
+ sprintf (insn_buf, "and #%d,%%X0", mask);
cc_status.value1 = operands[0];
cc_status.flags |= CC_NO_CARRY;
break;
case HImode:
sprintf (insn_buf, "and #%d,%%s0\n\tand #%d,%%t0",
- mask & 255, mask >> 8, n);
+ mask & 255, mask >> 8);
break;
case SImode:
abort ();
+ default:
+ break;
}
}
else
@@ -2788,7 +2797,7 @@ emit_a_shift (insn, operands)
int
fix_bit_operand (operands, what, type)
rtx *operands;
- char what;
+ int what;
enum rtx_code type;
{
/* The bit_operand predicate accepts any memory during RTL generation, but
@@ -2952,7 +2961,7 @@ h8300_tiny_data_p (decl)
int
h8300_valid_machine_decl_attribute (decl, attributes, attr, args)
tree decl;
- tree attributes;
+ tree attributes ATTRIBUTE_UNUSED;
tree attr;
tree args;
{
@@ -2994,10 +3003,11 @@ h8300_valid_machine_decl_attribute (decl, attributes, attr, args)
extern struct obstack *saveable_obstack;
+void
h8300_encode_label (decl)
tree decl;
{
- char *str = XSTR (XEXP (DECL_RTL (decl), 0), 0);
+ const char *str = XSTR (XEXP (DECL_RTL (decl), 0), 0);
int len = strlen (str);
char *newstr;
@@ -3008,7 +3018,7 @@ h8300_encode_label (decl)
XSTR (XEXP (DECL_RTL (decl), 0), 0) = newstr;
}
-char *
+const char *
output_simode_bld (bild, log2, operands)
int bild;
int log2;
@@ -3040,9 +3050,10 @@ output_simode_bld (bild, log2, operands)
We use this to get the lengths of various memory references correct. */
+int
h8300_adjust_insn_length (insn, length)
rtx insn;
- int length;
+ int length ATTRIBUTE_UNUSED;
{
rtx pat;
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index 1c980b752cf..35927972445 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler.
Hitachi H8/300 version generating coff
- Copyright (C) 1992, 93-98, 1999 Free SoftwareFoundation, Inc.
+ Copyright (C) 1992, 93-99, 2000 Free SoftwareFoundation, Inc.
Contributed by Steve Chamberlain (sac@cygnus.com),
Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
@@ -30,8 +30,8 @@ extern int cpu_type;
/* Various globals defined in h8300.c. */
-extern char *h8_push_op,*h8_pop_op,*h8_mov_op;
-extern char **h8_reg_names;
+extern const char *h8_push_op,*h8_pop_op,*h8_mov_op;
+extern const char * const *h8_reg_names;
/* Names to predefine in the preprocessor for this target machine. */
@@ -367,10 +367,10 @@ enum reg_class {
of length N_REG_CLASSES. */
#define REG_CLASS_CONTENTS \
-{ 0, /* No regs */ \
- 0x2ff, /* GENERAL_REGS */ \
- 0x100, /* MAC_REGS */ \
- 0x3ff, /* ALL_REGS */ \
+{ {0}, /* No regs */ \
+ {0x2ff}, /* GENERAL_REGS */ \
+ {0x100}, /* MAC_REGS */ \
+ {0x3ff}, /* ALL_REGS */ \
}
/* The same information, inverted:
@@ -631,7 +631,6 @@ struct cum_arg { int nbytes; struct rtx_def * libcall; };
case the first 3 arguments are passed in registers.
See function `function_arg'. */
-struct rtx_def *function_arg();
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
function_arg (&CUM, MODE, TYPE, NAMED)
@@ -826,11 +825,11 @@ struct rtx_def *function_arg();
&& REG_OK_FOR_BASE_P (XEXP (OP, 0))) \
|| (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == SYMBOL_REF \
&& (TARGET_H8300S || SYMBOL_REF_FLAG (XEXP (OP, 0)))) \
- || (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == CONST \
- && GET_CODE (XEXP (XEXP (OP, 0), 0)) == PLUS \
- && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 0)) == SYMBOL_REF \
- && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 1)) == CONST_INT) \
- && (TARGET_H8300S || SYMBOL_REF_FLAG (XEXP (XEXP (OP, 0), 0))))
+ || ((GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == CONST \
+ && GET_CODE (XEXP (XEXP (OP, 0), 0)) == PLUS \
+ && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 0)) == SYMBOL_REF \
+ && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 1)) == CONST_INT) \
+ && (TARGET_H8300S || SYMBOL_REF_FLAG (XEXP (XEXP (OP, 0), 0)))))
#define EXTRA_CONSTRAINT(OP, C) \
((C) == 'U' ? OK_FOR_U (OP) : 0)
@@ -958,7 +957,6 @@ struct rtx_def *function_arg();
/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
is a valid machine specific attribute for DECL.
The attributes in ATTRIBUTES have previously been assigned to DECL. */
-extern int h8300_valid_machine_decl_attribute ();
#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
@@ -1019,7 +1017,7 @@ h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
/* Control the assembler format that we output. */
-#define ASM_IDENTIFY_GCC /* nothing */
+#define ASM_IDENTIFY_GCC(FILE) /* nothing */
/* Output at beginning/end of assembler file. */
@@ -1384,7 +1382,6 @@ do { char dstr[30]; \
it should be pointing at the last character after the end of the pragma
(newline or end-of-file). */
#define HANDLE_PRAGMA(GETC, UNGETC, NAME) handle_pragma (GETC, UNGETC, NAME)
-extern int handle_pragma ();
#define FINAL_PRESCAN_INSN(insn, operand, nop) final_prescan_insn (insn, operand,nop)
@@ -1418,9 +1415,3 @@ extern int handle_pragma ();
#define MOVE_RATIO 3
-/* Declarations for functions used in insn-output.c. */
-char *emit_a_shift ();
-int h8300_funcvec_function_p ();
-char *output_adds_subs ();
-char * output_simode_bld ();
-
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index da6519300e9..a3015c659d6 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -1,5 +1,5 @@
;; GCC machine description for Hitachi H8/300
-;; Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 93-99, 2000 Free Software Foundation, Inc.
;; Contributed by Steve Chamberlain (sac@cygnus.com),
;; Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
@@ -335,6 +335,8 @@
return \"mov.w %f1,%T0\;mov.w %e1,%T0\";
case 5:
return \"mov.w %T1,%e0\;mov.w %T1,%f0\";
+ default:
+ abort();
}
}"
[(set_attr "length" "4,4,8,8,4,4")
@@ -393,7 +395,8 @@
return \"mov.w %f1,%T0\;mov.w %e1,%T0\";
case 5:
return \"mov.w %T1,%e0\;mov.w %T1,%f0\";
-
+ default:
+ abort();
}
}"
[(set_attr "length" "4,4,8,8,4,4")