aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-06-26 06:41:04 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-06-26 06:41:04 +0000
commit3c303f52ac1d1a462c9dd285493c1c46850014b9 (patch)
treea7e52fe487440e5a34370c1c82f91d2bc0c81f2b /gcc
parentf1943b772f833a3e511c35a78cc90607e752a202 (diff)
downloadgcc-3c303f52ac1d1a462c9dd285493c1c46850014b9.zip
gcc-3c303f52ac1d1a462c9dd285493c1c46850014b9.tar.gz
gcc-3c303f52ac1d1a462c9dd285493c1c46850014b9.tar.bz2
Warning fixes:
* alpha.c: Include system.h and toplev.h. (cint8_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED. (const48_operand): Likewise. (mode_width_operand): Likewise. (mode_mask_operand): Likewise. (mul8_operand): Likewise. (current_file_function_operand): Likewise. (signed_comparison_operator): Likewise. (divmod_operator): Likewise. (any_memory_operand): Likewise. (alpha_return_addr): Likewise for parameter `frame'. (alpha_builtin_saveregs): Likewise for parameter `arglist'. (vms_valid_decl_attribute_p): Likewise for parameters `decl' and `attributes'. (alpha_start_function): Likewise for parameter `decl'. Use HOST_WIDE_INT_PRINT_DEC in call to fprintf. Fix various format specifiers. Remove unused variables `lab' and `name'. (alpha_end_function): Mark parameter `decl' with ATTRIBUTE_UNUSED. (check_float_value): Likewise for parameter `overflow'. (alpha_need_linkage): Likewise for parameters `name' and `is_local'. * alpha.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Define as taking an argument. (ASM_OUTPUT_SHORT): Cast argument to `int' in call to fprintf. (ASM_OUTPUT_CHAR): Likewise. (ASM_OUTPUT_BYTE): Likewise. (PRINT_OPERAND_ADDRESS): Use HOST_WIDE_INT_PRINT_DEC in call to fprintf. (PUT_SDB_EPILOGUE_END): Mention argument `NAME' in definition. Add prototypes for functions in alpha.c. * alpha.md (ashldi3): Add default case in switch. From-SVN: r20737
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog35
-rw-r--r--gcc/config/alpha/alpha.c55
-rw-r--r--gcc/config/alpha/alpha.h60
-rw-r--r--gcc/config/alpha/alpha.md2
4 files changed, 116 insertions, 36 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a17e289..85704c2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,38 @@
+Fri Jun 26 09:31:24 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * alpha.c: Include system.h and toplev.h.
+ (cint8_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED.
+ (const48_operand): Likewise.
+ (mode_width_operand): Likewise.
+ (mode_mask_operand): Likewise.
+ (mul8_operand): Likewise.
+ (current_file_function_operand): Likewise.
+ (signed_comparison_operator): Likewise.
+ (divmod_operator): Likewise.
+ (any_memory_operand): Likewise.
+ (alpha_return_addr): Likewise for parameter `frame'.
+ (alpha_builtin_saveregs): Likewise for parameter `arglist'.
+ (vms_valid_decl_attribute_p): Likewise for parameters `decl' and
+ `attributes'.
+ (alpha_start_function): Likewise for parameter `decl'. Use
+ HOST_WIDE_INT_PRINT_DEC in call to fprintf. Fix various format
+ specifiers. Remove unused variables `lab' and `name'.
+ (alpha_end_function): Mark parameter `decl' with ATTRIBUTE_UNUSED.
+ (check_float_value): Likewise for parameter `overflow'.
+ (alpha_need_linkage): Likewise for parameters `name' and `is_local'.
+
+ * alpha.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Define as
+ taking an argument.
+ (ASM_OUTPUT_SHORT): Cast argument to `int' in call to fprintf.
+ (ASM_OUTPUT_CHAR): Likewise.
+ (ASM_OUTPUT_BYTE): Likewise.
+ (PRINT_OPERAND_ADDRESS): Use HOST_WIDE_INT_PRINT_DEC in call to
+ fprintf.
+ (PUT_SDB_EPILOGUE_END): Mention argument `NAME' in definition.
+ Add prototypes for functions in alpha.c.
+
+ * alpha.md (ashldi3): Add default case in switch.
+
1998-06-26 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (gcc_version, gcc_version_trigger): New macros.
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index f04e065..0a0c4f1 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -21,8 +21,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
-#include <stdio.h>
-#include <ctype.h>
+#include "system.h"
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
@@ -40,6 +39,7 @@ Boston, MA 02111-1307, USA. */
#include "tree.h"
#include "except.h"
#include "function.h"
+#include "toplev.h"
/* External data. */
extern char *version_string;
@@ -358,7 +358,7 @@ reg_or_8bit_operand (op, mode)
int
cint8_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == CONST_INT
&& (unsigned HOST_WIDE_INT) INTVAL (op) < 0x100);
@@ -399,7 +399,7 @@ sext_add_operand (op, mode)
int
const48_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == CONST_INT
&& (INTVAL (op) == 4 || INTVAL (op) == 8));
@@ -444,7 +444,7 @@ or_operand (op, mode)
int
mode_width_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == CONST_INT
&& (INTVAL (op) == 8 || INTVAL (op) == 16
@@ -457,7 +457,7 @@ mode_width_operand (op, mode)
int
mode_mask_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
#if HOST_BITS_PER_WIDE_INT == 32
if (GET_CODE (op) == CONST_DOUBLE)
@@ -484,7 +484,7 @@ mode_mask_operand (op, mode)
int
mul8_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == CONST_INT
&& (unsigned HOST_WIDE_INT) INTVAL (op) < 64
@@ -613,7 +613,7 @@ input_operand (op, mode)
int
current_file_function_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == SYMBOL_REF
&& ! profile_flag && ! profile_block_flag
@@ -675,7 +675,7 @@ alpha_swapped_comparison_operator (op, mode)
int
signed_comparison_operator (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
@@ -694,7 +694,7 @@ signed_comparison_operator (op, mode)
int
divmod_operator (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
@@ -797,7 +797,7 @@ reg_or_unaligned_mem_operand (op, mode)
int
any_memory_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == MEM
|| (GET_CODE (op) == SUBREG && GET_CODE (SUBREG_REG (op)) == REG)
@@ -2428,7 +2428,7 @@ alpha_init_expanders ()
rtx
alpha_return_addr (count, frame)
int count;
- rtx frame;
+ rtx frame ATTRIBUTE_UNUSED;
{
rtx init;
@@ -2815,7 +2815,7 @@ print_operand (file, x, code)
struct rtx_def *
alpha_builtin_saveregs (arglist)
- tree arglist;
+ tree arglist ATTRIBUTE_UNUSED;
{
rtx block, addr, dest, argsize;
tree fntype = TREE_TYPE (current_function_decl);
@@ -3053,8 +3053,8 @@ alpha_using_fp ()
int
vms_valid_decl_attribute_p (decl, attributes, identifier, args)
- tree decl;
- tree attributes;
+ tree decl ATTRIBUTE_UNUSED;
+ tree attributes ATTRIBUTE_UNUSED;
tree identifier;
tree args;
{
@@ -3346,7 +3346,7 @@ void
alpha_start_function (file, fnname, decl)
FILE *file;
char *fnname;
- tree decl;
+ tree decl ATTRIBUTE_UNUSED;
{
unsigned long imask = 0;
unsigned long fmask = 0;
@@ -3435,7 +3435,9 @@ alpha_start_function (file, fnname, decl)
fprintf (file, "\t.frame $%d,", vms_unwind_regno);
fprintf (file, HOST_WIDE_INT_PRINT_DEC,
frame_size >= (1l << 31) ? 0 : frame_size);
- fprintf (file, ",$26,%d\n", reg_offset);
+ fputs (",$26,", file);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, reg_offset);
+ fputs ("\n", file);
}
else if (!flag_inhibit_size_directive)
{
@@ -3453,9 +3455,9 @@ alpha_start_function (file, fnname, decl)
if (imask)
/* ??? Does VMS care if mask contains ra? The old code did'nt
set it, so I don't here. */
- fprintf (file, "\t.mask 0x%x,0\n", imask & ~(1L << REG_RA));
+ fprintf (file, "\t.mask 0x%lx,0\n", imask & ~(1L << REG_RA));
if (fmask)
- fprintf (file, "\t.fmask 0x%x,0\n", fmask);
+ fprintf (file, "\t.fmask 0x%lx,0\n", fmask);
if (!vms_is_stack_procedure)
fprintf (file, "\t.fp_save $%d\n", vms_save_fp_regno);
}
@@ -3463,7 +3465,7 @@ alpha_start_function (file, fnname, decl)
{
if (imask)
{
- fprintf (file, "\t.mask 0x%x,", imask);
+ fprintf (file, "\t.mask 0x%lx,", imask);
fprintf (file, HOST_WIDE_INT_PRINT_DEC,
frame_size >= (1l << 31) ? 0 : reg_offset - frame_size);
putc ('\n', file);
@@ -3475,7 +3477,7 @@ alpha_start_function (file, fnname, decl)
if (fmask)
{
- fprintf (file, "\t.fmask 0x%x,", fmask);
+ fprintf (file, "\t.fmask 0x%lx,", fmask);
fprintf (file, HOST_WIDE_INT_PRINT_DEC,
frame_size >= (1l << 31) ? 0 : reg_offset - frame_size);
putc ('\n', file);
@@ -3487,9 +3489,6 @@ alpha_start_function (file, fnname, decl)
plain text. */
if (!TARGET_OPEN_VMS && !TARGET_WINDOWS_NT)
{
- rtx lab;
- char *name;
-
alpha_function_needs_gp = alpha_does_function_need_gp ();
if (alpha_function_needs_gp)
fputs ("\tldgp $29,0($27)\n", file);
@@ -3725,7 +3724,7 @@ void
alpha_end_function (file, fnname, decl)
FILE *file;
char *fnname;
- tree decl;
+ tree decl ATTRIBUTE_UNUSED;
{
/* End the function. */
if (!flag_inhibit_size_directive)
@@ -4181,7 +4180,7 @@ int
check_float_value (mode, d, overflow)
enum machine_mode mode;
REAL_VALUE_TYPE *d;
- int overflow;
+ int overflow ATTRIBUTE_UNUSED;
{
if (TARGET_IEEE || TARGET_IEEE_CONFORMANT || TARGET_IEEE_WITH_INEXACT)
@@ -4371,8 +4370,8 @@ alpha_write_linkage (stream)
void
alpha_need_linkage (name, is_local)
- char *name;
- int is_local;
+ char *name ATTRIBUTE_UNUSED;
+ int is_local ATTRIBUTE_UNUSED;
{
}
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index da12963..00e5c91 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -1112,6 +1112,7 @@ extern void alpha_end_function ();
/* This macro notes the end of the prologue. */
#define FUNCTION_END_PROLOGUE(FILE) output_end_prologue (FILE)
+extern void output_end_prologue ();
/* Output any profiling code before the prologue. */
@@ -1803,8 +1804,8 @@ do { \
sized text section with no associated exception handling info. The
DEC linker sees this text section, and gives a warning saying that
the exception handling info is missing. */
-#define ASM_IDENTIFY_GCC
-#define ASM_IDENTIFY_LANGUAGE
+#define ASM_IDENTIFY_GCC(x)
+#define ASM_IDENTIFY_LANGUAGE(x)
/* Output to assembler file text saying following lines
may contain character constants, extra white space, comments, etc. */
@@ -1971,12 +1972,12 @@ literal_section () \
#define ASM_OUTPUT_SHORT(FILE,VALUE) \
fprintf (FILE, "\t.word %d\n", \
- (GET_CODE (VALUE) == CONST_INT \
+ (int)(GET_CODE (VALUE) == CONST_INT \
? INTVAL (VALUE) & 0xffff : (abort (), 0)))
#define ASM_OUTPUT_CHAR(FILE,VALUE) \
fprintf (FILE, "\t.byte %d\n", \
- (GET_CODE (VALUE) == CONST_INT \
+ (int)(GET_CODE (VALUE) == CONST_INT \
? INTVAL (VALUE) & 0xff : (abort (), 0)))
/* We use the default ASCII-output routine, except that we don't write more
@@ -2043,7 +2044,7 @@ literal_section () \
/* This is how to output an assembler line for a numeric constant byte. */
#define ASM_OUTPUT_BYTE(FILE,VALUE) \
- fprintf (FILE, "\t.byte 0x%x\n", (VALUE) & 0xff)
+ fprintf (FILE, "\t.byte 0x%x\n", (int) ((VALUE) & 0xff))
/* This is how to output an element of a case-vector that is absolute.
(Alpha does not use such vectors, but we must define this macro anyway.) */
@@ -2199,7 +2200,8 @@ do { \
else \
abort (); \
\
- fprintf (FILE, "%d($%d)", offset, basereg); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, offset); \
+ fprintf (FILE, "($%d)", basereg); \
}
/* Define the codes that are matched by predicates in alpha.c. */
@@ -2359,7 +2361,7 @@ do { \
#define PUT_SDB_FUNCTION_END(LINE)
-#define PUT_SDB_EPILOGUE_END(NAME)
+#define PUT_SDB_EPILOGUE_END(NAME) ((void)(NAME))
/* Macros for mips-tfile.c to encapsulate stabs in ECOFF, and for
mips-tdump.c to print them out.
@@ -2389,5 +2391,47 @@ do { \
/* The system headers under Alpha systems are generally C++-aware. */
#define NO_IMPLICIT_EXTERN_C
-/* Prototypes for alpha.c functions used in the md file. */
+/* Prototypes for alpha.c functions used in the md file & elsewhere. */
extern struct rtx_def *get_unaligned_address ();
+extern void alpha_write_verstamp ();
+extern void alpha_reorg ();
+extern int check_float_value ();
+extern int direct_return ();
+extern int const48_operand ();
+extern int add_operand ();
+extern int and_operand ();
+extern int unaligned_memory_operand ();
+extern int zap_mask ();
+extern int current_file_function_operand ();
+extern int alpha_sa_size ();
+extern int alpha_adjust_cost ();
+extern void print_operand ();
+extern int reg_or_0_operand ();
+extern int reg_or_8bit_operand ();
+extern int mul8_operand ();
+extern int reg_or_6bit_operand ();
+extern int alpha_comparison_operator ();
+extern int alpha_swapped_comparison_operator ();
+extern int sext_add_operand ();
+extern int cint8_operand ();
+extern int mode_mask_operand ();
+extern int or_operand ();
+extern int mode_width_operand ();
+extern int reg_or_fp0_operand ();
+extern int signed_comparison_operator ();
+extern int fp0_operand ();
+extern int some_operand ();
+extern int input_operand ();
+extern int divmod_operator ();
+extern int call_operand ();
+extern int reg_or_cint_operand ();
+extern int hard_fp_register_operand ();
+extern void alpha_set_memflags ();
+extern int aligned_memory_operand ();
+extern void get_aligned_mem ();
+extern void alpha_expand_unaligned_load ();
+extern void alpha_expand_unaligned_store ();
+extern int alpha_expand_block_move ();
+extern int alpha_expand_block_clear ();
+extern void alpha_expand_prologue ();
+extern void alpha_expand_epilogue ();
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md
index dd8ce53..98fa0f7 100644
--- a/gcc/config/alpha/alpha.md
+++ b/gcc/config/alpha/alpha.md
@@ -1190,6 +1190,8 @@
return \"s%P2addq %r1,0,%0\";
case 1:
return \"sll %r1,%2,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "iadd,shift")])