alpha.md: Remove usage of PARAMS.
* config/alpha/alpha.md: Remove usage of PARAMS. * config/i386/cygwin.h: Convert K&R prototypes to ISO C90. * config/i386/i386-interix.h: Likewise. * config/i386/winnt.c: Likewise. * config/i386/cygming.h: Likewise. * config/i386/cygwin2.c: Likewise. * config/darwin.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin-protos.h: Likewise. * config/darwin.h: Likewise. * config/s390/s390-protos.h: Likewise. * config/s390/s390.c: Likewise. * config/ia64/ia64.c: Likewse * config/ia64/ia64-protos.h: Likewise. From-SVN: r70515
This commit is contained in:
parent
e20bcc5e13
commit
9c808aadb0
15 changed files with 1060 additions and 1655 deletions
|
@ -1,3 +1,21 @@
|
|||
2003-08-17 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* config/alpha/alpha.md: Remove usage of PARAMS.
|
||||
|
||||
* config/i386/cygwin.h: Convert K&R prototypes to ISO C90.
|
||||
* config/i386/i386-interix.h: Likewise.
|
||||
* config/i386/winnt.c: Likewise.
|
||||
* config/i386/cygming.h: Likewise.
|
||||
* config/i386/cygwin2.c: Likewise.
|
||||
* config/darwin.c: Likewise.
|
||||
* config/darwin-c.c: Likewise.
|
||||
* config/darwin-protos.h: Likewise.
|
||||
* config/darwin.h: Likewise.
|
||||
* config/s390/s390-protos.h: Likewise.
|
||||
* config/s390/s390.c: Likewise.
|
||||
* config/ia64/ia64.c: Likewse
|
||||
* config/ia64/ia64-protos.h: Likewise.
|
||||
|
||||
2003-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* config/sparc/sparc.c: Convert to ISO C.
|
||||
|
|
|
@ -7171,7 +7171,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_extxl_be;
|
||||
else
|
||||
|
@ -7186,7 +7186,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_extxl_be;
|
||||
else
|
||||
|
@ -7201,7 +7201,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_extxl_be;
|
||||
else
|
||||
|
@ -7216,7 +7216,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_extxl_be;
|
||||
else
|
||||
|
@ -7231,7 +7231,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_extwh_be;
|
||||
else
|
||||
|
@ -7246,7 +7246,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_extlh_be;
|
||||
else
|
||||
|
@ -7261,7 +7261,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_extqh_be;
|
||||
else
|
||||
|
@ -7276,7 +7276,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_insbl_be;
|
||||
else
|
||||
|
@ -7292,7 +7292,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_inswl_be;
|
||||
else
|
||||
|
@ -7308,7 +7308,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_insll_be;
|
||||
else
|
||||
|
@ -7325,7 +7325,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx);
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_insql_be;
|
||||
else
|
||||
|
@ -7370,7 +7370,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx, rtx);
|
||||
rtx mask;
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_mskxl_be;
|
||||
|
@ -7387,7 +7387,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx, rtx);
|
||||
rtx mask;
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_mskxl_be;
|
||||
|
@ -7404,7 +7404,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx, rtx);
|
||||
rtx mask;
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_mskxl_be;
|
||||
|
@ -7421,7 +7421,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
|
|||
(match_operand:DI 2 "reg_or_8bit_operand" "")]
|
||||
""
|
||||
{
|
||||
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx));
|
||||
rtx (*gen) (rtx, rtx, rtx, rtx);
|
||||
rtx mask;
|
||||
if (WORDS_BIG_ENDIAN)
|
||||
gen = gen_mskxl_be;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* Darwin support needed only by C/C++ frontends.
|
||||
Copyright (C) 2001
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Apple Computer Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -38,8 +37,8 @@ Boston, MA 02111-1307, USA. */
|
|||
/* Maintain a small stack of alignments. This is similar to pragma
|
||||
pack's stack, but simpler. */
|
||||
|
||||
static void push_field_alignment PARAMS ((int));
|
||||
static void pop_field_alignment PARAMS ((void));
|
||||
static void push_field_alignment (int);
|
||||
static void pop_field_alignment (void);
|
||||
|
||||
typedef struct align_stack
|
||||
{
|
||||
|
@ -50,8 +49,7 @@ typedef struct align_stack
|
|||
static struct align_stack * field_align_stack = NULL;
|
||||
|
||||
static void
|
||||
push_field_alignment (bit_alignment)
|
||||
int bit_alignment;
|
||||
push_field_alignment (int bit_alignment)
|
||||
{
|
||||
align_stack *entry = (align_stack *) xmalloc (sizeof (align_stack));
|
||||
|
||||
|
@ -63,7 +61,7 @@ push_field_alignment (bit_alignment)
|
|||
}
|
||||
|
||||
static void
|
||||
pop_field_alignment ()
|
||||
pop_field_alignment (void)
|
||||
{
|
||||
if (field_align_stack)
|
||||
{
|
||||
|
@ -80,8 +78,7 @@ pop_field_alignment ()
|
|||
/* Handlers for Darwin-specific pragmas. */
|
||||
|
||||
void
|
||||
darwin_pragma_ignore (pfile)
|
||||
cpp_reader *pfile ATTRIBUTE_UNUSED;
|
||||
darwin_pragma_ignore (cpp_reader *pfile ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* Do nothing. */
|
||||
}
|
||||
|
@ -89,8 +86,7 @@ darwin_pragma_ignore (pfile)
|
|||
/* #pragma options align={mac68k|power|reset} */
|
||||
|
||||
void
|
||||
darwin_pragma_options (pfile)
|
||||
cpp_reader *pfile ATTRIBUTE_UNUSED;
|
||||
darwin_pragma_options (cpp_reader *pfile ATTRIBUTE_UNUSED)
|
||||
{
|
||||
const char *arg;
|
||||
tree t, x;
|
||||
|
@ -122,8 +118,7 @@ darwin_pragma_options (pfile)
|
|||
/* #pragma unused ([var {, var}*]) */
|
||||
|
||||
void
|
||||
darwin_pragma_unused (pfile)
|
||||
cpp_reader *pfile ATTRIBUTE_UNUSED;
|
||||
darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_UNUSED)
|
||||
{
|
||||
tree decl, x;
|
||||
int tok;
|
||||
|
|
|
@ -18,105 +18,105 @@ 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. */
|
||||
|
||||
extern int name_needs_quotes PARAMS ((const char *));
|
||||
extern int name_needs_quotes (const char *);
|
||||
|
||||
extern void machopic_validate_stub_or_non_lazy_ptr PARAMS ((const char *, int));
|
||||
extern void machopic_validate_stub_or_non_lazy_ptr (const char *, int);
|
||||
|
||||
extern const char *machopic_function_base_name PARAMS ((void));
|
||||
extern const char *machopic_function_base_name (void);
|
||||
extern void machopic_output_function_base_name (FILE *);
|
||||
extern const char *machopic_non_lazy_ptr_name PARAMS ((const char*));
|
||||
extern const char *machopic_stub_name PARAMS ((const char*));
|
||||
extern const char *machopic_non_lazy_ptr_name (const char*);
|
||||
extern const char *machopic_stub_name (const char*);
|
||||
|
||||
extern void machopic_picsymbol_stub_section PARAMS ((void));
|
||||
extern void machopic_picsymbol_stub1_section PARAMS ((void));
|
||||
extern void machopic_symbol_stub_section PARAMS ((void));
|
||||
extern void machopic_symbol_stub1_section PARAMS ((void));
|
||||
extern void machopic_lazy_symbol_ptr_section PARAMS ((void));
|
||||
extern void machopic_nl_symbol_ptr_section PARAMS ((void));
|
||||
extern void machopic_picsymbol_stub_section (void);
|
||||
extern void machopic_picsymbol_stub1_section (void);
|
||||
extern void machopic_symbol_stub_section (void);
|
||||
extern void machopic_symbol_stub1_section (void);
|
||||
extern void machopic_lazy_symbol_ptr_section (void);
|
||||
extern void machopic_nl_symbol_ptr_section (void);
|
||||
|
||||
extern void constructor_section PARAMS ((void));
|
||||
extern void destructor_section PARAMS ((void));
|
||||
extern void mod_init_section PARAMS ((void));
|
||||
extern void mod_term_section PARAMS ((void));
|
||||
extern void constructor_section (void);
|
||||
extern void destructor_section (void);
|
||||
extern void mod_init_section (void);
|
||||
extern void mod_term_section (void);
|
||||
|
||||
#ifdef RTX_CODE
|
||||
|
||||
extern int machopic_operand_p PARAMS ((rtx));
|
||||
extern enum machopic_addr_class machopic_classify_name PARAMS ((const char*));
|
||||
extern int machopic_operand_p (rtx);
|
||||
extern enum machopic_addr_class machopic_classify_name (const char*);
|
||||
|
||||
extern rtx machopic_indirect_data_reference PARAMS ((rtx, rtx));
|
||||
extern rtx machopic_indirect_call_target PARAMS ((rtx));
|
||||
extern rtx machopic_legitimize_pic_address PARAMS ((rtx, enum machine_mode, rtx));
|
||||
extern rtx machopic_indirect_data_reference (rtx, rtx);
|
||||
extern rtx machopic_indirect_call_target (rtx);
|
||||
extern rtx machopic_legitimize_pic_address (rtx, enum machine_mode, rtx);
|
||||
|
||||
extern void machopic_asm_out_constructor PARAMS ((rtx, int));
|
||||
extern void machopic_asm_out_destructor PARAMS ((rtx, int));
|
||||
extern void machopic_asm_out_constructor (rtx, int);
|
||||
extern void machopic_asm_out_destructor (rtx, int);
|
||||
#endif /* RTX_CODE */
|
||||
|
||||
#ifdef TREE_CODE
|
||||
|
||||
extern enum machopic_addr_class machopic_classify_ident PARAMS ((tree));
|
||||
extern void machopic_define_ident PARAMS ((tree));
|
||||
extern void machopic_define_name PARAMS ((const char*));
|
||||
extern int machopic_name_defined_p PARAMS ((const char*));
|
||||
extern int machopic_ident_defined_p PARAMS ((tree));
|
||||
extern void darwin_encode_section_info PARAMS ((tree, rtx, int));
|
||||
extern const char *darwin_strip_name_encoding PARAMS ((const char *));
|
||||
extern enum machopic_addr_class machopic_classify_ident (tree);
|
||||
extern void machopic_define_ident (tree);
|
||||
extern void machopic_define_name (const char*);
|
||||
extern int machopic_name_defined_p (const char*);
|
||||
extern int machopic_ident_defined_p (tree);
|
||||
extern void darwin_encode_section_info (tree, rtx, int);
|
||||
extern const char *darwin_strip_name_encoding (const char *);
|
||||
|
||||
#endif /* TREE_CODE */
|
||||
|
||||
extern void machopic_finish PARAMS ((FILE *));
|
||||
extern void machopic_finish (FILE *);
|
||||
|
||||
extern void machopic_output_possible_stub_label PARAMS ((FILE *, const char*));
|
||||
extern void machopic_output_possible_stub_label (FILE *, const char*);
|
||||
|
||||
extern void darwin_exception_section PARAMS ((void));
|
||||
extern void darwin_eh_frame_section PARAMS ((void));
|
||||
extern void machopic_select_section PARAMS ((tree, int,
|
||||
unsigned HOST_WIDE_INT));
|
||||
extern void machopic_select_rtx_section PARAMS ((enum machine_mode, rtx,
|
||||
unsigned HOST_WIDE_INT));
|
||||
extern void darwin_exception_section (void);
|
||||
extern void darwin_eh_frame_section (void);
|
||||
extern void machopic_select_section (tree, int, unsigned HOST_WIDE_INT);
|
||||
extern void machopic_select_rtx_section (enum machine_mode, rtx,
|
||||
unsigned HOST_WIDE_INT);
|
||||
|
||||
extern void darwin_pragma_ignore PARAMS ((struct cpp_reader *));
|
||||
extern void darwin_pragma_options PARAMS ((struct cpp_reader *));
|
||||
extern void darwin_pragma_unused PARAMS ((struct cpp_reader *));
|
||||
extern void darwin_pragma_ignore (struct cpp_reader *);
|
||||
extern void darwin_pragma_options (struct cpp_reader *);
|
||||
extern void darwin_pragma_unused (struct cpp_reader *);
|
||||
|
||||
extern void darwin_file_end PARAMS ((void));
|
||||
extern void darwin_file_end (void);
|
||||
|
||||
/* Expanded by EXTRA_SECTION_FUNCTIONS into varasm.o. */
|
||||
extern void const_section PARAMS ((void));
|
||||
extern void const_data_section PARAMS ((void));
|
||||
extern void cstring_section PARAMS ((void));
|
||||
extern void literal4_section PARAMS ((void));
|
||||
extern void literal8_section PARAMS ((void));
|
||||
extern void constructor_section PARAMS ((void));
|
||||
extern void mod_init_section PARAMS ((void));
|
||||
extern void mod_term_section PARAMS ((void));
|
||||
extern void destructor_section PARAMS ((void));
|
||||
extern void objc_class_section PARAMS ((void));
|
||||
extern void objc_meta_class_section PARAMS ((void));
|
||||
extern void objc_category_section PARAMS ((void));
|
||||
extern void objc_class_vars_section PARAMS ((void));
|
||||
extern void objc_instance_vars_section PARAMS ((void));
|
||||
extern void objc_cls_meth_section PARAMS ((void));
|
||||
extern void objc_inst_meth_section PARAMS ((void));
|
||||
extern void objc_cat_cls_meth_section PARAMS ((void));
|
||||
extern void objc_cat_inst_meth_section PARAMS ((void));
|
||||
extern void objc_selector_refs_section PARAMS ((void));
|
||||
extern void objc_selector_fixup_section PARAMS ((void));
|
||||
extern void objc_symbols_section PARAMS ((void));
|
||||
extern void objc_module_info_section PARAMS ((void));
|
||||
extern void objc_protocol_section PARAMS ((void));
|
||||
extern void objc_string_object_section PARAMS ((void));
|
||||
extern void objc_constant_string_object_section PARAMS ((void));
|
||||
extern void objc_class_names_section PARAMS ((void));
|
||||
extern void objc_meth_var_names_section PARAMS ((void));
|
||||
extern void objc_meth_var_types_section PARAMS ((void));
|
||||
extern void objc_cls_refs_section PARAMS ((void));
|
||||
extern void machopic_lazy_symbol_ptr_section PARAMS ((void));
|
||||
extern void machopic_nl_symbol_ptr_section PARAMS ((void));
|
||||
extern void machopic_symbol_stub_section PARAMS ((void));
|
||||
extern void machopic_picsymbol_stub_section PARAMS ((void));
|
||||
extern void machopic_output_stub PARAMS ((FILE *, const char *, const char *));
|
||||
extern void darwin_exception_section PARAMS ((void));
|
||||
extern void darwin_eh_frame_section PARAMS ((void));
|
||||
extern void darwin_globalize_label PARAMS ((FILE *, const char *));
|
||||
extern void darwin_asm_output_dwarf_delta PARAMS ((FILE *, int, const char *, const char *));
|
||||
extern void const_section (void);
|
||||
extern void const_data_section (void);
|
||||
extern void cstring_section (void);
|
||||
extern void literal4_section (void);
|
||||
extern void literal8_section (void);
|
||||
extern void constructor_section (void);
|
||||
extern void mod_init_section (void);
|
||||
extern void mod_term_section (void);
|
||||
extern void destructor_section (void);
|
||||
extern void objc_class_section (void);
|
||||
extern void objc_meta_class_section (void);
|
||||
extern void objc_category_section (void);
|
||||
extern void objc_class_vars_section (void);
|
||||
extern void objc_instance_vars_section (void);
|
||||
extern void objc_cls_meth_section (void);
|
||||
extern void objc_inst_meth_section (void);
|
||||
extern void objc_cat_cls_meth_section (void);
|
||||
extern void objc_cat_inst_meth_section (void);
|
||||
extern void objc_selector_refs_section (void);
|
||||
extern void objc_selector_fixup_section (void);
|
||||
extern void objc_symbols_section (void);
|
||||
extern void objc_module_info_section (void);
|
||||
extern void objc_protocol_section (void);
|
||||
extern void objc_string_object_section (void);
|
||||
extern void objc_constant_string_object_section (void);
|
||||
extern void objc_class_names_section (void);
|
||||
extern void objc_meth_var_names_section (void);
|
||||
extern void objc_meth_var_types_section (void);
|
||||
extern void objc_cls_refs_section (void);
|
||||
extern void machopic_lazy_symbol_ptr_section (void);
|
||||
extern void machopic_nl_symbol_ptr_section (void);
|
||||
extern void machopic_symbol_stub_section (void);
|
||||
extern void machopic_picsymbol_stub_section (void);
|
||||
extern void machopic_output_stub (FILE *, const char *, const char *);
|
||||
extern void darwin_exception_section (void);
|
||||
extern void darwin_eh_frame_section (void);
|
||||
extern void darwin_globalize_label (FILE *, const char *);
|
||||
extern void darwin_asm_output_dwarf_delta (FILE *, int, const char *,
|
||||
const char *);
|
||||
|
|
|
@ -42,13 +42,12 @@ Boston, MA 02111-1307, USA. */
|
|||
#include "langhooks.h"
|
||||
#include "tm_p.h"
|
||||
|
||||
static int machopic_data_defined_p PARAMS ((const char *));
|
||||
static void update_non_lazy_ptrs PARAMS ((const char *));
|
||||
static void update_stubs PARAMS ((const char *));
|
||||
static int machopic_data_defined_p (const char *);
|
||||
static void update_non_lazy_ptrs (const char *);
|
||||
static void update_stubs (const char *);
|
||||
|
||||
int
|
||||
name_needs_quotes (name)
|
||||
const char *name;
|
||||
name_needs_quotes (const char *name)
|
||||
{
|
||||
int c;
|
||||
while ((c = *name++) != '\0')
|
||||
|
@ -57,7 +56,7 @@ name_needs_quotes (name)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* flag_pic = 1 ... generate only indirections
|
||||
* flag_pic = 2 ... generate indirections and pure code
|
||||
*/
|
||||
|
@ -68,20 +67,19 @@ name_needs_quotes (name)
|
|||
static GTY(()) tree machopic_defined_list;
|
||||
|
||||
enum machopic_addr_class
|
||||
machopic_classify_ident (ident)
|
||||
tree ident;
|
||||
machopic_classify_ident (tree ident)
|
||||
{
|
||||
const char *name = IDENTIFIER_POINTER (ident);
|
||||
int lprefix = (((name[0] == '*' || name[0] == '&')
|
||||
&& (name[1] == 'L' || (name[1] == '"' && name[2] == 'L')))
|
||||
|| ( name[0] == '_'
|
||||
&& name[1] == 'O'
|
||||
&& name[2] == 'B'
|
||||
|| ( name[0] == '_'
|
||||
&& name[1] == 'O'
|
||||
&& name[2] == 'B'
|
||||
&& name[3] == 'J'
|
||||
&& name[4] == 'C'
|
||||
&& name[5] == '_'));
|
||||
tree temp;
|
||||
|
||||
|
||||
/* The PIC base symbol is always defined. */
|
||||
if (! strcmp (name, "<pic base>"))
|
||||
return MACHOPIC_DEFINED_DATA;
|
||||
|
@ -146,7 +144,7 @@ machopic_classify_ident (ident)
|
|||
return MACHOPIC_DEFINED_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (name[1] == 't' || name[1] == 'T')
|
||||
{
|
||||
if (lprefix)
|
||||
|
@ -163,17 +161,15 @@ machopic_classify_ident (ident)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
enum machopic_addr_class
|
||||
machopic_classify_name (name)
|
||||
const char *name;
|
||||
machopic_classify_name (const char *name)
|
||||
{
|
||||
return machopic_classify_ident (get_identifier (name));
|
||||
}
|
||||
|
||||
int
|
||||
machopic_ident_defined_p (ident)
|
||||
tree ident;
|
||||
machopic_ident_defined_p (tree ident)
|
||||
{
|
||||
switch (machopic_classify_ident (ident))
|
||||
{
|
||||
|
@ -187,8 +183,7 @@ machopic_ident_defined_p (ident)
|
|||
}
|
||||
|
||||
static int
|
||||
machopic_data_defined_p (name)
|
||||
const char *name;
|
||||
machopic_data_defined_p (const char *name)
|
||||
{
|
||||
switch (machopic_classify_ident (get_identifier (name)))
|
||||
{
|
||||
|
@ -200,24 +195,21 @@ machopic_data_defined_p (name)
|
|||
}
|
||||
|
||||
int
|
||||
machopic_name_defined_p (name)
|
||||
const char *name;
|
||||
machopic_name_defined_p (const char *name)
|
||||
{
|
||||
return machopic_ident_defined_p (get_identifier (name));
|
||||
}
|
||||
|
||||
void
|
||||
machopic_define_ident (ident)
|
||||
tree ident;
|
||||
machopic_define_ident (tree ident)
|
||||
{
|
||||
if (!machopic_ident_defined_p (ident))
|
||||
machopic_defined_list =
|
||||
machopic_defined_list =
|
||||
tree_cons (NULL_TREE, ident, machopic_defined_list);
|
||||
}
|
||||
|
||||
void
|
||||
machopic_define_name (name)
|
||||
const char *name;
|
||||
machopic_define_name (const char *name)
|
||||
{
|
||||
machopic_define_ident (get_identifier (name));
|
||||
}
|
||||
|
@ -225,17 +217,17 @@ machopic_define_name (name)
|
|||
static GTY(()) char * function_base;
|
||||
|
||||
const char *
|
||||
machopic_function_base_name ()
|
||||
machopic_function_base_name (void)
|
||||
{
|
||||
const char *current_name;
|
||||
/* if dynamic-no-pic is on, we should not get here */
|
||||
if (MACHO_DYNAMIC_NO_PIC_P)
|
||||
abort ();
|
||||
current_name =
|
||||
current_name =
|
||||
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl));
|
||||
|
||||
if (function_base == NULL)
|
||||
function_base =
|
||||
function_base =
|
||||
(char *) ggc_alloc_string ("<pic base>", sizeof ("<pic base>"));
|
||||
|
||||
current_function_uses_pic_offset_table = 1;
|
||||
|
@ -254,7 +246,7 @@ machopic_output_function_base_name (FILE *file)
|
|||
/* If dynamic-no-pic is on, we should not get here. */
|
||||
if (MACHO_DYNAMIC_NO_PIC_P)
|
||||
abort ();
|
||||
current_name =
|
||||
current_name =
|
||||
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl));
|
||||
if (function_base_func_name != current_name)
|
||||
{
|
||||
|
@ -270,15 +262,14 @@ static GTY(()) tree machopic_non_lazy_pointers;
|
|||
either by finding it in our list of pointer names, or by generating
|
||||
a new one. */
|
||||
|
||||
const char *
|
||||
machopic_non_lazy_ptr_name (name)
|
||||
const char *name;
|
||||
const char *
|
||||
machopic_non_lazy_ptr_name (const char *name)
|
||||
{
|
||||
const char *temp_name;
|
||||
tree temp, ident = get_identifier (name);
|
||||
|
||||
|
||||
for (temp = machopic_non_lazy_pointers;
|
||||
temp != NULL_TREE;
|
||||
temp != NULL_TREE;
|
||||
temp = TREE_CHAIN (temp))
|
||||
{
|
||||
if (ident == TREE_VALUE (temp))
|
||||
|
@ -289,7 +280,7 @@ machopic_non_lazy_ptr_name (name)
|
|||
|
||||
/* Try again, but comparing names this time. */
|
||||
for (temp = machopic_non_lazy_pointers;
|
||||
temp != NULL_TREE;
|
||||
temp != NULL_TREE;
|
||||
temp = TREE_CHAIN (temp))
|
||||
{
|
||||
if (TREE_VALUE (temp))
|
||||
|
@ -315,11 +306,11 @@ machopic_non_lazy_ptr_name (name)
|
|||
strcat (buffer, "_");
|
||||
strcat (buffer, name);
|
||||
}
|
||||
|
||||
|
||||
strcat (buffer, "$non_lazy_ptr");
|
||||
ptr_name = get_identifier (buffer);
|
||||
|
||||
machopic_non_lazy_pointers
|
||||
machopic_non_lazy_pointers
|
||||
= tree_cons (ptr_name, ident, machopic_non_lazy_pointers);
|
||||
|
||||
TREE_USED (machopic_non_lazy_pointers) = 0;
|
||||
|
@ -333,15 +324,14 @@ static GTY(()) tree machopic_stubs;
|
|||
/* Return the name of the stub corresponding to the given name,
|
||||
generating a new stub name if necessary. */
|
||||
|
||||
const char *
|
||||
machopic_stub_name (name)
|
||||
const char *name;
|
||||
const char *
|
||||
machopic_stub_name (const char *name)
|
||||
{
|
||||
tree temp, ident = get_identifier (name);
|
||||
const char *tname;
|
||||
|
||||
for (temp = machopic_stubs;
|
||||
temp != NULL_TREE;
|
||||
temp != NULL_TREE;
|
||||
temp = TREE_CHAIN (temp))
|
||||
{
|
||||
if (ident == TREE_VALUE (temp))
|
||||
|
@ -394,9 +384,7 @@ machopic_stub_name (name)
|
|||
}
|
||||
|
||||
void
|
||||
machopic_validate_stub_or_non_lazy_ptr (name, validate_stub)
|
||||
const char *name;
|
||||
int validate_stub;
|
||||
machopic_validate_stub_or_non_lazy_ptr (const char *name, int validate_stub)
|
||||
{
|
||||
const char *real_name;
|
||||
tree temp, ident = get_identifier (name), id2;
|
||||
|
@ -423,11 +411,10 @@ machopic_validate_stub_or_non_lazy_ptr (name, validate_stub)
|
|||
source using indirections. */
|
||||
|
||||
rtx
|
||||
machopic_indirect_data_reference (orig, reg)
|
||||
rtx orig, reg;
|
||||
machopic_indirect_data_reference (rtx orig, rtx reg)
|
||||
{
|
||||
rtx ptr_ref = orig;
|
||||
|
||||
|
||||
if (! MACHOPIC_INDIRECT)
|
||||
return orig;
|
||||
|
||||
|
@ -440,7 +427,7 @@ machopic_indirect_data_reference (orig, reg)
|
|||
if (defined && MACHO_DYNAMIC_NO_PIC_P)
|
||||
{
|
||||
#if defined (TARGET_TOC)
|
||||
emit_insn (gen_macho_high (reg, orig));
|
||||
emit_insn (gen_macho_high (reg, orig));
|
||||
emit_insn (gen_macho_low (reg, reg, orig));
|
||||
#else
|
||||
/* some other cpu -- writeme! */
|
||||
|
@ -451,7 +438,7 @@ machopic_indirect_data_reference (orig, reg)
|
|||
else if (defined)
|
||||
{
|
||||
#if defined (TARGET_TOC) || defined (HAVE_lo_sum)
|
||||
rtx pic_base = gen_rtx (SYMBOL_REF, Pmode,
|
||||
rtx pic_base = gen_rtx (SYMBOL_REF, Pmode,
|
||||
machopic_function_base_name ());
|
||||
rtx offset = gen_rtx (CONST, Pmode,
|
||||
gen_rtx (MINUS, Pmode, orig, pic_base));
|
||||
|
@ -507,7 +494,7 @@ machopic_indirect_data_reference (orig, reg)
|
|||
orig = machopic_indirect_data_reference (XEXP (XEXP (orig, 0), 1),
|
||||
(base == reg ? 0 : reg));
|
||||
}
|
||||
else
|
||||
else
|
||||
return orig;
|
||||
|
||||
if (MACHOPIC_PURE && GET_CODE (orig) == CONST_INT)
|
||||
|
@ -557,14 +544,13 @@ machopic_indirect_data_reference (orig, reg)
|
|||
corresponding symbol_stub if necessary. Return a new MEM. */
|
||||
|
||||
rtx
|
||||
machopic_indirect_call_target (target)
|
||||
rtx target;
|
||||
machopic_indirect_call_target (rtx target)
|
||||
{
|
||||
if (GET_CODE (target) != MEM)
|
||||
return target;
|
||||
|
||||
if (MACHOPIC_INDIRECT && GET_CODE (XEXP (target, 0)) == SYMBOL_REF)
|
||||
{
|
||||
{
|
||||
enum machine_mode mode = GET_MODE (XEXP (target, 0));
|
||||
const char *name = XSTR (XEXP (target, 0), 0);
|
||||
|
||||
|
@ -578,16 +564,14 @@ machopic_indirect_call_target (target)
|
|||
|
||||
XEXP (target, 0) = gen_rtx (SYMBOL_REF, mode, stub_name);
|
||||
RTX_UNCHANGING_P (target) = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
rtx
|
||||
machopic_legitimize_pic_address (orig, mode, reg)
|
||||
rtx orig, reg;
|
||||
enum machine_mode mode;
|
||||
machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
|
||||
{
|
||||
rtx pic_ref = orig;
|
||||
|
||||
|
@ -604,7 +588,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
|
||||
orig = machopic_indirect_data_reference (orig, reg);
|
||||
|
||||
if (GET_CODE (orig) == PLUS
|
||||
if (GET_CODE (orig) == PLUS
|
||||
&& GET_CODE (XEXP (orig, 0)) == REG)
|
||||
{
|
||||
if (reg == 0)
|
||||
|
@ -612,7 +596,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
|
||||
emit_move_insn (reg, orig);
|
||||
return reg;
|
||||
}
|
||||
}
|
||||
|
||||
/* if dynamic-no-pic then use 0 as the pic base */
|
||||
if (MACHO_DYNAMIC_NO_PIC_P)
|
||||
|
@ -629,7 +613,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
else
|
||||
reg = gen_reg_rtx (Pmode);
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_lo_sum
|
||||
if (MACHO_DYNAMIC_NO_PIC_P
|
||||
&& (GET_CODE (XEXP (orig, 0)) == SYMBOL_REF
|
||||
|
@ -652,7 +636,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
pic_ref = reg;
|
||||
}
|
||||
else
|
||||
if (GET_CODE (XEXP (orig, 0)) == SYMBOL_REF
|
||||
if (GET_CODE (XEXP (orig, 0)) == SYMBOL_REF
|
||||
|| GET_CODE (XEXP (orig, 0)) == LABEL_REF)
|
||||
{
|
||||
rtx offset = gen_rtx (CONST, Pmode,
|
||||
|
@ -670,7 +654,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
gen_rtx (HIGH, Pmode, offset))));
|
||||
emit_insn (gen_rtx (SET, VOIDmode, reg,
|
||||
gen_rtx (MEM, GET_MODE (orig),
|
||||
gen_rtx (LO_SUM, Pmode,
|
||||
gen_rtx (LO_SUM, Pmode,
|
||||
hi_sum_reg, offset))));
|
||||
pic_ref = reg;
|
||||
|
||||
|
@ -679,10 +663,10 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM)));
|
||||
|
||||
emit_insn (gen_rtx (SET, VOIDmode, reg,
|
||||
gen_rtx (HIGH, Pmode,
|
||||
gen_rtx (HIGH, Pmode,
|
||||
gen_rtx (CONST, Pmode, offset))));
|
||||
emit_insn (gen_rtx (SET, VOIDmode, reg,
|
||||
gen_rtx (LO_SUM, Pmode, reg,
|
||||
gen_rtx (LO_SUM, Pmode, reg,
|
||||
gen_rtx (CONST, Pmode, offset))));
|
||||
pic_ref = gen_rtx (PLUS, Pmode,
|
||||
pic_offset_table_rtx, reg);
|
||||
|
@ -703,13 +687,13 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
#endif
|
||||
|
||||
pic_ref = gen_rtx (PLUS, Pmode,
|
||||
pic,
|
||||
gen_rtx (CONST, Pmode,
|
||||
pic,
|
||||
gen_rtx (CONST, Pmode,
|
||||
gen_rtx (MINUS, Pmode,
|
||||
XEXP (orig, 0),
|
||||
XEXP (orig, 0),
|
||||
pic_base)));
|
||||
}
|
||||
|
||||
|
||||
#if !defined (TARGET_TOC)
|
||||
emit_move_insn (reg, pic_ref);
|
||||
pic_ref = gen_rtx (MEM, GET_MODE (orig), reg);
|
||||
|
@ -720,7 +704,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
{
|
||||
|
||||
#ifdef HAVE_lo_sum
|
||||
if (GET_CODE (orig) == SYMBOL_REF
|
||||
if (GET_CODE (orig) == SYMBOL_REF
|
||||
|| GET_CODE (orig) == LABEL_REF)
|
||||
{
|
||||
rtx offset = gen_rtx (CONST, Pmode,
|
||||
|
@ -735,7 +719,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
else
|
||||
reg = gen_reg_rtx (SImode);
|
||||
}
|
||||
|
||||
|
||||
hi_sum_reg = reg;
|
||||
|
||||
emit_insn (gen_rtx (SET, Pmode, hi_sum_reg,
|
||||
|
@ -780,7 +764,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
#endif
|
||||
pic_ref = gen_rtx (PLUS, Pmode,
|
||||
pic,
|
||||
gen_rtx (CONST, Pmode,
|
||||
gen_rtx (CONST, Pmode,
|
||||
gen_rtx (MINUS, Pmode,
|
||||
orig, pic_base)));
|
||||
}
|
||||
|
@ -814,7 +798,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
|| GET_CODE (XEXP (orig, 0)) == LABEL_REF)
|
||||
&& XEXP (orig, 0) != pic_offset_table_rtx
|
||||
&& GET_CODE (XEXP (orig, 1)) != REG)
|
||||
|
||||
|
||||
{
|
||||
rtx base;
|
||||
int is_complex = (GET_CODE (XEXP (orig, 0)) == MEM);
|
||||
|
@ -862,8 +846,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|
|||
|
||||
|
||||
void
|
||||
machopic_finish (asm_out_file)
|
||||
FILE *asm_out_file;
|
||||
machopic_finish (FILE *asm_out_file)
|
||||
{
|
||||
tree temp;
|
||||
|
||||
|
@ -889,7 +872,7 @@ machopic_finish (asm_out_file)
|
|||
if (sym_name[0] == '*' || sym_name[0] == '&')
|
||||
strcpy (sym, sym_name + 1);
|
||||
else if (sym_name[0] == '-' || sym_name[0] == '+')
|
||||
strcpy (sym, sym_name);
|
||||
strcpy (sym, sym_name);
|
||||
else
|
||||
sym[0] = '_', strcpy (sym + 1, sym_name);
|
||||
|
||||
|
@ -903,7 +886,7 @@ machopic_finish (asm_out_file)
|
|||
}
|
||||
|
||||
for (temp = machopic_non_lazy_pointers;
|
||||
temp != NULL_TREE;
|
||||
temp != NULL_TREE;
|
||||
temp = TREE_CHAIN (temp))
|
||||
{
|
||||
const char *const sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
|
||||
|
@ -924,11 +907,11 @@ machopic_finish (asm_out_file)
|
|||
else
|
||||
{
|
||||
machopic_nl_symbol_ptr_section ();
|
||||
assemble_name (asm_out_file, lazy_name);
|
||||
assemble_name (asm_out_file, lazy_name);
|
||||
fprintf (asm_out_file, ":\n");
|
||||
|
||||
fprintf (asm_out_file, "\t.indirect_symbol ");
|
||||
assemble_name (asm_out_file, sym_name);
|
||||
assemble_name (asm_out_file, sym_name);
|
||||
fprintf (asm_out_file, "\n");
|
||||
|
||||
assemble_integer (const0_rtx, GET_MODE_SIZE (Pmode),
|
||||
|
@ -937,9 +920,8 @@ machopic_finish (asm_out_file)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
machopic_operand_p (op)
|
||||
rtx op;
|
||||
int
|
||||
machopic_operand_p (rtx op)
|
||||
{
|
||||
if (MACHOPIC_JUST_INDIRECT)
|
||||
{
|
||||
|
@ -970,10 +952,7 @@ machopic_operand_p (op)
|
|||
use later. */
|
||||
|
||||
void
|
||||
darwin_encode_section_info (decl, rtl, first)
|
||||
tree decl;
|
||||
rtx rtl;
|
||||
int first ATTRIBUTE_UNUSED;
|
||||
darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char code = '\0';
|
||||
int defined = 0;
|
||||
|
@ -1043,8 +1022,7 @@ darwin_encode_section_info (decl, rtl, first)
|
|||
/* Undo the effects of the above. */
|
||||
|
||||
const char *
|
||||
darwin_strip_name_encoding (str)
|
||||
const char *str;
|
||||
darwin_strip_name_encoding (const char *str)
|
||||
{
|
||||
return str[0] == '!' ? str + 4 : str;
|
||||
}
|
||||
|
@ -1053,8 +1031,7 @@ darwin_strip_name_encoding (str)
|
|||
stripped name matches the argument. */
|
||||
|
||||
static void
|
||||
update_non_lazy_ptrs (name)
|
||||
const char *name;
|
||||
update_non_lazy_ptrs (const char *name)
|
||||
{
|
||||
const char *name1, *name2;
|
||||
tree temp;
|
||||
|
@ -1062,7 +1039,7 @@ update_non_lazy_ptrs (name)
|
|||
name1 = darwin_strip_name_encoding (name);
|
||||
|
||||
for (temp = machopic_non_lazy_pointers;
|
||||
temp != NULL_TREE;
|
||||
temp != NULL_TREE;
|
||||
temp = TREE_CHAIN (temp))
|
||||
{
|
||||
const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
|
||||
|
@ -1073,7 +1050,7 @@ update_non_lazy_ptrs (name)
|
|||
if (strcmp (name1, name2) == 0)
|
||||
{
|
||||
/* FIXME: This breaks the identifier hash table. */
|
||||
IDENTIFIER_NODE_CHECK (TREE_VALUE (temp))->identifier.id.str
|
||||
IDENTIFIER_NODE_CHECK (TREE_VALUE (temp))->identifier.id.str
|
||||
= (unsigned char *) name;
|
||||
break;
|
||||
}
|
||||
|
@ -1086,9 +1063,7 @@ update_non_lazy_ptrs (name)
|
|||
just emit the stub label now and we don't bother emitting the stub later. */
|
||||
|
||||
void
|
||||
machopic_output_possible_stub_label (file, name)
|
||||
FILE *file;
|
||||
const char *name;
|
||||
machopic_output_possible_stub_label (FILE *file, const char *name)
|
||||
{
|
||||
tree temp;
|
||||
|
||||
|
@ -1119,8 +1094,7 @@ machopic_output_possible_stub_label (file, name)
|
|||
stripped name matches the argument. */
|
||||
|
||||
static void
|
||||
update_stubs (name)
|
||||
const char *name;
|
||||
update_stubs (const char *name)
|
||||
{
|
||||
const char *name1, *name2;
|
||||
tree temp;
|
||||
|
@ -1128,7 +1102,7 @@ update_stubs (name)
|
|||
name1 = darwin_strip_name_encoding (name);
|
||||
|
||||
for (temp = machopic_stubs;
|
||||
temp != NULL_TREE;
|
||||
temp != NULL_TREE;
|
||||
temp = TREE_CHAIN (temp))
|
||||
{
|
||||
const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
|
||||
|
@ -1139,7 +1113,7 @@ update_stubs (name)
|
|||
if (strcmp (name1, name2) == 0)
|
||||
{
|
||||
/* FIXME: This breaks the identifier hash table. */
|
||||
IDENTIFIER_NODE_CHECK (TREE_VALUE (temp))->identifier.id.str
|
||||
IDENTIFIER_NODE_CHECK (TREE_VALUE (temp))->identifier.id.str
|
||||
= (unsigned char *) name;
|
||||
break;
|
||||
}
|
||||
|
@ -1148,22 +1122,20 @@ update_stubs (name)
|
|||
}
|
||||
|
||||
void
|
||||
machopic_select_section (exp, reloc, align)
|
||||
tree exp;
|
||||
int reloc;
|
||||
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
|
||||
machopic_select_section (tree exp, int reloc,
|
||||
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
|
||||
{
|
||||
void (*base_function)(void);
|
||||
|
||||
|
||||
if (decl_readonly_section_1 (exp, reloc, MACHOPIC_INDIRECT))
|
||||
base_function = readonly_data_section;
|
||||
else if (TREE_READONLY (exp) || TREE_CONSTANT (exp))
|
||||
base_function = const_data_section;
|
||||
else
|
||||
base_function = data_section;
|
||||
|
||||
|
||||
if (TREE_CODE (exp) == STRING_CST
|
||||
&& ((size_t) TREE_STRING_LENGTH (exp)
|
||||
&& ((size_t) TREE_STRING_LENGTH (exp)
|
||||
== strlen (TREE_STRING_POINTER (exp)) + 1)
|
||||
&& ! flag_writable_strings)
|
||||
cstring_section ();
|
||||
|
@ -1261,10 +1233,8 @@ machopic_select_section (exp, reloc, align)
|
|||
They must go in "const". */
|
||||
|
||||
void
|
||||
machopic_select_rtx_section (mode, x, align)
|
||||
enum machine_mode mode;
|
||||
rtx x;
|
||||
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
|
||||
machopic_select_rtx_section (enum machine_mode mode, rtx x,
|
||||
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (GET_MODE_SIZE (mode) == 8)
|
||||
literal8_section ();
|
||||
|
@ -1277,11 +1247,9 @@ machopic_select_rtx_section (mode, x, align)
|
|||
}
|
||||
|
||||
void
|
||||
machopic_asm_out_constructor (symbol, priority)
|
||||
rtx symbol;
|
||||
int priority ATTRIBUTE_UNUSED;
|
||||
machopic_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
||||
|
||||
if (MACHOPIC_INDIRECT)
|
||||
mod_init_section ();
|
||||
else
|
||||
|
@ -1289,17 +1257,15 @@ machopic_asm_out_constructor (symbol, priority)
|
|||
assemble_align (POINTER_SIZE);
|
||||
assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
|
||||
|
||||
|
||||
|
||||
if (! MACHOPIC_INDIRECT)
|
||||
fprintf (asm_out_file, ".reference .constructors_used\n");
|
||||
}
|
||||
|
||||
void
|
||||
machopic_asm_out_destructor (symbol, priority)
|
||||
rtx symbol;
|
||||
int priority ATTRIBUTE_UNUSED;
|
||||
machopic_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
||||
|
||||
if (MACHOPIC_INDIRECT)
|
||||
mod_term_section ();
|
||||
else
|
||||
|
@ -1312,9 +1278,7 @@ machopic_asm_out_destructor (symbol, priority)
|
|||
}
|
||||
|
||||
void
|
||||
darwin_globalize_label (stream, name)
|
||||
FILE *stream;
|
||||
const char *name;
|
||||
darwin_globalize_label (FILE *stream, const char *name)
|
||||
{
|
||||
if (!!strncmp (name, "_OBJC_", 6))
|
||||
default_globalize_label (stream, name);
|
||||
|
@ -1330,10 +1294,8 @@ darwin_globalize_label (stream, name)
|
|||
static int darwin_dwarf_label_counter;
|
||||
|
||||
void
|
||||
darwin_asm_output_dwarf_delta (file, size, lab1, lab2)
|
||||
FILE *file;
|
||||
int size ATTRIBUTE_UNUSED;
|
||||
const char *lab1, *lab2;
|
||||
darwin_asm_output_dwarf_delta (FILE *file, int size ATTRIBUTE_UNUSED,
|
||||
const char *lab1, const char *lab2)
|
||||
{
|
||||
const char *p = lab1 + (lab1[0] == '*');
|
||||
int islocaldiff = (p[0] == 'L');
|
||||
|
@ -1350,7 +1312,7 @@ darwin_asm_output_dwarf_delta (file, size, lab1, lab2)
|
|||
}
|
||||
|
||||
void
|
||||
darwin_file_end ()
|
||||
darwin_file_end (void)
|
||||
{
|
||||
machopic_finish (asm_out_file);
|
||||
if (strcmp (lang_hooks.name, "GNU C++") == 0)
|
||||
|
@ -1362,4 +1324,3 @@ darwin_file_end ()
|
|||
}
|
||||
|
||||
#include "gt-darwin.h"
|
||||
|
||||
|
|
|
@ -368,7 +368,7 @@ do { text_section (); \
|
|||
|| DECL_INITIAL (DECL)) \
|
||||
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
|
||||
ASM_OUTPUT_LABEL (FILE, xname); \
|
||||
/* Darwin doesn't support zero-size objects, so give them a \
|
||||
/* Darwin doesn't support zero-size objects, so give them a \
|
||||
byte. */ \
|
||||
if (tree_low_cst (DECL_SIZE_UNIT (DECL), 1) == 0) \
|
||||
assemble_zeros (1); \
|
||||
|
@ -478,9 +478,9 @@ do { text_section (); \
|
|||
|
||||
#undef SECTION_FUNCTION
|
||||
#define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, OBJC) \
|
||||
extern void FUNCTION PARAMS ((void)); \
|
||||
extern void FUNCTION (void); \
|
||||
void \
|
||||
FUNCTION () \
|
||||
FUNCTION (void) \
|
||||
{ \
|
||||
if (in_section != SECTION) \
|
||||
{ \
|
||||
|
@ -509,7 +509,7 @@ FUNCTION () \
|
|||
in_objc_protocol, in_objc_string_object, \
|
||||
in_objc_constant_string_object, \
|
||||
in_objc_class_names, in_objc_meth_var_names, \
|
||||
in_objc_meth_var_types, in_objc_cls_refs, \
|
||||
in_objc_meth_var_types, in_objc_cls_refs, \
|
||||
in_machopic_nl_symbol_ptr, \
|
||||
in_machopic_lazy_symbol_ptr, \
|
||||
in_machopic_symbol_stub, \
|
||||
|
@ -521,7 +521,7 @@ FUNCTION () \
|
|||
|
||||
#undef EXTRA_SECTION_FUNCTIONS
|
||||
#define EXTRA_SECTION_FUNCTIONS \
|
||||
static void objc_section_init PARAMS ((void)); \
|
||||
static void objc_section_init (void); \
|
||||
SECTION_FUNCTION (const_section, \
|
||||
in_const, \
|
||||
".const", 0) \
|
||||
|
@ -612,19 +612,19 @@ SECTION_FUNCTION (objc_cls_refs_section, \
|
|||
\
|
||||
SECTION_FUNCTION (machopic_lazy_symbol_ptr_section, \
|
||||
in_machopic_lazy_symbol_ptr, \
|
||||
".lazy_symbol_pointer", 0) \
|
||||
".lazy_symbol_pointer", 0) \
|
||||
SECTION_FUNCTION (machopic_nl_symbol_ptr_section, \
|
||||
in_machopic_nl_symbol_ptr, \
|
||||
".non_lazy_symbol_pointer", 0) \
|
||||
".non_lazy_symbol_pointer", 0) \
|
||||
SECTION_FUNCTION (machopic_symbol_stub_section, \
|
||||
in_machopic_symbol_stub, \
|
||||
".symbol_stub", 0) \
|
||||
".symbol_stub", 0) \
|
||||
SECTION_FUNCTION (machopic_symbol_stub1_section, \
|
||||
in_machopic_symbol_stub1, \
|
||||
".section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16", 0)\
|
||||
SECTION_FUNCTION (machopic_picsymbol_stub_section, \
|
||||
in_machopic_picsymbol_stub, \
|
||||
".picsymbol_stub", 0) \
|
||||
".picsymbol_stub", 0) \
|
||||
SECTION_FUNCTION (machopic_picsymbol_stub1_section, \
|
||||
in_machopic_picsymbol_stub1, \
|
||||
".section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32", 0)\
|
||||
|
@ -636,7 +636,7 @@ SECTION_FUNCTION (darwin_eh_frame_section, \
|
|||
".section __TEXT,__eh_frame", 0) \
|
||||
\
|
||||
static void \
|
||||
objc_section_init () \
|
||||
objc_section_init (void) \
|
||||
{ \
|
||||
static int been_here = 0; \
|
||||
\
|
||||
|
@ -653,7 +653,7 @@ objc_section_init () \
|
|||
objc_cls_refs_section (); \
|
||||
objc_class_section (); \
|
||||
objc_meta_class_section (); \
|
||||
/* shared, hot -> cold */ \
|
||||
/* shared, hot -> cold */ \
|
||||
objc_cls_meth_section (); \
|
||||
objc_inst_meth_section (); \
|
||||
objc_protocol_section (); \
|
||||
|
@ -676,7 +676,7 @@ objc_section_init () \
|
|||
#define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section
|
||||
|
||||
#define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \
|
||||
do { \
|
||||
do { \
|
||||
if (FILE) { \
|
||||
if (MACHOPIC_INDIRECT) \
|
||||
fprintf (FILE, "\t.lazy_reference "); \
|
||||
|
@ -691,7 +691,7 @@ objc_section_init () \
|
|||
do { \
|
||||
if (FILE) { \
|
||||
fprintf (FILE, "\t"); \
|
||||
assemble_name (FILE, NAME); \
|
||||
assemble_name (FILE, NAME); \
|
||||
fprintf (FILE, "=0\n"); \
|
||||
(*targetm.asm_out.globalize_label) (FILE, NAME); \
|
||||
} \
|
||||
|
@ -793,7 +793,7 @@ enum machopic_addr_class {
|
|||
#define TARGET_ASM_EXCEPTION_SECTION darwin_exception_section
|
||||
|
||||
#define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section
|
||||
|
||||
|
||||
#undef ASM_PREFERRED_EH_DATA_FORMAT
|
||||
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
|
||||
(((CODE) == 2 && (GLOBAL) == 1) \
|
||||
|
|
|
@ -45,7 +45,7 @@ Boston, MA 02111-1307, USA. */
|
|||
{ "console", 0, N_("Create console application") },\
|
||||
{ "dll", 0, N_("Generate code for a DLL") }, \
|
||||
{ "nop-fun-dllimport", MASK_NOP_FUN_DLLIMPORT, \
|
||||
N_("Ignore dllimport for functions") }, \
|
||||
N_("Ignore dllimport for functions") }, \
|
||||
{ "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" }, \
|
||||
{ "threads", 0, N_("Use Mingw-specific thread support") },
|
||||
|
||||
|
@ -94,7 +94,7 @@ Boston, MA 02111-1307, USA. */
|
|||
Do not define this macro if it does not need to do anything. */
|
||||
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "mingw_include_path", DEFAULT_TARGET_MACHINE }
|
||||
|
||||
#undef MATH_LIBRARY
|
||||
|
@ -130,7 +130,7 @@ drectve_section () \
|
|||
in_section = in_drectve; \
|
||||
} \
|
||||
}
|
||||
void drectve_section PARAMS ((void));
|
||||
void drectve_section (void);
|
||||
|
||||
/* Switch to SECTION (an `enum in_section').
|
||||
|
||||
|
@ -138,21 +138,19 @@ void drectve_section PARAMS ((void));
|
|||
The problem is that we want to temporarily switch sections in
|
||||
ASM_DECLARE_OBJECT_NAME and then switch back to the original section
|
||||
afterwards. */
|
||||
#define SWITCH_TO_SECTION_FUNCTION \
|
||||
void switch_to_section PARAMS ((enum in_section, tree)); \
|
||||
void \
|
||||
switch_to_section (section, decl) \
|
||||
enum in_section section; \
|
||||
tree decl; \
|
||||
{ \
|
||||
switch (section) \
|
||||
{ \
|
||||
case in_text: text_section (); break; \
|
||||
case in_data: data_section (); break; \
|
||||
case in_named: named_section (decl, NULL, 0); break; \
|
||||
case in_drectve: drectve_section (); break; \
|
||||
default: abort (); break; \
|
||||
} \
|
||||
#define SWITCH_TO_SECTION_FUNCTION \
|
||||
void switch_to_section (enum in_section, tree); \
|
||||
void \
|
||||
switch_to_section (enum in_section section, tree decl) \
|
||||
{ \
|
||||
switch (section) \
|
||||
{ \
|
||||
case in_text: text_section (); break; \
|
||||
case in_data: data_section (); break; \
|
||||
case in_named: named_section (decl, NULL, 0); break; \
|
||||
case in_drectve: drectve_section (); break; \
|
||||
default: abort (); break; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Don't allow flag_pic to propagate since gas may produce invalid code
|
||||
|
@ -173,15 +171,15 @@ do { \
|
|||
differently depending on something about the variable or
|
||||
function named by the symbol (such as what section it is in).
|
||||
|
||||
On i386 running Windows NT, modify the assembler name with a suffix
|
||||
On i386 running Windows NT, modify the assembler name with a suffix
|
||||
consisting of an atsign (@) followed by string of digits that represents
|
||||
the number of bytes of arguments passed to the function, if it has the
|
||||
the number of bytes of arguments passed to the function, if it has the
|
||||
attribute STDCALL.
|
||||
|
||||
In addition, we must mark dll symbols specially. Definitions of
|
||||
dllexport'd objects install some info in the .drectve section.
|
||||
In addition, we must mark dll symbols specially. Definitions of
|
||||
dllexport'd objects install some info in the .drectve section.
|
||||
References to dllimport'd objects are fetched indirectly via
|
||||
_imp__. If both are declared, dllexport overrides. This is also
|
||||
_imp__. If both are declared, dllexport overrides. This is also
|
||||
needed to implement one-only vtables: they go into their own
|
||||
section and we need to set DECL_SECTION_NAME so we do that here.
|
||||
Note that we can be called twice on the same decl. */
|
||||
|
@ -203,7 +201,7 @@ do { \
|
|||
i386_pe_record_exported_symbol (NAME, 1); \
|
||||
if (! i386_pe_dllimport_name_p (NAME)) \
|
||||
{ \
|
||||
fprintf ((STREAM), "\t.comm\t"); \
|
||||
fprintf ((STREAM), "\t.comm\t"); \
|
||||
assemble_name ((STREAM), (NAME)); \
|
||||
fprintf ((STREAM), ", %d\t%s %d\n", \
|
||||
(int)(ROUNDED), ASM_COMMENT_START, (int)(SIZE)); \
|
||||
|
@ -212,7 +210,7 @@ do { \
|
|||
|
||||
/* Output the label for an initialized variable. */
|
||||
#undef ASM_DECLARE_OBJECT_NAME
|
||||
#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
|
||||
#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
|
||||
do { \
|
||||
if (i386_pe_dllexport_name_p (NAME)) \
|
||||
i386_pe_record_exported_symbol (NAME, 1); \
|
||||
|
@ -248,7 +246,7 @@ do { \
|
|||
symbols must be explicitly imported from shared libraries (DLLs). */
|
||||
#define MULTIPLE_SYMBOL_SPACES
|
||||
|
||||
extern void i386_pe_unique_section PARAMS ((TREE, int));
|
||||
extern void i386_pe_unique_section (TREE, int);
|
||||
#define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section
|
||||
|
||||
#define SUPPORTS_ONE_ONLY 1
|
||||
|
@ -328,12 +326,12 @@ extern void i386_pe_unique_section PARAMS ((TREE, int));
|
|||
|
||||
/* External function declarations. */
|
||||
|
||||
extern void i386_pe_record_external_function PARAMS ((const char *));
|
||||
extern void i386_pe_declare_function_type PARAMS ((FILE *, const char *, int));
|
||||
extern void i386_pe_record_exported_symbol PARAMS ((const char *, int));
|
||||
extern void i386_pe_file_end PARAMS ((void));
|
||||
extern int i386_pe_dllexport_name_p PARAMS ((const char *));
|
||||
extern int i386_pe_dllimport_name_p PARAMS ((const char *));
|
||||
extern void i386_pe_record_external_function (const char *);
|
||||
extern void i386_pe_declare_function_type (FILE *, const char *, int);
|
||||
extern void i386_pe_record_exported_symbol (const char *, int);
|
||||
extern void i386_pe_file_end (void);
|
||||
extern int i386_pe_dllexport_name_p (const char *);
|
||||
extern int i386_pe_dllimport_name_p (const char *);
|
||||
|
||||
/* For Win32 ABI compatibility */
|
||||
#undef DEFAULT_PCC_STRUCT_RETURN
|
||||
|
|
|
@ -20,7 +20,7 @@ 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. */
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (x86 Cygwin)");
|
||||
#define TARGET_VERSION fprintf (stderr, " (x86 Cygwin)");
|
||||
|
||||
#define EXTRA_OS_CPP_BUILTINS() /* Nothing. */
|
||||
|
||||
|
@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
#ifndef CYGWIN_MINGW_SUBDIR
|
||||
#define CYGWIN_MINGW_SUBDIR "/mingw"
|
||||
#endif
|
||||
#endif
|
||||
#define CYGWIN_MINGW_SUBDIR_LEN (sizeof (CYGWIN_MINGW_SUBDIR) - 1)
|
||||
|
||||
#ifdef GPLUSPLUS_INCLUDE_DIR
|
||||
|
@ -199,7 +199,7 @@ char *cvt_to_mingw[] =
|
|||
#undef GEN_CVT_ARRAY
|
||||
#endif /*GEN_CVT_ARRAY*/
|
||||
|
||||
void mingw_scan PARAMS ((int, const char * const *, char **));
|
||||
void mingw_scan (int, const char * const *, char **);
|
||||
#if 1
|
||||
#define GCC_DRIVER_HOST_INITIALIZATION \
|
||||
do \
|
||||
|
|
|
@ -28,13 +28,13 @@ Boston, MA 02111-1307, USA. */
|
|||
#include <string.h>
|
||||
|
||||
/*
|
||||
static void remove_w32api PARAMS ((void));
|
||||
static void remove_w32api (void);
|
||||
*/
|
||||
static void add_mingw PARAMS ((void));
|
||||
static void set_mingw PARAMS((void)) __attribute__ ((constructor));
|
||||
static void add_mingw (void);
|
||||
static void set_mingw (void) __attribute__ ((constructor));
|
||||
|
||||
static void
|
||||
add_mingw ()
|
||||
add_mingw (void)
|
||||
{
|
||||
char **av;
|
||||
char *p;
|
||||
|
@ -59,7 +59,7 @@ add_mingw ()
|
|||
|
||||
|
||||
static void
|
||||
set_mingw ()
|
||||
set_mingw (void)
|
||||
{
|
||||
char *env = getenv ("GCC_CYGWIN_MINGW");
|
||||
if (env && *env == '1')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Target definitions for GNU compiler for Intel 80386 running Interix
|
||||
Parts Copyright (C) 1991, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
Parts Copyright (C) 1991, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
Parts:
|
||||
by Douglas B. Rupp (drupp@cs.washington.edu).
|
||||
|
@ -341,7 +341,7 @@ while (0)
|
|||
symbols must be explicitly imported from shared libraries (DLLs). */
|
||||
#define MULTIPLE_SYMBOL_SPACES
|
||||
|
||||
extern void i386_pe_unique_section PARAMS ((tree, int));
|
||||
extern void i386_pe_unique_section (tree, int);
|
||||
#define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section
|
||||
|
||||
#define SUPPORTS_ONE_ONLY 1
|
||||
|
|
|
@ -46,13 +46,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||
multiple times.
|
||||
*/
|
||||
|
||||
static tree associated_type PARAMS ((tree));
|
||||
const char * gen_stdcall_suffix PARAMS ((tree));
|
||||
const char * gen_fastcall_suffix PARAMS ((tree));
|
||||
int i386_pe_dllexport_p PARAMS ((tree));
|
||||
int i386_pe_dllimport_p PARAMS ((tree));
|
||||
void i386_pe_mark_dllexport PARAMS ((tree));
|
||||
void i386_pe_mark_dllimport PARAMS ((tree));
|
||||
static tree associated_type (tree);
|
||||
const char * gen_stdcall_suffix (tree);
|
||||
const char * gen_fastcall_suffix (tree);
|
||||
int i386_pe_dllexport_p (tree);
|
||||
int i386_pe_dllimport_p (tree);
|
||||
void i386_pe_mark_dllexport (tree);
|
||||
void i386_pe_mark_dllimport (tree);
|
||||
|
||||
/* This is we how mark internal identifiers with dllimport or dllexport
|
||||
attributes. */
|
||||
|
@ -66,12 +66,8 @@ void i386_pe_mark_dllimport PARAMS ((tree));
|
|||
/* Handle a "dllimport" or "dllexport" attribute;
|
||||
arguments as in struct attribute_spec.handler. */
|
||||
tree
|
||||
ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs)
|
||||
tree * pnode;
|
||||
tree name;
|
||||
tree args;
|
||||
int flags;
|
||||
bool *no_add_attrs;
|
||||
ix86_handle_dll_attribute (tree * pnode, tree name, tree args, int flags,
|
||||
bool *no_add_attrs)
|
||||
{
|
||||
tree node = *pnode;
|
||||
|
||||
|
@ -121,18 +117,18 @@ ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs)
|
|||
|
||||
/* `extern' needn't be specified with dllimport.
|
||||
Specify `extern' now and hope for the best. Sigh. */
|
||||
DECL_EXTERNAL (node) = 1;
|
||||
DECL_EXTERNAL (node) = 1;
|
||||
/* Also, implicitly give dllimport'd variables declared within
|
||||
a function global scope, unless declared static. */
|
||||
if (current_function_decl != NULL_TREE && !TREE_STATIC (node))
|
||||
TREE_PUBLIC (node) = 1;
|
||||
TREE_PUBLIC (node) = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Report error if symbol is not accessible at global scope. */
|
||||
if (!TREE_PUBLIC (node)
|
||||
&& (TREE_CODE (node) == VAR_DECL
|
||||
|| TREE_CODE (node) == FUNCTION_DECL))
|
||||
|| TREE_CODE (node) == FUNCTION_DECL))
|
||||
{
|
||||
error ("%Hexternal linkage required for symbol '%D' because of '%s' attribute.",
|
||||
&DECL_SOURCE_LOCATION (node), node, IDENTIFIER_POINTER (name));
|
||||
|
@ -145,12 +141,9 @@ ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs)
|
|||
/* Handle a "shared" attribute;
|
||||
arguments as in struct attribute_spec.handler. */
|
||||
tree
|
||||
ix86_handle_shared_attribute (node, name, args, flags, no_add_attrs)
|
||||
tree *node;
|
||||
tree name;
|
||||
tree args ATTRIBUTE_UNUSED;
|
||||
int flags ATTRIBUTE_UNUSED;
|
||||
bool *no_add_attrs;
|
||||
ix86_handle_shared_attribute (tree *node, tree name,
|
||||
tree args ATTRIBUTE_UNUSED,
|
||||
int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
|
||||
{
|
||||
if (TREE_CODE (*node) != VAR_DECL)
|
||||
{
|
||||
|
@ -166,8 +159,7 @@ ix86_handle_shared_attribute (node, name, args, flags, no_add_attrs)
|
|||
imported or exported. */
|
||||
|
||||
static tree
|
||||
associated_type (decl)
|
||||
tree decl;
|
||||
associated_type (tree decl)
|
||||
{
|
||||
tree t = NULL_TREE;
|
||||
|
||||
|
@ -192,8 +184,7 @@ associated_type (decl)
|
|||
/* Return nonzero if DECL is a dllexport'd object. */
|
||||
|
||||
int
|
||||
i386_pe_dllexport_p (decl)
|
||||
tree decl;
|
||||
i386_pe_dllexport_p (tree decl)
|
||||
{
|
||||
tree exp;
|
||||
|
||||
|
@ -219,8 +210,7 @@ i386_pe_dllexport_p (decl)
|
|||
/* Return nonzero if DECL is a dllimport'd object. */
|
||||
|
||||
int
|
||||
i386_pe_dllimport_p (decl)
|
||||
tree decl;
|
||||
i386_pe_dllimport_p (tree decl)
|
||||
{
|
||||
tree imp;
|
||||
int context_imp = 0;
|
||||
|
@ -262,11 +252,11 @@ i386_pe_dllimport_p (decl)
|
|||
|
||||
/* We ignore the dllimport attribute for inline member functions.
|
||||
This differs from MSVC behavior which treats it like GNUC
|
||||
'extern inline' extension. */
|
||||
'extern inline' extension. */
|
||||
else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INLINE (decl))
|
||||
{
|
||||
if (extra_warnings)
|
||||
warning ("%Hinline function '%D' is declared as dllimport: attribute ignored.",
|
||||
warning ("%Hinline function '%D' is declared as dllimport: attribute ignored.",
|
||||
&DECL_SOURCE_LOCATION (decl), decl);
|
||||
return 0;
|
||||
}
|
||||
|
@ -278,7 +268,7 @@ i386_pe_dllimport_p (decl)
|
|||
&& !DECL_EXTERNAL (decl) && context_imp)
|
||||
{
|
||||
if (!DECL_VIRTUAL_P (decl))
|
||||
error ("%Hdefinition of static data member '%D' of dllimport'd class.",
|
||||
error ("%Hdefinition of static data member '%D' of dllimport'd class.",
|
||||
&DECL_SOURCE_LOCATION (decl), decl); return 0;
|
||||
}
|
||||
|
||||
|
@ -300,8 +290,7 @@ i386_pe_dllimport_p (decl)
|
|||
/* Return nonzero if SYMBOL is marked as being dllexport'd. */
|
||||
|
||||
int
|
||||
i386_pe_dllexport_name_p (symbol)
|
||||
const char *symbol;
|
||||
i386_pe_dllexport_name_p (const char *symbol)
|
||||
{
|
||||
return (strncmp (DLL_EXPORT_PREFIX, symbol,
|
||||
strlen (DLL_EXPORT_PREFIX)) == 0);
|
||||
|
@ -310,8 +299,7 @@ i386_pe_dllexport_name_p (symbol)
|
|||
/* Return nonzero if SYMBOL is marked as being dllimport'd. */
|
||||
|
||||
int
|
||||
i386_pe_dllimport_name_p (symbol)
|
||||
const char *symbol;
|
||||
i386_pe_dllimport_name_p (const char *symbol)
|
||||
{
|
||||
return (strncmp (DLL_IMPORT_PREFIX, symbol,
|
||||
strlen (DLL_IMPORT_PREFIX)) == 0);
|
||||
|
@ -321,8 +309,7 @@ i386_pe_dllimport_name_p (symbol)
|
|||
Note that we override the previous setting (eg: dllimport). */
|
||||
|
||||
void
|
||||
i386_pe_mark_dllexport (decl)
|
||||
tree decl;
|
||||
i386_pe_mark_dllexport (tree decl)
|
||||
{
|
||||
const char *oldname;
|
||||
char *newname;
|
||||
|
@ -364,8 +351,7 @@ i386_pe_mark_dllexport (decl)
|
|||
/* Mark a DECL as being dllimport'd. */
|
||||
|
||||
void
|
||||
i386_pe_mark_dllimport (decl)
|
||||
tree decl;
|
||||
i386_pe_mark_dllimport (tree decl)
|
||||
{
|
||||
const char *oldname;
|
||||
char *newname;
|
||||
|
@ -391,7 +377,7 @@ i386_pe_mark_dllimport (decl)
|
|||
/* Already done, but do a sanity check to prevent assembler errors. */
|
||||
if (!DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl))
|
||||
{
|
||||
error ("%Hfailure in redeclaration of '%D': dllimport'd symbol lacks external linkage.",
|
||||
error ("%Hfailure in redeclaration of '%D': dllimport'd symbol lacks external linkage.",
|
||||
&DECL_SOURCE_LOCATION (decl), decl);
|
||||
abort();
|
||||
}
|
||||
|
@ -416,13 +402,12 @@ i386_pe_mark_dllimport (decl)
|
|||
DECL_NON_ADDR_CONST_P (decl) = 1;
|
||||
}
|
||||
|
||||
/* Return string which is the former assembler name modified with a
|
||||
/* Return string which is the former assembler name modified with a
|
||||
prefix consisting of FASTCALL_PREFIX and a suffix consisting of an
|
||||
atsign (@) followed by the number of bytes of arguments. */
|
||||
|
||||
const char *
|
||||
gen_fastcall_suffix (decl)
|
||||
tree decl;
|
||||
gen_fastcall_suffix (tree decl)
|
||||
{
|
||||
int total = 0;
|
||||
|
||||
|
@ -448,19 +433,18 @@ gen_fastcall_suffix (decl)
|
|||
}
|
||||
}
|
||||
|
||||
/* Assume max of 8 base 10 digits in the suffix. */
|
||||
/* Assume max of 8 base 10 digits in the suffix. */
|
||||
newsym = xmalloc (1 + strlen (asmname) + 1 + 8 + 1);
|
||||
sprintf (newsym, "%c%s@%d", FASTCALL_PREFIX, asmname, total/BITS_PER_UNIT);
|
||||
return IDENTIFIER_POINTER (get_identifier (newsym));
|
||||
}
|
||||
|
||||
/* Return string which is the former assembler name modified with a
|
||||
suffix consisting of an atsign (@) followed by the number of bytes of
|
||||
/* Return string which is the former assembler name modified with a
|
||||
suffix consisting of an atsign (@) followed by the number of bytes of
|
||||
arguments */
|
||||
|
||||
const char *
|
||||
gen_stdcall_suffix (decl)
|
||||
tree decl;
|
||||
gen_stdcall_suffix (tree decl)
|
||||
{
|
||||
int total = 0;
|
||||
/* ??? This probably should use XSTR (XEXP (DECL_RTL (decl), 0), 0) instead
|
||||
|
@ -469,7 +453,7 @@ gen_stdcall_suffix (decl)
|
|||
char *newsym;
|
||||
|
||||
if (TYPE_ARG_TYPES (TREE_TYPE (decl)))
|
||||
if (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (decl))))
|
||||
if (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (decl))))
|
||||
== void_type_node)
|
||||
{
|
||||
tree formal_type = TYPE_ARG_TYPES (TREE_TYPE (decl));
|
||||
|
@ -487,17 +471,14 @@ gen_stdcall_suffix (decl)
|
|||
}
|
||||
}
|
||||
|
||||
/* Assume max of 8 base 10 digits in the suffix. */
|
||||
/* Assume max of 8 base 10 digits in the suffix. */
|
||||
newsym = xmalloc (strlen (asmname) + 1 + 8 + 1);
|
||||
sprintf (newsym, "%s@%d", asmname, total/BITS_PER_UNIT);
|
||||
return IDENTIFIER_POINTER (get_identifier (newsym));
|
||||
}
|
||||
|
||||
void
|
||||
i386_pe_encode_section_info (decl, rtl, first)
|
||||
tree decl;
|
||||
rtx rtl;
|
||||
int first;
|
||||
i386_pe_encode_section_info (tree decl, rtx rtl, int first)
|
||||
{
|
||||
default_encode_section_info (decl, rtl, first);
|
||||
|
||||
|
@ -505,7 +486,7 @@ i386_pe_encode_section_info (decl, rtl, first)
|
|||
{
|
||||
if (lookup_attribute ("stdcall",
|
||||
TYPE_ATTRIBUTES (TREE_TYPE (decl))))
|
||||
XEXP (DECL_RTL (decl), 0) =
|
||||
XEXP (DECL_RTL (decl), 0) =
|
||||
gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (decl));
|
||||
else if (lookup_attribute ("fastcall",
|
||||
TYPE_ATTRIBUTES (TREE_TYPE (decl))))
|
||||
|
@ -540,7 +521,7 @@ i386_pe_encode_section_info (decl, rtl, first)
|
|||
|
||||
warning ("%H%s '%D' %s after being referenced with dllimport linkage.",
|
||||
&DECL_SOURCE_LOCATION (decl),
|
||||
TREE_CODE (decl) == VAR_DECL ? "variable" : "function",
|
||||
TREE_CODE (decl) == VAR_DECL ? "variable" : "function",
|
||||
decl, (DECL_INITIAL (decl) || !DECL_EXTERNAL (decl))
|
||||
? "defined locally" : "redeclared without dllimport attribute");
|
||||
|
||||
|
@ -557,8 +538,7 @@ i386_pe_encode_section_info (decl, rtl, first)
|
|||
prefix if it exists. */
|
||||
|
||||
const char *
|
||||
i386_pe_strip_name_encoding (str)
|
||||
const char *str;
|
||||
i386_pe_strip_name_encoding (const char *str)
|
||||
{
|
||||
if (strncmp (str, DLL_IMPORT_PREFIX, strlen (DLL_IMPORT_PREFIX))
|
||||
== 0)
|
||||
|
@ -574,12 +554,11 @@ i386_pe_strip_name_encoding (str)
|
|||
/* Also strip the stdcall suffix. */
|
||||
|
||||
const char *
|
||||
i386_pe_strip_name_encoding_full (str)
|
||||
const char *str;
|
||||
i386_pe_strip_name_encoding_full (const char *str)
|
||||
{
|
||||
const char *p;
|
||||
const char *name = i386_pe_strip_name_encoding (str);
|
||||
|
||||
|
||||
p = strchr (name, '@');
|
||||
if (p)
|
||||
return ggc_alloc_string (name, p - name);
|
||||
|
@ -597,16 +576,16 @@ void i386_pe_output_labelref (stream, name)
|
|||
{
|
||||
if (strncmp (name, DLL_IMPORT_PREFIX, strlen (DLL_IMPORT_PREFIX))
|
||||
== 0)
|
||||
/* A dll import */
|
||||
/* A dll import */
|
||||
{
|
||||
if (name[strlen (DLL_IMPORT_PREFIX)] == FASTCALL_PREFIX)
|
||||
/* A dllimport fastcall symbol. */
|
||||
/* A dllimport fastcall symbol. */
|
||||
{
|
||||
fprintf (stream, "__imp_%s",
|
||||
i386_pe_strip_name_encoding (name));
|
||||
}
|
||||
else
|
||||
/* A dllimport non-fastcall symbol. */
|
||||
/* A dllimport non-fastcall symbol. */
|
||||
{
|
||||
fprintf (stream, "__imp__%s",
|
||||
i386_pe_strip_name_encoding (name));
|
||||
|
@ -614,7 +593,7 @@ void i386_pe_output_labelref (stream, name)
|
|||
}
|
||||
else if ((name[0] == FASTCALL_PREFIX)
|
||||
|| (strncmp (name, DLL_EXPORT_PREFIX, strlen (DLL_EXPORT_PREFIX)
|
||||
== 0
|
||||
== 0
|
||||
&& name[strlen (DLL_EXPORT_PREFIX)] == FASTCALL_PREFIX)))
|
||||
/* A fastcall symbol. */
|
||||
{
|
||||
|
@ -630,9 +609,7 @@ void i386_pe_output_labelref (stream, name)
|
|||
}
|
||||
|
||||
void
|
||||
i386_pe_unique_section (decl, reloc)
|
||||
tree decl;
|
||||
int reloc;
|
||||
i386_pe_unique_section (tree decl, int reloc)
|
||||
{
|
||||
int len;
|
||||
const char *name, *prefix;
|
||||
|
@ -644,7 +621,7 @@ i386_pe_unique_section (decl, reloc)
|
|||
/* The object is put in, for example, section .text$foo.
|
||||
The linker will then ultimately place them in .text
|
||||
(everything from the $ on is stripped). Don't put
|
||||
read-only data in .rdata section to avoid a PE linker
|
||||
read-only data in .rdata section to avoid a PE linker
|
||||
bug when .rdata$* grouped sections are used in code
|
||||
without a .rdata section. */
|
||||
if (TREE_CODE (decl) == FUNCTION_DECL)
|
||||
|
@ -678,10 +655,7 @@ i386_pe_unique_section (decl, reloc)
|
|||
#define SECTION_PE_SHARED SECTION_MACH_DEP
|
||||
|
||||
unsigned int
|
||||
i386_pe_section_type_flags (decl, name, reloc)
|
||||
tree decl;
|
||||
const char *name;
|
||||
int reloc;
|
||||
i386_pe_section_type_flags (tree decl, const char *name, int reloc)
|
||||
{
|
||||
static htab_t htab;
|
||||
unsigned int flags;
|
||||
|
@ -727,9 +701,7 @@ i386_pe_section_type_flags (decl, name, reloc)
|
|||
}
|
||||
|
||||
void
|
||||
i386_pe_asm_named_section (name, flags)
|
||||
const char *name;
|
||||
unsigned int flags;
|
||||
i386_pe_asm_named_section (const char *name, unsigned int flags)
|
||||
{
|
||||
char flagchars[8], *f = flagchars;
|
||||
|
||||
|
@ -766,10 +738,7 @@ i386_pe_asm_named_section (name, flags)
|
|||
visible. */
|
||||
|
||||
void
|
||||
i386_pe_declare_function_type (file, name, public)
|
||||
FILE *file;
|
||||
const char *name;
|
||||
int public;
|
||||
i386_pe_declare_function_type (FILE *file, const char *name, int public)
|
||||
{
|
||||
fprintf (file, "\t.def\t");
|
||||
assemble_name (file, name);
|
||||
|
@ -795,8 +764,7 @@ static struct extern_list *extern_head;
|
|||
for it then. */
|
||||
|
||||
void
|
||||
i386_pe_record_external_function (name)
|
||||
const char *name;
|
||||
i386_pe_record_external_function (const char *name)
|
||||
{
|
||||
struct extern_list *p;
|
||||
|
||||
|
@ -820,13 +788,11 @@ static struct export_list *export_head;
|
|||
/* Assemble an export symbol entry. We need to keep a list of
|
||||
these, so that we can output the export list at the end of the
|
||||
assembly. We used to output these export symbols in each function,
|
||||
but that causes problems with GNU ld when the sections are
|
||||
but that causes problems with GNU ld when the sections are
|
||||
linkonce. */
|
||||
|
||||
void
|
||||
i386_pe_record_exported_symbol (name, is_data)
|
||||
const char *name;
|
||||
int is_data;
|
||||
i386_pe_record_exported_symbol (const char *name, int is_data)
|
||||
{
|
||||
struct export_list *p;
|
||||
|
||||
|
@ -842,7 +808,7 @@ i386_pe_record_exported_symbol (name, is_data)
|
|||
output the .drectve section. */
|
||||
|
||||
void
|
||||
i386_pe_file_end ()
|
||||
i386_pe_file_end (void)
|
||||
{
|
||||
struct extern_list *p;
|
||||
|
||||
|
@ -859,7 +825,7 @@ i386_pe_file_end ()
|
|||
{
|
||||
TREE_ASM_WRITTEN (decl) = 1;
|
||||
i386_pe_declare_function_type (asm_out_file, p->name,
|
||||
TREE_PUBLIC (decl));
|
||||
TREE_PUBLIC (decl));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* Definitions of target machine for GNU compiler for IA-64.
|
||||
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -29,130 +30,125 @@ extern GTY(()) rtx ia64_compare_op1;
|
|||
|
||||
extern int bundling_p;
|
||||
#ifdef RTX_CODE
|
||||
extern int ia64_st_address_bypass_p PARAMS((rtx, rtx));
|
||||
extern int ia64_ld_address_bypass_p PARAMS((rtx, rtx));
|
||||
extern int ia64_produce_address_p PARAMS((rtx));
|
||||
extern int call_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int sdata_symbolic_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int got_symbolic_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int symbolic_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int tls_symbolic_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int function_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int setjmp_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int move_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int gr_register_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int fr_register_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int grfr_register_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int gr_nonimmediate_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int fr_nonimmediate_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int grfr_nonimmediate_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int gr_reg_or_0_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int gr_reg_or_5bit_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int gr_reg_or_6bit_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int gr_reg_or_8bit_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int grfr_reg_or_8bit_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int gr_reg_or_8bit_adjusted_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int gr_reg_or_8bit_and_adjusted_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int gr_reg_or_14bit_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int gr_reg_or_22bit_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int shift_count_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int shift_32bit_count_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int shladd_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int fetchadd_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int fr_reg_or_fp01_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int normal_comparison_operator PARAMS((rtx, enum machine_mode));
|
||||
extern int adjusted_comparison_operator PARAMS((rtx, enum machine_mode));
|
||||
extern int signed_inequality_operator PARAMS((rtx, enum machine_mode));
|
||||
extern int destination_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int not_postinc_memory_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int predicate_operator PARAMS((rtx, enum machine_mode));
|
||||
extern int ar_lc_reg_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int ar_ccv_reg_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int ar_pfs_reg_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int general_tfmode_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int destination_tfmode_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int tfreg_or_fp01_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int basereg_operand PARAMS((rtx, enum machine_mode));
|
||||
extern int ia64_st_address_bypass_p (rtx, rtx);
|
||||
extern int ia64_ld_address_bypass_p (rtx, rtx);
|
||||
extern int ia64_produce_address_p (rtx);
|
||||
extern int call_operand (rtx, enum machine_mode);
|
||||
extern int sdata_symbolic_operand (rtx, enum machine_mode);
|
||||
extern int got_symbolic_operand (rtx, enum machine_mode);
|
||||
extern int symbolic_operand (rtx, enum machine_mode);
|
||||
extern int tls_symbolic_operand (rtx, enum machine_mode);
|
||||
extern int function_operand (rtx, enum machine_mode);
|
||||
extern int setjmp_operand (rtx, enum machine_mode);
|
||||
extern int move_operand (rtx, enum machine_mode);
|
||||
extern int gr_register_operand (rtx, enum machine_mode);
|
||||
extern int fr_register_operand (rtx, enum machine_mode);
|
||||
extern int grfr_register_operand (rtx, enum machine_mode);
|
||||
extern int gr_nonimmediate_operand (rtx, enum machine_mode);
|
||||
extern int fr_nonimmediate_operand (rtx, enum machine_mode);
|
||||
extern int grfr_nonimmediate_operand (rtx, enum machine_mode);
|
||||
extern int gr_reg_or_0_operand (rtx, enum machine_mode);
|
||||
extern int gr_reg_or_5bit_operand (rtx, enum machine_mode);
|
||||
extern int gr_reg_or_6bit_operand (rtx, enum machine_mode);
|
||||
extern int gr_reg_or_8bit_operand (rtx, enum machine_mode);
|
||||
extern int grfr_reg_or_8bit_operand (rtx, enum machine_mode);
|
||||
extern int gr_reg_or_8bit_adjusted_operand (rtx, enum machine_mode);
|
||||
extern int gr_reg_or_8bit_and_adjusted_operand (rtx, enum machine_mode);
|
||||
extern int gr_reg_or_14bit_operand (rtx, enum machine_mode);
|
||||
extern int gr_reg_or_22bit_operand (rtx, enum machine_mode);
|
||||
extern int shift_count_operand (rtx, enum machine_mode);
|
||||
extern int shift_32bit_count_operand (rtx, enum machine_mode);
|
||||
extern int shladd_operand (rtx, enum machine_mode);
|
||||
extern int fetchadd_operand (rtx, enum machine_mode);
|
||||
extern int fr_reg_or_fp01_operand (rtx, enum machine_mode);
|
||||
extern int normal_comparison_operator (rtx, enum machine_mode);
|
||||
extern int adjusted_comparison_operator (rtx, enum machine_mode);
|
||||
extern int signed_inequality_operator (rtx, enum machine_mode);
|
||||
extern int destination_operand (rtx, enum machine_mode);
|
||||
extern int not_postinc_memory_operand (rtx, enum machine_mode);
|
||||
extern int predicate_operator (rtx, enum machine_mode);
|
||||
extern int ar_lc_reg_operand (rtx, enum machine_mode);
|
||||
extern int ar_ccv_reg_operand (rtx, enum machine_mode);
|
||||
extern int ar_pfs_reg_operand (rtx, enum machine_mode);
|
||||
extern int general_tfmode_operand (rtx, enum machine_mode);
|
||||
extern int destination_tfmode_operand (rtx, enum machine_mode);
|
||||
extern int tfreg_or_fp01_operand (rtx, enum machine_mode);
|
||||
extern int basereg_operand (rtx, enum machine_mode);
|
||||
|
||||
extern rtx ia64_expand_move PARAMS ((rtx, rtx));
|
||||
extern int ia64_move_ok PARAMS((rtx, rtx));
|
||||
extern int addp4_optimize_ok PARAMS((rtx, rtx));
|
||||
extern void ia64_emit_cond_move PARAMS((rtx, rtx, rtx));
|
||||
extern int ia64_depz_field_mask PARAMS((rtx, rtx));
|
||||
extern rtx ia64_split_timode PARAMS((rtx[], rtx, rtx));
|
||||
extern rtx spill_tfmode_operand PARAMS((rtx, int));
|
||||
extern rtx ia64_expand_compare PARAMS((enum rtx_code, enum machine_mode));
|
||||
extern void ia64_expand_call PARAMS((rtx, rtx, rtx, int));
|
||||
extern void ia64_split_call PARAMS((rtx, rtx, rtx, rtx, rtx, int, int));
|
||||
extern void ia64_reload_gp PARAMS((void));
|
||||
extern rtx ia64_expand_move (rtx, rtx);
|
||||
extern int ia64_move_ok (rtx, rtx);
|
||||
extern int addp4_optimize_ok (rtx, rtx);
|
||||
extern void ia64_emit_cond_move (rtx, rtx, rtx);
|
||||
extern int ia64_depz_field_mask (rtx, rtx);
|
||||
extern rtx ia64_split_timode (rtx[], rtx, rtx);
|
||||
extern rtx spill_tfmode_operand (rtx, int);
|
||||
extern rtx ia64_expand_compare (enum rtx_code, enum machine_mode);
|
||||
extern void ia64_expand_call (rtx, rtx, rtx, int);
|
||||
extern void ia64_split_call (rtx, rtx, rtx, rtx, rtx, int, int);
|
||||
extern void ia64_reload_gp (void);
|
||||
|
||||
extern HOST_WIDE_INT ia64_initial_elimination_offset PARAMS((int, int));
|
||||
extern void ia64_expand_prologue PARAMS((void));
|
||||
extern void ia64_expand_epilogue PARAMS((int));
|
||||
extern HOST_WIDE_INT ia64_initial_elimination_offset (int, int);
|
||||
extern void ia64_expand_prologue (void);
|
||||
extern void ia64_expand_epilogue (int);
|
||||
|
||||
extern int ia64_direct_return PARAMS((void));
|
||||
extern void ia64_expand_load_address PARAMS((rtx, rtx));
|
||||
extern int ia64_hard_regno_rename_ok PARAMS((int, int));
|
||||
extern int ia64_direct_return (void);
|
||||
extern void ia64_expand_load_address (rtx, rtx);
|
||||
extern int ia64_hard_regno_rename_ok (int, int);
|
||||
|
||||
extern void ia64_initialize_trampoline PARAMS((rtx, rtx, rtx));
|
||||
extern void ia64_print_operand_address PARAMS((FILE *, rtx));
|
||||
extern void ia64_print_operand PARAMS((FILE *, rtx, int));
|
||||
extern enum reg_class ia64_secondary_reload_class PARAMS((enum reg_class,
|
||||
enum machine_mode,
|
||||
rtx));
|
||||
extern void ia64_output_dwarf_dtprel PARAMS ((FILE*, int, rtx));
|
||||
extern void process_for_unwind_directive PARAMS ((FILE *, rtx));
|
||||
extern const char *get_bundle_name PARAMS ((int));
|
||||
extern void ia64_initialize_trampoline (rtx, rtx, rtx);
|
||||
extern void ia64_print_operand_address (FILE *, rtx);
|
||||
extern void ia64_print_operand (FILE *, rtx, int);
|
||||
extern enum reg_class ia64_secondary_reload_class (enum reg_class,
|
||||
enum machine_mode, rtx);
|
||||
extern void ia64_output_dwarf_dtprel (FILE*, int, rtx);
|
||||
extern void process_for_unwind_directive (FILE *, rtx);
|
||||
extern const char *get_bundle_name (int);
|
||||
#endif /* RTX_CODE */
|
||||
|
||||
#ifdef TREE_CODE
|
||||
#ifdef RTX_CODE
|
||||
extern rtx ia64_function_arg PARAMS((CUMULATIVE_ARGS *, enum machine_mode,
|
||||
tree, int, int));
|
||||
extern rtx ia64_expand_builtin PARAMS((tree, rtx, rtx,
|
||||
enum machine_mode, int));
|
||||
extern rtx ia64_va_arg PARAMS((tree, tree));
|
||||
extern rtx ia64_function_value PARAMS((tree, tree));
|
||||
extern rtx ia64_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
|
||||
tree, int, int);
|
||||
extern rtx ia64_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
|
||||
extern rtx ia64_va_arg (tree, tree);
|
||||
extern rtx ia64_function_value (tree, tree);
|
||||
#endif /* RTX_CODE */
|
||||
|
||||
extern void ia64_setup_incoming_varargs PARAMS((CUMULATIVE_ARGS, int, tree,
|
||||
int *, int));
|
||||
extern int ia64_function_arg_partial_nregs PARAMS((CUMULATIVE_ARGS *,
|
||||
enum machine_mode,
|
||||
tree, int));
|
||||
extern void ia64_function_arg_advance PARAMS((CUMULATIVE_ARGS *,
|
||||
enum machine_mode,
|
||||
tree, int));
|
||||
extern int ia64_function_arg_pass_by_reference PARAMS((CUMULATIVE_ARGS *,
|
||||
enum machine_mode,
|
||||
tree, int));
|
||||
extern int ia64_return_in_memory PARAMS((tree));
|
||||
extern void ia64_asm_output_external PARAMS((FILE *, tree, const char *));
|
||||
extern void ia64_setup_incoming_varargs (CUMULATIVE_ARGS, int, tree,
|
||||
int *, int);
|
||||
extern int ia64_function_arg_partial_nregs (CUMULATIVE_ARGS *,
|
||||
enum machine_mode, tree, int);
|
||||
extern void ia64_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
|
||||
tree, int);
|
||||
extern int ia64_function_arg_pass_by_reference (CUMULATIVE_ARGS *,
|
||||
enum machine_mode, tree, int);
|
||||
extern int ia64_return_in_memory (tree);
|
||||
extern void ia64_asm_output_external (FILE *, tree, const char *);
|
||||
#endif /* TREE_CODE */
|
||||
|
||||
extern int ia64_register_move_cost PARAMS((enum machine_mode, enum reg_class,
|
||||
enum reg_class));
|
||||
extern int ia64_epilogue_uses PARAMS((int));
|
||||
extern int ia64_eh_uses PARAMS((int));
|
||||
extern void emit_safe_across_calls PARAMS((void));
|
||||
extern void ia64_init_builtins PARAMS((void));
|
||||
extern void ia64_override_options PARAMS((void));
|
||||
extern int ia64_dbx_register_number PARAMS((int));
|
||||
extern int ia64_register_move_cost (enum machine_mode, enum reg_class,
|
||||
enum reg_class);
|
||||
extern int ia64_epilogue_uses (int);
|
||||
extern int ia64_eh_uses (int);
|
||||
extern void emit_safe_across_calls (void);
|
||||
extern void ia64_init_builtins (void);
|
||||
extern void ia64_override_options (void);
|
||||
extern int ia64_dbx_register_number (int);
|
||||
|
||||
extern rtx ia64_return_addr_rtx PARAMS ((HOST_WIDE_INT, rtx));
|
||||
extern void ia64_split_return_addr_rtx PARAMS ((rtx));
|
||||
extern rtx ia64_return_addr_rtx (HOST_WIDE_INT, rtx);
|
||||
extern void ia64_split_return_addr_rtx (rtx);
|
||||
|
||||
#ifdef SDATA_SECTION_ASM_OP
|
||||
extern void sdata_section PARAMS ((void));
|
||||
extern void sdata_section (void);
|
||||
#endif
|
||||
|
||||
#ifdef SBSS_SECTION_ASM_OP
|
||||
extern void sbss_section PARAMS ((void));
|
||||
extern void sbss_section (void);
|
||||
#endif
|
||||
|
||||
#ifdef ARGS_SIZE_RTX
|
||||
/* expr.h defines ARGS_SIZE_RTX and `enum direction'. */
|
||||
extern enum direction ia64_hpux_function_arg_padding PARAMS ((enum machine_mode, tree));
|
||||
extern enum direction ia64_hpux_function_arg_padding (enum machine_mode, tree);
|
||||
#endif /* ARGS_SIZE_RTX */
|
||||
|
||||
extern void ia64_hpux_handle_builtin_pragma PARAMS ((struct cpp_reader *));
|
||||
extern void ia64_hpux_handle_builtin_pragma (struct cpp_reader *);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -21,77 +21,81 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||
|
||||
/* Declare functions in s390.c. */
|
||||
|
||||
extern void optimization_options PARAMS ((int, int));
|
||||
extern void override_options PARAMS ((void));
|
||||
extern int s390_arg_frame_offset PARAMS ((void));
|
||||
extern void s390_load_got PARAMS ((int));
|
||||
extern void s390_emit_prologue PARAMS ((void));
|
||||
extern void s390_emit_epilogue PARAMS ((void));
|
||||
extern void s390_function_profiler PARAMS ((FILE *, int));
|
||||
extern void optimization_options (int, int);
|
||||
extern void override_options (void);
|
||||
extern int s390_arg_frame_offset (void);
|
||||
extern void s390_load_got (int);
|
||||
extern void s390_emit_prologue (void);
|
||||
extern void s390_emit_epilogue (void);
|
||||
extern void s390_function_profiler (FILE *, int);
|
||||
|
||||
#ifdef RTX_CODE
|
||||
extern int s390_extra_constraint PARAMS ((rtx, int));
|
||||
extern int const0_operand PARAMS ((rtx, enum machine_mode));
|
||||
extern int consttable_operand PARAMS ((rtx, enum machine_mode));
|
||||
extern int larl_operand PARAMS ((rtx, enum machine_mode));
|
||||
extern int s_operand PARAMS ((rtx, enum machine_mode));
|
||||
extern int s_imm_operand PARAMS ((rtx, enum machine_mode));
|
||||
extern int bras_sym_operand PARAMS ((rtx, enum machine_mode));
|
||||
extern int load_multiple_operation PARAMS ((rtx, enum machine_mode));
|
||||
extern int store_multiple_operation PARAMS ((rtx, enum machine_mode));
|
||||
extern int s390_single_hi PARAMS ((rtx, enum machine_mode, int));
|
||||
extern int s390_extract_hi PARAMS ((rtx, enum machine_mode, int));
|
||||
extern int s390_single_qi PARAMS ((rtx, enum machine_mode, int));
|
||||
extern int s390_extract_qi PARAMS ((rtx, enum machine_mode, int));
|
||||
extern bool s390_split_ok_p PARAMS ((rtx, rtx, enum machine_mode, int));
|
||||
extern int tls_symbolic_operand PARAMS ((rtx));
|
||||
extern int s390_extra_constraint (rtx, int);
|
||||
extern int const0_operand (rtx, enum machine_mode);
|
||||
extern int consttable_operand (rtx, enum machine_mode);
|
||||
extern int larl_operand (rtx, enum machine_mode);
|
||||
extern int s_operand (rtx, enum machine_mode);
|
||||
extern int s_imm_operand (rtx, enum machine_mode);
|
||||
extern int bras_sym_operand (rtx, enum machine_mode);
|
||||
extern int load_multiple_operation (rtx, enum machine_mode);
|
||||
extern int store_multiple_operation (rtx, enum machine_mode);
|
||||
extern int s390_single_hi (rtx, enum machine_mode, int);
|
||||
extern int s390_extract_hi (rtx, enum machine_mode, int);
|
||||
extern int s390_single_qi (rtx, enum machine_mode, int);
|
||||
extern int s390_extract_qi (rtx, enum machine_mode, int);
|
||||
extern bool s390_split_ok_p (rtx, rtx, enum machine_mode, int);
|
||||
extern int tls_symbolic_operand (rtx);
|
||||
|
||||
extern int s390_match_ccmode PARAMS ((rtx, enum machine_mode));
|
||||
extern enum machine_mode s390_tm_ccmode PARAMS ((rtx, rtx, int));
|
||||
extern enum machine_mode s390_select_ccmode PARAMS ((enum rtx_code, rtx, rtx));
|
||||
extern int symbolic_reference_mentioned_p PARAMS ((rtx));
|
||||
extern int tls_symbolic_reference_mentioned_p PARAMS ((rtx));
|
||||
extern rtx s390_tls_get_offset PARAMS ((void));
|
||||
extern int legitimate_la_operand_p PARAMS ((rtx));
|
||||
extern int preferred_la_operand_p PARAMS ((rtx));
|
||||
extern int legitimate_pic_operand_p PARAMS ((rtx));
|
||||
extern int legitimate_constant_p PARAMS ((rtx));
|
||||
extern int legitimate_reload_constant_p PARAMS ((rtx));
|
||||
extern int legitimate_address_p PARAMS ((enum machine_mode, rtx, int));
|
||||
extern rtx legitimize_pic_address PARAMS ((rtx, rtx));
|
||||
extern rtx legitimize_address PARAMS ((rtx, rtx, enum machine_mode));
|
||||
extern enum reg_class s390_preferred_reload_class PARAMS ((rtx, enum reg_class));
|
||||
extern enum reg_class s390_secondary_input_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx));
|
||||
extern enum reg_class s390_secondary_output_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx));
|
||||
extern int s390_plus_operand PARAMS ((rtx, enum machine_mode));
|
||||
extern void s390_expand_plus_operand PARAMS ((rtx, rtx, rtx));
|
||||
extern void emit_symbolic_move PARAMS ((rtx *));
|
||||
extern void s390_load_address PARAMS ((rtx, rtx));
|
||||
extern void s390_expand_movstr PARAMS ((rtx, rtx, rtx));
|
||||
extern void s390_expand_clrstr PARAMS ((rtx, rtx));
|
||||
extern void s390_expand_cmpmem PARAMS ((rtx, rtx, rtx, rtx));
|
||||
extern rtx s390_return_addr_rtx PARAMS ((int, rtx));
|
||||
extern int s390_match_ccmode (rtx, enum machine_mode);
|
||||
extern enum machine_mode s390_tm_ccmode (rtx, rtx, int);
|
||||
extern enum machine_mode s390_select_ccmode (enum rtx_code, rtx, rtx);
|
||||
extern int symbolic_reference_mentioned_p (rtx);
|
||||
extern int tls_symbolic_reference_mentioned_p (rtx);
|
||||
extern rtx s390_tls_get_offset (void);
|
||||
extern int legitimate_la_operand_p (rtx);
|
||||
extern int preferred_la_operand_p (rtx);
|
||||
extern int legitimate_pic_operand_p (rtx);
|
||||
extern int legitimate_constant_p (rtx);
|
||||
extern int legitimate_reload_constant_p (rtx);
|
||||
extern int legitimate_address_p (enum machine_mode, rtx, int);
|
||||
extern rtx legitimize_pic_address (rtx, rtx);
|
||||
extern rtx legitimize_address (rtx, rtx, enum machine_mode);
|
||||
extern enum reg_class s390_preferred_reload_class (rtx, enum reg_class);
|
||||
extern enum reg_class s390_secondary_input_reload_class (enum reg_class,
|
||||
enum machine_mode,
|
||||
rtx);
|
||||
extern enum reg_class s390_secondary_output_reload_class (enum reg_class,
|
||||
enum machine_mode,
|
||||
rtx);
|
||||
extern int s390_plus_operand (rtx, enum machine_mode);
|
||||
extern void s390_expand_plus_operand (rtx, rtx, rtx);
|
||||
extern void emit_symbolic_move (rtx *);
|
||||
extern void s390_load_address (rtx, rtx);
|
||||
extern void s390_expand_movstr (rtx, rtx, rtx);
|
||||
extern void s390_expand_clrstr (rtx, rtx);
|
||||
extern void s390_expand_cmpmem (rtx, rtx, rtx, rtx);
|
||||
extern rtx s390_return_addr_rtx (int, rtx);
|
||||
|
||||
extern void s390_output_symbolic_const PARAMS ((FILE *, rtx));
|
||||
extern void print_operand_address PARAMS ((FILE *, rtx));
|
||||
extern void print_operand PARAMS ((FILE *, rtx, int));
|
||||
extern void s390_output_constant_pool PARAMS ((rtx, rtx));
|
||||
extern void s390_trampoline_template PARAMS ((FILE *));
|
||||
extern void s390_initialize_trampoline PARAMS ((rtx, rtx, rtx));
|
||||
extern rtx s390_gen_rtx_const_DI PARAMS ((int, int));
|
||||
extern void s390_output_dwarf_dtprel PARAMS ((FILE*, int, rtx));
|
||||
extern int s390_agen_dep_p PARAMS ((rtx, rtx));
|
||||
extern void s390_output_symbolic_const (FILE *, rtx);
|
||||
extern void print_operand_address (FILE *, rtx);
|
||||
extern void print_operand (FILE *, rtx, int);
|
||||
extern void s390_output_constant_pool (rtx, rtx);
|
||||
extern void s390_trampoline_template (FILE *);
|
||||
extern void s390_initialize_trampoline (rtx, rtx, rtx);
|
||||
extern rtx s390_gen_rtx_const_DI (int, int);
|
||||
extern void s390_output_dwarf_dtprel (FILE*, int, rtx);
|
||||
extern int s390_agen_dep_p (rtx, rtx);
|
||||
|
||||
#endif /* RTX_CODE */
|
||||
|
||||
#ifdef TREE_CODE
|
||||
extern int s390_function_arg_pass_by_reference PARAMS ((enum machine_mode, tree));
|
||||
extern void s390_function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
|
||||
extern tree s390_build_va_list PARAMS ((void));
|
||||
extern int s390_function_arg_pass_by_reference (enum machine_mode, tree);
|
||||
extern void s390_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
|
||||
tree, int);
|
||||
extern tree s390_build_va_list (void);
|
||||
#ifdef RTX_CODE
|
||||
extern rtx s390_function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
|
||||
extern void s390_va_start PARAMS ((tree, rtx));
|
||||
extern rtx s390_va_arg PARAMS ((tree, tree));
|
||||
extern rtx s390_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
|
||||
extern void s390_va_start (tree, rtx);
|
||||
extern rtx s390_va_arg (tree, tree);
|
||||
#endif /* RTX_CODE */
|
||||
#endif /* TREE_CODE */
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue