pdp11-protos.h: New file.

* pdp11-protos.h: New file.

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

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

        * pdp11.md: Likewise.

        * 2bsd.h: Likewise.

From-SVN: r31429
This commit is contained in:
Kaveh R. Ghazi 2000-01-14 23:07:07 +00:00 committed by Kaveh Ghazi
parent 69bc71fad0
commit b0106b2463
6 changed files with 84 additions and 45 deletions

View File

@ -1,3 +1,17 @@
2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* pdp11-protos.h: New file.
* pdp11.c: Include tm_p.h. Add static prototypes. Fix compile
time warnings.
* pdp11.h: Move prototypes to pdp11-protos.h. Fix compile time
warnings.
* pdp11.md: Likewise.
* 2bsd.h: Likewise.
2000-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* mn10300-protos.h: New file.

View File

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for a PDP with 2BSD
Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
Copyright (C) 1995, 96, 99, 2000 Free Software Foundation, Inc.
Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
This file is part of GNU CC.
@ -56,7 +56,7 @@ fprintf(FILE, "\tjmp cret\n"); \
#undef INITIAL_FRAME_POINTER_OFFSET
#define INITIAL_FRAME_POINTER_OFFSET(DEPTH_VAR) \
{ \
int offset, regno; \
int offset; \
offset = get_frame_size(); \
offset = (offset <= 2)? 0: (offset -2); \
(DEPTH_VAR) = offset+10; \

View File

@ -0,0 +1,45 @@
/* Definitions of target machine for GNU compiler, for the pdp-11
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
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 1, 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 */
#ifdef RTX_CODE
extern int arith_operand PARAMS ((rtx, enum machine_mode));
extern int const_immediate_operand PARAMS ((rtx, enum machine_mode));
extern int expand_shift_operand PARAMS ((rtx, enum machine_mode));
extern int immediate15_operand PARAMS ((rtx, enum machine_mode));
extern int simple_memory_operand PARAMS ((rtx, enum machine_mode));
extern int comp_operator PARAMS ((rtx, enum machine_mode));
extern int legitimate_address_p PARAMS ((enum machine_mode, rtx));
extern void notice_update_cc_on_set PARAMS ((rtx, rtx));
extern void output_addr_const_pdp11 PARAMS ((FILE *, rtx));
extern const char *output_move_double PARAMS ((rtx *));
extern const char *output_move_quad PARAMS ((rtx *));
extern const char *output_block_move PARAMS ((rtx *));
extern void print_operand_address PARAMS ((FILE *, rtx));
extern int register_move_cost PARAMS ((enum reg_class, enum reg_class));
extern int comparison_operator_index PARAMS ((rtx));
#endif /* RTX_CODE */
extern void output_ascii PARAMS ((FILE *, const char *, int));
extern void output_function_epilogue PARAMS ((FILE *, int));
extern void output_function_prologue PARAMS ((FILE *, int));
extern const char *output_jump PARAMS ((const char *, const char *, int));

View File

@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. */
#include "insn-attr.h"
#include "flags.h"
#include "recog.h"
#include "tm_p.h"
/*
#define FPU_REG_P(X) ((X)>=8 && (X)<14)
@ -46,7 +47,8 @@ int current_first_parm_offset;
/* This is where the condition code register lives. */
/* rtx cc0_reg_rtx; - no longer needed? */
static rtx find_addr_reg ();
static rtx find_addr_reg PARAMS ((rtx));
static const char *singlemove_string PARAMS ((rtx *));
/* Nonzero if OP is a valid second operand for an arithmetic insn. */
@ -61,7 +63,7 @@ arith_operand (op, mode)
int
const_immediate_operand (op, mode)
rtx op;
enum machine_mode mode;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == CONST_INT);
}
@ -69,7 +71,7 @@ const_immediate_operand (op, mode)
int
immediate15_operand (op, mode)
rtx op;
enum machine_mode mode;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == CONST_INT && ((INTVAL (op) & 0x8000) == 0x0000));
}
@ -77,7 +79,7 @@ immediate15_operand (op, mode)
int
expand_shift_operand (op, mode)
rtx op;
enum machine_mode mode;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == CONST_INT
&& abs (INTVAL(op)) > 1
@ -294,7 +296,7 @@ output_function_epilogue(stream, size)
/* Return the best assembler insn template
for moving operands[1] into operands[0] as a fullword. */
static char *
static const char *
singlemove_string (operands)
rtx *operands;
{
@ -308,7 +310,7 @@ singlemove_string (operands)
/* Output assembler code to perform a doubleword move insn
with operands OPERANDS. */
char *
const char *
output_move_double (operands)
rtx *operands;
{
@ -486,7 +488,7 @@ output_move_double (operands)
/* Output assembler code to perform a quadword move insn
with operands OPERANDS. */
char *
const char *
output_move_quad (operands)
rtx *operands;
{
@ -736,7 +738,7 @@ find_addr_reg (addr)
void
output_ascii (file, p, size)
FILE *file;
char *p;
const char *p;
int size;
{
int i;
@ -915,10 +917,10 @@ register_move_cost(c1, c2)
return move_costs[(int)c1][(int)c2];
}
char *
const char *
output_jump(pos, neg, length)
const char *pos, *neg;
int length;
char *pos, *neg;
{
static int x = 0;
@ -961,7 +963,7 @@ output_jump(pos, neg, length)
void
notice_update_cc_on_set(exp, insn)
rtx exp;
rtx insn;
rtx insn ATTRIBUTE_UNUSED;
{
if (GET_CODE (SET_DEST (exp)) == CC0)
{
@ -1030,9 +1032,10 @@ notice_update_cc_on_set(exp, insn)
}
int simple_memory_operand(op, mode)
rtx op;
enum machine_mode mode;
int
simple_memory_operand(op, mode)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
rtx addr;
@ -1104,7 +1107,7 @@ int simple_memory_operand(op, mode)
*/
char *
const char *
output_block_move(operands)
rtx *operands;
{
@ -1389,7 +1392,7 @@ comparison_operator_index(op)
int
comp_operator (op, mode)
rtx op;
enum machine_mode mode;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
return comparison_operator_index(op) >= 0;
}

View File

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for the pdp-11
Copyright (C) 1994, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1994, 95, 96, 98, 99, 2000 Free Software Foundation, Inc.
Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
This file is part of GNU CC.
@ -20,24 +20,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* declarations */
int arith_operand ();
int const_immediate_operand ();
int expand_shift_operand ();
int legitimate_address_p ();
void notice_update_cc_on_set ();
void output_addr_const_pdp11 ();
void output_ascii ();
void output_function_epilogue ();
void output_function_prologue ();
char *output_jump();
char *output_move_double();
char *output_move_quad();
char *output_block_move();
void print_operand_address ();
int register_move_cost ();
int simple_memory_operand ();
/* check whether load_fpu_reg or not */
#define LOAD_FPU_REG_P(x) ((x)>=8 && (x)<=11)
#define NO_LOAD_FPU_REG_P(x) ((x)==12 || (x)==13)
@ -1061,7 +1043,7 @@ fprintf (FILE, "$help$: . = .+8 ; space for tmp moves!\n") \
/* do we need reg def's R0 = %0 etc ??? */ \
)
#else
#define ASM_FILE_START(FILE) (0)
#define ASM_FILE_START(FILE)
#endif

View File

@ -1,5 +1,5 @@
;;- Machine description for the pdp11 for GNU C compiler
;; Copyright (C) 1994, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
;; Copyright (C) 1994, 95, 97-99, 2000 Free Software Foundation, Inc.
;; Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
;; This file is part of GNU CC.
@ -992,7 +992,6 @@
or is lateoperands the low word?? - looks like it! */
unsigned int i;
rtx lateoperands[3];
lateoperands[0] = operands[0];
@ -1017,7 +1016,7 @@
return \"\";
}
lateoperands[2] = GEN_INT (INTVAL (operands[2]) >> 16) & 0xffff);
lateoperands[2] = GEN_INT ((INTVAL (operands[2]) >> 16) & 0xffff);
operands[2] = GEN_INT (INTVAL (operands[2]) & 0xffff);
if (INTVAL(operands[2]))
@ -1095,7 +1094,6 @@
or is lateoperands the low word?? - looks like it! */
unsigned int i;
rtx lateoperands[3];
lateoperands[0] = operands[0];
@ -1203,7 +1201,6 @@
or is lateoperands the low word?? - looks like it! */
unsigned int i;
rtx lateoperands[3];
lateoperands[0] = operands[0];
@ -1269,7 +1266,6 @@
or is lateoperands the low word?? - looks like it! */
unsigned int i;
rtx lateoperands[3];
lateoperands[0] = operands[0];
@ -1332,7 +1328,6 @@
"*
{ /* Here we trust that operands don't overlap */
unsigned int i;
rtx lateoperands[3];
lateoperands[0] = operands[0];