* convex-protos.h: New file.
* convex.c: Include tm_p.h. Add static prototypes. Fix compile
time warnings.
* convex.h: Move prototypes to convex-protos.h. Fix compile time
warnings.
From-SVN: r31415
+2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * convex-protos.h: New file.
+
+ * convex.c: Include tm_p.h. Add static prototypes. Fix compile
+ time warnings.
+
+ * convex.h: Move prototypes to convex-protos.h. Fix compile time
+ warnings.
+
2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* elxsi-protos.h: New file.
--- /dev/null
+/* Definitions of target machine for GNU compiler. Convex version.
+ 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
+extern int const_double_low_int PARAMS ((rtx));
+extern int const_double_high_int PARAMS ((rtx));
+extern const char *output_cmp PARAMS ((rtx, rtx, int));
+extern const char *output_condjump PARAMS ((rtx, const char *, int));
+extern const char *output_call PARAMS ((rtx, rtx *));
+extern rtx simplify_for_convex PARAMS ((rtx));
+extern void print_operand PARAMS ((FILE *, rtx, int));
+extern void print_operand_address PARAMS ((FILE *, rtx));
+extern void expand_movstr PARAMS ((rtx *));
+
+extern int nonmemory_operand PARAMS ((rtx, enum machine_mode));
+extern int nonmemory_cmpsf_operand PARAMS ((rtx, enum machine_mode));
+#endif /* RTX_CODE */
+
+#ifdef TREE_CODE
+extern void asm_declare_function_name PARAMS ((FILE *, const char *, tree));
+#endif /* TREE_CODE */
+
+#ifdef REAL_VALUE_TYPE
+extern int check_float_value PARAMS ((enum machine_mode, REAL_VALUE_TYPE *,
+ int));
+extern void outfloat PARAMS ((FILE *, REAL_VALUE_TYPE, const char *,
+ const char *, const char *));
+#endif /* REAL_VALUE_TYPE */
+
+extern void psw_disable_float PARAMS ((void));
+extern void init_convex PARAMS ((void));
+extern void replace_arg_pushes PARAMS ((void));
+extern void emit_ap_optimizations PARAMS ((void));
/* Subroutines for insn-output.c for Convex.
- Copyright (C) 1988, 93, 94, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1988, 93, 94, 97-99, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
#include "output.h"
#include "function.h"
#include "expr.h"
+#include "tm_p.h"
/* Tables used in convex.h */
/* Forwards */
+#if 0
static rtx frame_argblock;
static int frame_argblock_size;
static rtx convert_arg_pushes ();
-static void expand_movstr_call ();
+#endif
+static void expand_movstr_call PARAMS ((rtx *));
/* Here from OVERRIDE_OPTIONS at startup. Initialize constant tables. */
+void
init_convex ()
{
int regno;
psw_disable_float ();
}
+void
psw_disable_float ()
{
#if __convex__ && __GNUC__
/* Here to output code for a compare insn. Output nothing, just
record the operands and their mode. */
-char *
+const char *
output_cmp (operand0, operand1, modech)
rtx operand0, operand1;
- char modech;
+ int modech;
{
cmp_operand0 = operand0;
cmp_operand1 = operand1;
(beq L5)
*/
-char *
+const char *
output_condjump (label, cond, jbr_sense)
rtx label;
- char *cond;
- char jbr_sense;
+ const char *cond;
+ int jbr_sense;
{
rtx operands[3];
char cmp_op[4];
case CONST:
return simplify_for_convex (XEXP (x, 0));
+ default:
+ break;
}
return x;
void
asm_declare_function_name (file, name, decl)
FILE *file;
- char *name;
+ const char *name;
tree decl;
{
- tree parms;
int nargs = list_length (DECL_ARGUMENTS (decl));
- char *p, c;
+ const char *p;
+ char c;
extern char *version_string;
static char vers[4];
int i;
%z prints a CONST_INT shift count as a multiply operand -- viz. 1 << n.
*/
+void
print_operand (file, x, code)
FILE *file;
rtx x;
- char code;
+ int code;
{
long u[2];
REAL_VALUE_TYPE d;
}
#endif
if (code == 'u')
- fprintf (file, "#%#x", u[0]);
+ fprintf (file, "#%#lx", u[0]);
else if (code == 'v')
- fprintf (file, "#%#x", u[1]);
+ fprintf (file, "#%#lx", u[1]);
else
outfloat (file, d, "%.17e", "#", "");
break;
/* Print a memory operand whose address is X, on file FILE. */
+void
print_operand_address (file, addr)
FILE *file;
rtx addr;
/* Output a float to FILE, value VALUE, format FMT, preceded by PFX
and followed by SFX. */
+void
outfloat (file, value, fmt, pfx, sfx)
FILE *file;
REAL_VALUE_TYPE value;
- char *fmt, *pfx, *sfx;
+ const char *fmt, *pfx, *sfx;
{
char buf[64];
fputs (pfx, file);
and the calling sequence does not require the arg block to be at the
top of the stack. */
+void
replace_arg_pushes ()
{
/* Doesn't work yet. */
4 - address of the arg list.
*/
-char *
+const char *
output_call (insn, operands)
- rtx insn, *operands;
+ rtx insn ATTRIBUTE_UNUSED, *operands;
{
if (operands[4] == stack_pointer_rtx)
output_asm_insn ("mov sp,ap", operands);
/* Here after reloading, before the second scheduling pass. */
+void
emit_ap_optimizations ()
{
/* Removed for now. */
/* Definitions of target machine for GNU compiler. Convex version.
- Copyright (C) 1988, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1994, 1995, 1996, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
of length N_REG_CLASSES. */
#define REG_CLASS_CONTENTS \
- { 0, 0x00ff, 0xfe00, 0x0100, 0xff00, 0xfeff, 0xffff }
+ { {0}, {0x00ff}, {0xfe00}, {0x0100}, {0xff00}, {0xfeff}, {0xffff} }
/* The same information, inverted:
Return the class number of the smallest class containing
#define RTX_COSTS(RTX,CODE,OUTER_CODE) \
case PLUS: \
- if (regno_pointer_flag != 0 \
+ if (cfun->emit->regno_pointer_flag != 0 \
&& GET_CODE (XEXP (RTX, 0)) == REG \
&& REGNO_POINTER_FLAG (REGNO (XEXP (RTX, 0))) \
&& GET_CODE (XEXP (RTX, 1)) == CONST_INT) \
/* But must prevent real.c from constructing Vax dfloats */
#define REAL_VALUE_ATOF(X,S) atof (X)
-extern double atof();
/* Check a `double' value for validity for a particular machine mode. */
#define CHECK_FLOAT_VALUE(MODE, D, OVERFLOW) \
- OVERFLOW = check_float_value (MODE, &D, OVERFLOW)
+ (OVERFLOW = check_float_value (MODE, &D, OVERFLOW))
\f
/* Tell final.c how to eliminate redundant test instructions. */
that says to advance the location counter
to a multiple of 2**LOG bytes. */
-#define ASM_OUTPUT_ALIGN(FILE,LOG) \
+#define ASM_OUTPUT_ALIGN(FILE,LOG) do { \
if (current_section_is_text && (LOG) > 1) \
fprintf (FILE, ".text %d\n", LOG); \
else if (current_section_is_text) \
fprintf (FILE, ".text\n.align %d\n", 1 << (LOG)); \
else \
- fprintf (FILE, ".align %d\n", 1 << (LOG))
+ fprintf (FILE, ".align %d\n", 1 << (LOG)); } while (0)
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number (see above). */
extern char regno_ok_for_index_p_base[];
#define regno_ok_for_index_p (regno_ok_for_index_p_base + 1)
-extern int const_double_low_int ();
-extern int const_double_high_int ();
-extern char *output_cmp ();
-extern char *output_condjump ();
-extern char *output_call ();
-extern void gen_ap_for_call ();
-extern int check_float_value ();
-extern void asm_declare_function_name ();