convex-protos.h: New file.

* 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
This commit is contained in:
Kaveh R. Ghazi 2000-01-14 16:04:32 +00:00 committed by Kaveh Ghazi
parent ab52604591
commit 6b995286d6
4 changed files with 94 additions and 31 deletions

View File

@ -1,3 +1,13 @@
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.

View File

@ -0,0 +1,50 @@
/* 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));

View File

@ -1,5 +1,5 @@
/* 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.
@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */
#include "output.h"
#include "function.h"
#include "expr.h"
#include "tm_p.h"
/* Tables used in convex.h */
@ -55,13 +56,16 @@ static char cmp_modech;
/* 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;
@ -101,6 +105,7 @@ init_convex ()
psw_disable_float ();
}
void
psw_disable_float ()
{
#if __convex__ && __GNUC__
@ -117,10 +122,10 @@ psw_disable_float ()
/* 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;
@ -137,11 +142,11 @@ output_cmp (operand0, operand1, modech)
(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];
@ -251,6 +256,8 @@ simplify_for_convex (x)
case CONST:
return simplify_for_convex (XEXP (x, 0));
default:
break;
}
return x;
@ -458,13 +465,13 @@ check_float_value (mode, dp, overflow)
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;
@ -498,10 +505,11 @@ asm_declare_function_name (file, name, decl)
%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;
@ -531,9 +539,9 @@ print_operand (file, x, code)
}
#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;
@ -565,6 +573,7 @@ print_operand (file, x, code)
/* Print a memory operand whose address is X, on file FILE. */
void
print_operand_address (file, addr)
FILE *file;
rtx addr;
@ -612,10 +621,11 @@ print_operand_address (file, 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);
@ -631,6 +641,7 @@ outfloat (file, value, fmt, pfx, sfx)
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. */
@ -644,9 +655,9 @@ replace_arg_pushes ()
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);
@ -669,6 +680,7 @@ output_call (insn, operands)
/* Here after reloading, before the second scheduling pass. */
void
emit_ap_optimizations ()
{
/* Removed for now. */

View File

@ -1,5 +1,5 @@
/* 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.
@ -628,7 +628,7 @@ enum reg_class {
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
@ -1107,7 +1107,7 @@ enum reg_class {
#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) \
@ -1172,11 +1172,10 @@ enum reg_class {
/* 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))
/* Tell final.c how to eliminate redundant test instructions. */
@ -1235,13 +1234,13 @@ extern double atof();
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). */
@ -1493,11 +1492,3 @@ extern enum reg_class reg_class_from_letter[];
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 ();