]> gcc.gnu.org Git - gcc.git/blame - gcc/config/score/score3.h
tm.texi.in (OVERRIDE_OPTIONS): Remove documentation.
[gcc.git] / gcc / config / score / score3.h
CommitLineData
254f5222 1/* score3.h for Sunplus S+CORE processor
c5387660 2 Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
254f5222
CL
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
24enum score3_address_type
25{
26 SCORE3_ADD_REG,
27 SCORE3_ADD_CONST_INT,
28 SCORE3_ADD_SYMBOLIC
29};
30
31struct 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
43struct 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
56struct 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
72extern int score3_symbolic_constant_p (rtx x,
73 enum score_symbol_type *symbol_type);
74extern bool score3_return_in_memory (tree type,
75 tree fndecl ATTRIBUTE_UNUSED);
76extern 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);
506d7b68 81extern rtx score3_legitimize_address (rtx x);
254f5222
CL
82extern void
83score3_function_prologue (FILE *file,
84 HOST_WIDE_INT size ATTRIBUTE_UNUSED);
85extern void
86score3_function_epilogue (FILE *file,
87 HOST_WIDE_INT size ATTRIBUTE_UNUSED);
88extern section *score3_select_rtx_section (enum machine_mode mode, rtx x,
89 unsigned HOST_WIDE_INT align);
90extern bool score3_in_small_data_p (tree decl);
91extern void score3_asm_file_start (void);
92extern void score3_asm_file_end (void);
c5387660 93extern void score3_option_override (void);
254f5222
CL
94extern int score3_reg_class (int regno);
95extern enum reg_class score3_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
0a2aaacc 96 enum reg_class rclass);
254f5222 97extern enum reg_class
0a2aaacc 98score3_secondary_reload_class (enum reg_class rclass,
254f5222
CL
99 enum machine_mode mode ATTRIBUTE_UNUSED,
100 rtx x);
101extern int score3_const_ok_for_letter_p (HOST_WIDE_INT value, char c);
102extern int score3_extra_constraint (rtx op, char c);
103extern int score3_hard_regno_mode_ok (unsigned int regno,
104 enum machine_mode mode);
105extern HOST_WIDE_INT
106score3_initial_elimination_offset (int from,
107 int to ATTRIBUTE_UNUSED);
108extern void score3_function_arg_advance (CUMULATIVE_ARGS *cum,
109 enum machine_mode mode,
110 tree type,
111 int named);
112extern int score3_arg_partial_bytes (CUMULATIVE_ARGS *cum,
113 enum machine_mode mode,
114 tree type,
115 bool named);
116extern rtx score3_function_arg (const CUMULATIVE_ARGS *cum,
117 enum machine_mode mode,
118 tree type,
119 int named);
120extern rtx score3_function_value (tree valtype,
121 tree func ATTRIBUTE_UNUSED,
122 enum machine_mode mode);
2f5bb28c
RH
123extern void score3_asm_trampoline_template (FILE *);
124extern void score3_trampoline_init (rtx, tree, rtx);
254f5222 125extern int score3_regno_mode_ok_for_base_p (int regno, int strict);
c6c3dba9
PB
126extern bool score3_legitimate_address_p (enum machine_mode mode, rtx x,
127 bool strict);
254f5222
CL
128extern int score3_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
129 enum reg_class from,
130 enum reg_class to);
f40751dd 131extern bool score3_rtx_costs (rtx x, int code, int outer_code, int *total, bool speed);
254f5222
CL
132extern int score3_address_cost (rtx addr);
133extern int score3_output_external (FILE *file ATTRIBUTE_UNUSED,
134 tree decl,
135 const char *name);
136extern rtx score3_return_addr (int count, rtx frame ATTRIBUTE_UNUSED);
137extern void score3_print_operand (FILE *file, rtx op, int c);
138extern void score3_print_operand_address (FILE *file, rtx x);
139extern enum machine_mode
140score3_select_cc_mode (enum rtx_code op, rtx x, rtx y);
141extern void score3_prologue (void);
142extern void score3_epilogue (int sibcall_p);
254f5222
CL
143extern void score3_call (rtx *ops, bool sib);
144extern void score3_call_value (rtx *ops, bool sib);
145extern void score3_movsicc (rtx *ops);
146extern void score3_movdi (rtx *ops);
147extern void score3_zero_extract_andi (rtx *ops);
148extern const char * score3_select_add_imm (rtx *ops, bool set_cc);
149extern const char * score3_select (rtx *ops, const char *inst_pre, bool commu,
150 const char *letter, bool set_cc);
151extern const char * score3_move (rtx *ops);
152extern const char * score3_limm (rtx *ops);
153extern const char *
154score3_linsn (rtx *ops, enum score_mem_unit unit, bool sign);
155extern const char *
156score3_sinsn (rtx *ops, enum score_mem_unit unit);
157extern const char * score3_output_casesi (rtx *operands);
158extern const char * score3_rpush (rtx *ops);
159extern const char * score3_rpop (rtx *ops);
160#endif
This page took 0.807432 seconds and 5 git commands to generate.