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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [config/] [score/] [score3.h] - Blame information for rev 301

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 282 jeremybenn
/* score3.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_SCORE3_H
22
#define GCC_SCORE3_H
23
 
24
enum score3_address_type
25
{
26
  SCORE3_ADD_REG,
27
  SCORE3_ADD_CONST_INT,
28
  SCORE3_ADD_SYMBOLIC
29
};
30
 
31
struct score3_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 score3_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 score3_address_info
57
{
58
  enum score3_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 SCORE3_SDATA_MAX                score3_sdata_max
67
#define SCORE3_STACK_ALIGN(LOC)         (((LOC) + 3) & ~3)
68
#define SCORE3_PROLOGUE_TEMP_REGNUM     (GP_REG_FIRST + 8)
69
#define SCORE3_EPILOGUE_TEMP_REGNUM     (GP_REG_FIRST + 8)
70
#define SCORE3_DEFAULT_SDATA_MAX        8
71
 
72
extern int score3_symbolic_constant_p (rtx x,
73
                                       enum score_symbol_type *symbol_type);
74
extern bool score3_return_in_memory (tree type,
75
                                     tree fndecl ATTRIBUTE_UNUSED);
76
extern void score3_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 score3_legitimize_address (rtx x);
82
extern void
83
score3_function_prologue (FILE *file,
84
                          HOST_WIDE_INT size ATTRIBUTE_UNUSED);
85
extern void
86
score3_function_epilogue (FILE *file,
87
                          HOST_WIDE_INT size ATTRIBUTE_UNUSED);
88
extern section *score3_select_rtx_section (enum machine_mode mode, rtx x,
89
                                           unsigned HOST_WIDE_INT align);
90
extern bool score3_in_small_data_p (tree decl);
91
extern void score3_asm_file_start (void);
92
extern void score3_asm_file_end (void);
93
extern void score3_override_options (void);
94
extern int score3_reg_class (int regno);
95
extern enum reg_class score3_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
96
                                                     enum reg_class rclass);
97
extern enum reg_class
98
score3_secondary_reload_class (enum reg_class rclass,
99
                               enum machine_mode mode ATTRIBUTE_UNUSED,
100
                               rtx x);
101
extern int score3_const_ok_for_letter_p (HOST_WIDE_INT value, char c);
102
extern int score3_extra_constraint (rtx op, char c);
103
extern int score3_hard_regno_mode_ok (unsigned int regno,
104
                                      enum machine_mode mode);
105
extern HOST_WIDE_INT
106
score3_initial_elimination_offset (int from,
107
                                   int to ATTRIBUTE_UNUSED);
108
extern void score3_function_arg_advance (CUMULATIVE_ARGS *cum,
109
                                         enum machine_mode mode,
110
                                         tree type,
111
                                         int named);
112
extern int score3_arg_partial_bytes (CUMULATIVE_ARGS *cum,
113
                                     enum machine_mode mode,
114
                                     tree type,
115
                                     bool named);
116
extern rtx score3_function_arg (const CUMULATIVE_ARGS *cum,
117
                                enum machine_mode mode,
118
                                tree type,
119
                                int named);
120
extern rtx score3_function_value (tree valtype,
121
                                  tree func ATTRIBUTE_UNUSED,
122
                                  enum machine_mode mode);
123
extern void score3_asm_trampoline_template (FILE *);
124
extern void score3_trampoline_init (rtx, tree, rtx);
125
extern int score3_regno_mode_ok_for_base_p (int regno, int strict);
126
extern bool score3_legitimate_address_p (enum machine_mode mode, rtx x,
127
                                         bool strict);
128
extern int score3_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
129
                                      enum reg_class from,
130
                                      enum reg_class to);
131
extern bool score3_rtx_costs (rtx x, int code, int outer_code, int *total, bool speed);
132
extern int score3_address_cost (rtx addr);
133
extern int score3_output_external (FILE *file ATTRIBUTE_UNUSED,
134
                                   tree decl,
135
                                   const char *name);
136
extern rtx score3_return_addr (int count, rtx frame ATTRIBUTE_UNUSED);
137
extern void score3_print_operand (FILE *file, rtx op, int c);
138
extern void score3_print_operand_address (FILE *file, rtx x);
139
extern enum machine_mode
140
score3_select_cc_mode (enum rtx_code op, rtx x, rtx y);
141
extern void score3_prologue (void);
142
extern void score3_epilogue (int sibcall_p);
143
extern void score3_call (rtx *ops, bool sib);
144
extern void score3_call_value (rtx *ops, bool sib);
145
extern void score3_movsicc (rtx *ops);
146
extern void score3_movdi (rtx *ops);
147
extern void score3_zero_extract_andi (rtx *ops);
148
extern const char * score3_select_add_imm (rtx *ops, bool set_cc);
149
extern const char * score3_select (rtx *ops, const char *inst_pre, bool commu,
150
                                   const char *letter, bool set_cc);
151
extern const char * score3_move (rtx *ops);
152
extern const char * score3_limm (rtx *ops);
153
extern const char *
154
score3_linsn (rtx *ops, enum score_mem_unit unit, bool sign);
155
extern const char *
156
score3_sinsn (rtx *ops, enum score_mem_unit unit);
157
extern const char * score3_output_casesi (rtx *operands);
158
extern const char * score3_rpush (rtx *ops);
159
extern const char * score3_rpop (rtx *ops);
160
#endif

powered by: WebSVN 2.1.0

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