OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [config/] [score/] [score7.h] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 282 jeremybenn
/* score7.h for Sunplus S+CORE processor
2
   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
3
   Contributed by Sunnorth
4
 
5
   This file is part of GCC.
6
 
7
   GCC is free software; you can redistribute it and/or modify it
8
   under the terms of the GNU General Public License as published
9
   by the Free Software Foundation; either version 3, or (at your
10
   option) any later version.
11
 
12
   GCC is distributed in the hope that it will be useful, but WITHOUT
13
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
15
   License for more details.
16
 
17
   You should have received a copy of the GNU General Public License
18
   along with GCC; see the file COPYING3.  If not see
19
   <http://www.gnu.org/licenses/>.  */
20
 
21
#ifndef GCC_SCORE7_H
22
#define GCC_SCORE7_H
23
 
24
enum score7_address_type
25
{
26
  SCORE7_ADD_REG,
27
  SCORE7_ADD_CONST_INT,
28
  SCORE7_ADD_SYMBOLIC
29
};
30
 
31
struct score7_frame_info
32
{
33
  HOST_WIDE_INT total_size;       /* bytes that the entire frame takes up  */
34
  HOST_WIDE_INT var_size;         /* bytes that variables take up  */
35
  HOST_WIDE_INT args_size;        /* bytes that outgoing arguments take up  */
36
  HOST_WIDE_INT gp_reg_size;      /* bytes needed to store gp regs  */
37
  HOST_WIDE_INT gp_sp_offset;     /* offset from new sp to store gp registers  */
38
  HOST_WIDE_INT cprestore_size;   /* # bytes that the .cprestore slot takes up  */
39
  unsigned int  mask;             /* mask of saved gp registers  */
40
  int num_gp;                     /* number of gp registers saved  */
41
};
42
 
43
struct score7_arg_info
44
{
45
  unsigned int num_bytes;     /* The argument's size in bytes  */
46
  unsigned int reg_words;     /* The number of words passed in registers  */
47
  unsigned int reg_offset;    /* The offset of the first register from  */
48
                              /* GP_ARG_FIRST or FP_ARG_FIRST etc  */
49
  unsigned int stack_words;   /* The number of words that must be passed  */
50
                              /* on the stack  */
51
  unsigned int stack_offset;  /* The offset from the start of the stack  */
52
                              /* overflow area  */
53
};
54
 
55
#ifdef RTX_CODE
56
struct score7_address_info
57
{
58
  enum score7_address_type type;
59
  rtx reg;
60
  rtx offset;
61
  enum rtx_code code;
62
  enum score_symbol_type symbol_type;
63
};
64
#endif
65
 
66
#define SCORE7_SDATA_MAX                score7_sdata_max
67
#define SCORE7_STACK_ALIGN(LOC)         (((LOC) + 3) & ~3)
68
#define SCORE7_PROLOGUE_TEMP_REGNUM     (GP_REG_FIRST + 8)
69
#define SCORE7_EPILOGUE_TEMP_REGNUM     (GP_REG_FIRST + 8)
70
#define SCORE7_DEFAULT_SDATA_MAX        8
71
 
72
extern int score7_symbolic_constant_p (rtx x,
73
                                       enum score_symbol_type *symbol_type);
74
extern bool score7_return_in_memory (tree type,
75
                                     tree fndecl ATTRIBUTE_UNUSED);
76
extern void score7_output_mi_thunk (FILE *file,
77
                                    tree thunk_fndecl ATTRIBUTE_UNUSED,
78
                                    HOST_WIDE_INT delta,
79
                                    HOST_WIDE_INT vcall_offset,
80
                                    tree function);
81
extern rtx score7_legitimize_address (rtx x);
82
extern void
83
score7_function_prologue (FILE *file,
84
                          HOST_WIDE_INT size ATTRIBUTE_UNUSED);
85
extern void
86
score7_function_epilogue (FILE *file,
87
                          HOST_WIDE_INT size ATTRIBUTE_UNUSED);
88
extern section *score7_select_rtx_section (enum machine_mode mode, rtx x,
89
                                           unsigned HOST_WIDE_INT align);
90
extern bool score7_in_small_data_p (tree decl);
91
extern void score7_asm_file_start (void);
92
extern void score7_asm_file_end (void);
93
extern void score7_override_options (void);
94
extern int score7_reg_class (int regno);
95
extern enum reg_class score7_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
96
                                                     enum reg_class rclass);
97
extern enum
98
reg_class score7_secondary_reload_class (enum reg_class rclass,
99
                                         enum machine_mode mode ATTRIBUTE_UNUSED,
100
                                         rtx x);
101
extern int score7_const_ok_for_letter_p (HOST_WIDE_INT value, char c);
102
extern int score7_extra_constraint (rtx op, char c);
103
extern int score7_hard_regno_mode_ok (unsigned int regno,
104
                                      enum machine_mode mode);
105
extern HOST_WIDE_INT
106
score7_initial_elimination_offset (int from,
107
                                   int to ATTRIBUTE_UNUSED);
108
extern void score7_function_arg_advance (CUMULATIVE_ARGS *cum,
109
                                         enum machine_mode mode,
110
                                         tree type,
111
                                         int named);
112
extern int score7_arg_partial_bytes (CUMULATIVE_ARGS *cum,
113
                                     enum machine_mode mode,
114
                                     tree type,
115
                                     bool named);
116
extern rtx score7_function_arg (const CUMULATIVE_ARGS *cum,
117
                                enum machine_mode mode,
118
                                tree type,
119
                                int named);
120
extern rtx score7_function_value (tree valtype,
121
                                  tree func ATTRIBUTE_UNUSED,
122
                                  enum machine_mode mode);
123
extern void score7_asm_trampoline_template (FILE *);
124
extern void score7_trampoline_init (rtx, tree, rtx);
125
extern int score7_regno_mode_ok_for_base_p (int regno, int strict);
126
extern bool score7_legitimate_address_p (enum machine_mode mode, rtx x,
127
                                         bool strict);
128
extern int score7_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
129
                                      enum reg_class from,
130
                                      enum reg_class to);
131
extern bool score7_rtx_costs (rtx x, int code, int outer_code, int *total, bool speed);
132
extern int score7_address_cost (rtx addr);
133
extern int score7_output_external (FILE *file ATTRIBUTE_UNUSED,
134
                                   tree decl,
135
                                   const char *name);
136
extern rtx score7_return_addr (int count, rtx frame ATTRIBUTE_UNUSED);
137
extern void score7_print_operand (FILE *file, rtx op, int c);
138
extern void score7_print_operand_address (FILE *file, rtx x);
139
extern enum machine_mode score7_select_cc_mode (enum rtx_code op,
140
                                                rtx x,
141
                                                rtx y);
142
extern void score7_prologue (void);
143
extern void score7_epilogue (int sibcall_p);
144
extern void score7_call (rtx *ops, bool sib);
145
extern void score7_call_value (rtx *ops, bool sib);
146
extern void score7_movsicc (rtx *ops);
147
extern void score7_movdi (rtx *ops);
148
extern void score7_zero_extract_andi (rtx *ops);
149
extern const char * score7_select_add_imm (rtx *ops, bool set_cc);
150
extern const char * score7_select (rtx *ops, const char *inst_pre, bool commu,
151
                                   const char *letter, bool set_cc);
152
extern const char * score7_move (rtx *ops);
153
extern const char * score7_limm (rtx *ops);
154
extern const char *
155
score7_linsn (rtx *ops, enum score_mem_unit unit, bool sign);
156
extern const char *
157
score7_sinsn (rtx *ops, enum score_mem_unit unit);
158
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.