Commit 9c808aad by Andreas Jaeger Committed by Andreas Jaeger

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
parent e20bcc5e
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> 2003-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* config/sparc/sparc.c: Convert to ISO C. * config/sparc/sparc.c: Convert to ISO C.
......
...@@ -7171,7 +7171,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7171,7 +7171,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (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) if (WORDS_BIG_ENDIAN)
gen = gen_extxl_be; gen = gen_extxl_be;
else else
...@@ -7186,7 +7186,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7186,7 +7186,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (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) if (WORDS_BIG_ENDIAN)
gen = gen_extxl_be; gen = gen_extxl_be;
else else
...@@ -7201,7 +7201,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7201,7 +7201,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (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) if (WORDS_BIG_ENDIAN)
gen = gen_extxl_be; gen = gen_extxl_be;
else else
...@@ -7216,7 +7216,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7216,7 +7216,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (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) if (WORDS_BIG_ENDIAN)
gen = gen_extxl_be; gen = gen_extxl_be;
else else
...@@ -7231,7 +7231,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7231,7 +7231,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx);
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_extwh_be; gen = gen_extwh_be;
else else
...@@ -7246,7 +7246,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7246,7 +7246,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx);
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_extlh_be; gen = gen_extlh_be;
else else
...@@ -7261,7 +7261,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7261,7 +7261,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx);
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_extqh_be; gen = gen_extqh_be;
else else
...@@ -7276,7 +7276,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7276,7 +7276,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx);
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_insbl_be; gen = gen_insbl_be;
else else
...@@ -7292,7 +7292,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7292,7 +7292,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx);
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_inswl_be; gen = gen_inswl_be;
else else
...@@ -7308,7 +7308,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7308,7 +7308,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx);
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_insll_be; gen = gen_insll_be;
else else
...@@ -7325,7 +7325,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7325,7 +7325,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx);
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_insql_be; gen = gen_insql_be;
else else
...@@ -7370,7 +7370,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7370,7 +7370,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx, rtx);
rtx mask; rtx mask;
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_mskxl_be; gen = gen_mskxl_be;
...@@ -7387,7 +7387,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7387,7 +7387,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx, rtx);
rtx mask; rtx mask;
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_mskxl_be; gen = gen_mskxl_be;
...@@ -7404,7 +7404,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7404,7 +7404,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx, rtx);
rtx mask; rtx mask;
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_mskxl_be; gen = gen_mskxl_be;
...@@ -7421,7 +7421,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -7421,7 +7421,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(match_operand:DI 2 "reg_or_8bit_operand" "")] (match_operand:DI 2 "reg_or_8bit_operand" "")]
"" ""
{ {
rtx (*gen) PARAMS ((rtx, rtx, rtx, rtx)); rtx (*gen) (rtx, rtx, rtx, rtx);
rtx mask; rtx mask;
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
gen = gen_mskxl_be; gen = gen_mskxl_be;
......
/* Darwin support needed only by C/C++ frontends. /* Darwin support needed only by C/C++ frontends.
Copyright (C) 2001 Copyright (C) 2001, 2003 Free Software Foundation, Inc.
Free Software Foundation, Inc.
Contributed by Apple Computer Inc. Contributed by Apple Computer Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -38,8 +37,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -38,8 +37,8 @@ Boston, MA 02111-1307, USA. */
/* Maintain a small stack of alignments. This is similar to pragma /* Maintain a small stack of alignments. This is similar to pragma
pack's stack, but simpler. */ pack's stack, but simpler. */
static void push_field_alignment PARAMS ((int)); static void push_field_alignment (int);
static void pop_field_alignment PARAMS ((void)); static void pop_field_alignment (void);
typedef struct align_stack typedef struct align_stack
{ {
...@@ -50,8 +49,7 @@ typedef struct align_stack ...@@ -50,8 +49,7 @@ typedef struct align_stack
static struct align_stack * field_align_stack = NULL; static struct align_stack * field_align_stack = NULL;
static void static void
push_field_alignment (bit_alignment) push_field_alignment (int bit_alignment)
int bit_alignment;
{ {
align_stack *entry = (align_stack *) xmalloc (sizeof (align_stack)); align_stack *entry = (align_stack *) xmalloc (sizeof (align_stack));
...@@ -63,7 +61,7 @@ push_field_alignment (bit_alignment) ...@@ -63,7 +61,7 @@ push_field_alignment (bit_alignment)
} }
static void static void
pop_field_alignment () pop_field_alignment (void)
{ {
if (field_align_stack) if (field_align_stack)
{ {
...@@ -80,8 +78,7 @@ pop_field_alignment () ...@@ -80,8 +78,7 @@ pop_field_alignment ()
/* Handlers for Darwin-specific pragmas. */ /* Handlers for Darwin-specific pragmas. */
void void
darwin_pragma_ignore (pfile) darwin_pragma_ignore (cpp_reader *pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
/* Do nothing. */ /* Do nothing. */
} }
...@@ -89,8 +86,7 @@ darwin_pragma_ignore (pfile) ...@@ -89,8 +86,7 @@ darwin_pragma_ignore (pfile)
/* #pragma options align={mac68k|power|reset} */ /* #pragma options align={mac68k|power|reset} */
void void
darwin_pragma_options (pfile) darwin_pragma_options (cpp_reader *pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
const char *arg; const char *arg;
tree t, x; tree t, x;
...@@ -122,8 +118,7 @@ darwin_pragma_options (pfile) ...@@ -122,8 +118,7 @@ darwin_pragma_options (pfile)
/* #pragma unused ([var {, var}*]) */ /* #pragma unused ([var {, var}*]) */
void void
darwin_pragma_unused (pfile) darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
tree decl, x; tree decl, x;
int tok; int tok;
......
...@@ -18,105 +18,105 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -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, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ 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 void machopic_output_function_base_name (FILE *);
extern const char *machopic_non_lazy_ptr_name PARAMS ((const char*)); extern const char *machopic_non_lazy_ptr_name (const char*);
extern const char *machopic_stub_name PARAMS ((const char*)); extern const char *machopic_stub_name (const char*);
extern void machopic_picsymbol_stub_section PARAMS ((void)); extern void machopic_picsymbol_stub_section (void);
extern void machopic_picsymbol_stub1_section PARAMS ((void)); extern void machopic_picsymbol_stub1_section (void);
extern void machopic_symbol_stub_section PARAMS ((void)); extern void machopic_symbol_stub_section (void);
extern void machopic_symbol_stub1_section PARAMS ((void)); extern void machopic_symbol_stub1_section (void);
extern void machopic_lazy_symbol_ptr_section PARAMS ((void)); extern void machopic_lazy_symbol_ptr_section (void);
extern void machopic_nl_symbol_ptr_section PARAMS ((void)); extern void machopic_nl_symbol_ptr_section (void);
extern void constructor_section PARAMS ((void)); extern void constructor_section (void);
extern void destructor_section PARAMS ((void)); extern void destructor_section (void);
extern void mod_init_section PARAMS ((void)); extern void mod_init_section (void);
extern void mod_term_section PARAMS ((void)); extern void mod_term_section (void);
#ifdef RTX_CODE #ifdef RTX_CODE
extern int machopic_operand_p PARAMS ((rtx)); extern int machopic_operand_p (rtx);
extern enum machopic_addr_class machopic_classify_name PARAMS ((const char*)); extern enum machopic_addr_class machopic_classify_name (const char*);
extern rtx machopic_indirect_data_reference PARAMS ((rtx, rtx)); extern rtx machopic_indirect_data_reference (rtx, rtx);
extern rtx machopic_indirect_call_target PARAMS ((rtx)); extern rtx machopic_indirect_call_target (rtx);
extern rtx machopic_legitimize_pic_address PARAMS ((rtx, enum machine_mode, 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_constructor (rtx, int);
extern void machopic_asm_out_destructor PARAMS ((rtx, int)); extern void machopic_asm_out_destructor (rtx, int);
#endif /* RTX_CODE */ #endif /* RTX_CODE */
#ifdef TREE_CODE #ifdef TREE_CODE
extern enum machopic_addr_class machopic_classify_ident PARAMS ((tree)); extern enum machopic_addr_class machopic_classify_ident (tree);
extern void machopic_define_ident PARAMS ((tree)); extern void machopic_define_ident (tree);
extern void machopic_define_name PARAMS ((const char*)); extern void machopic_define_name (const char*);
extern int machopic_name_defined_p PARAMS ((const char*)); extern int machopic_name_defined_p (const char*);
extern int machopic_ident_defined_p PARAMS ((tree)); extern int machopic_ident_defined_p (tree);
extern void darwin_encode_section_info PARAMS ((tree, rtx, int)); extern void darwin_encode_section_info (tree, rtx, int);
extern const char *darwin_strip_name_encoding PARAMS ((const char *)); extern const char *darwin_strip_name_encoding (const char *);
#endif /* TREE_CODE */ #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_exception_section (void);
extern void darwin_eh_frame_section PARAMS ((void)); extern void darwin_eh_frame_section (void);
extern void machopic_select_section PARAMS ((tree, int, extern void machopic_select_section (tree, int, unsigned HOST_WIDE_INT);
unsigned HOST_WIDE_INT)); extern void machopic_select_rtx_section (enum machine_mode, rtx,
extern void machopic_select_rtx_section PARAMS ((enum machine_mode, rtx, unsigned HOST_WIDE_INT);
unsigned HOST_WIDE_INT));
extern void darwin_pragma_ignore PARAMS ((struct cpp_reader *)); extern void darwin_pragma_ignore (struct cpp_reader *);
extern void darwin_pragma_options PARAMS ((struct cpp_reader *)); extern void darwin_pragma_options (struct cpp_reader *);
extern void darwin_pragma_unused PARAMS ((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. */ /* Expanded by EXTRA_SECTION_FUNCTIONS into varasm.o. */
extern void const_section PARAMS ((void)); extern void const_section (void);
extern void const_data_section PARAMS ((void)); extern void const_data_section (void);
extern void cstring_section PARAMS ((void)); extern void cstring_section (void);
extern void literal4_section PARAMS ((void)); extern void literal4_section (void);
extern void literal8_section PARAMS ((void)); extern void literal8_section (void);
extern void constructor_section PARAMS ((void)); extern void constructor_section (void);
extern void mod_init_section PARAMS ((void)); extern void mod_init_section (void);
extern void mod_term_section PARAMS ((void)); extern void mod_term_section (void);
extern void destructor_section PARAMS ((void)); extern void destructor_section (void);
extern void objc_class_section PARAMS ((void)); extern void objc_class_section (void);
extern void objc_meta_class_section PARAMS ((void)); extern void objc_meta_class_section (void);
extern void objc_category_section PARAMS ((void)); extern void objc_category_section (void);
extern void objc_class_vars_section PARAMS ((void)); extern void objc_class_vars_section (void);
extern void objc_instance_vars_section PARAMS ((void)); extern void objc_instance_vars_section (void);
extern void objc_cls_meth_section PARAMS ((void)); extern void objc_cls_meth_section (void);
extern void objc_inst_meth_section PARAMS ((void)); extern void objc_inst_meth_section (void);
extern void objc_cat_cls_meth_section PARAMS ((void)); extern void objc_cat_cls_meth_section (void);
extern void objc_cat_inst_meth_section PARAMS ((void)); extern void objc_cat_inst_meth_section (void);
extern void objc_selector_refs_section PARAMS ((void)); extern void objc_selector_refs_section (void);
extern void objc_selector_fixup_section PARAMS ((void)); extern void objc_selector_fixup_section (void);
extern void objc_symbols_section PARAMS ((void)); extern void objc_symbols_section (void);
extern void objc_module_info_section PARAMS ((void)); extern void objc_module_info_section (void);
extern void objc_protocol_section PARAMS ((void)); extern void objc_protocol_section (void);
extern void objc_string_object_section PARAMS ((void)); extern void objc_string_object_section (void);
extern void objc_constant_string_object_section PARAMS ((void)); extern void objc_constant_string_object_section (void);
extern void objc_class_names_section PARAMS ((void)); extern void objc_class_names_section (void);
extern void objc_meth_var_names_section PARAMS ((void)); extern void objc_meth_var_names_section (void);
extern void objc_meth_var_types_section PARAMS ((void)); extern void objc_meth_var_types_section (void);
extern void objc_cls_refs_section PARAMS ((void)); extern void objc_cls_refs_section (void);
extern void machopic_lazy_symbol_ptr_section PARAMS ((void)); extern void machopic_lazy_symbol_ptr_section (void);
extern void machopic_nl_symbol_ptr_section PARAMS ((void)); extern void machopic_nl_symbol_ptr_section (void);
extern void machopic_symbol_stub_section PARAMS ((void)); extern void machopic_symbol_stub_section (void);
extern void machopic_picsymbol_stub_section PARAMS ((void)); extern void machopic_picsymbol_stub_section (void);
extern void machopic_output_stub PARAMS ((FILE *, const char *, const char *)); extern void machopic_output_stub (FILE *, const char *, const char *);
extern void darwin_exception_section PARAMS ((void)); extern void darwin_exception_section (void);
extern void darwin_eh_frame_section PARAMS ((void)); extern void darwin_eh_frame_section (void);
extern void darwin_globalize_label PARAMS ((FILE *, const char *)); extern void darwin_globalize_label (FILE *, const char *);
extern void darwin_asm_output_dwarf_delta PARAMS ((FILE *, int, const char *, const char *)); extern void darwin_asm_output_dwarf_delta (FILE *, int, const char *,
const char *);
...@@ -42,13 +42,12 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,13 +42,12 @@ Boston, MA 02111-1307, USA. */
#include "langhooks.h" #include "langhooks.h"
#include "tm_p.h" #include "tm_p.h"
static int machopic_data_defined_p PARAMS ((const char *)); static int machopic_data_defined_p (const char *);
static void update_non_lazy_ptrs PARAMS ((const char *)); static void update_non_lazy_ptrs (const char *);
static void update_stubs PARAMS ((const char *)); static void update_stubs (const char *);
int int
name_needs_quotes (name) name_needs_quotes (const char *name)
const char *name;
{ {
int c; int c;
while ((c = *name++) != '\0') while ((c = *name++) != '\0')
...@@ -57,7 +56,7 @@ name_needs_quotes (name) ...@@ -57,7 +56,7 @@ name_needs_quotes (name)
return 0; return 0;
} }
/* /*
* flag_pic = 1 ... generate only indirections * flag_pic = 1 ... generate only indirections
* flag_pic = 2 ... generate indirections and pure code * flag_pic = 2 ... generate indirections and pure code
*/ */
...@@ -68,20 +67,19 @@ name_needs_quotes (name) ...@@ -68,20 +67,19 @@ name_needs_quotes (name)
static GTY(()) tree machopic_defined_list; static GTY(()) tree machopic_defined_list;
enum machopic_addr_class enum machopic_addr_class
machopic_classify_ident (ident) machopic_classify_ident (tree ident)
tree ident;
{ {
const char *name = IDENTIFIER_POINTER (ident); const char *name = IDENTIFIER_POINTER (ident);
int lprefix = (((name[0] == '*' || name[0] == '&') int lprefix = (((name[0] == '*' || name[0] == '&')
&& (name[1] == 'L' || (name[1] == '"' && name[2] == 'L'))) && (name[1] == 'L' || (name[1] == '"' && name[2] == 'L')))
|| ( name[0] == '_' || ( name[0] == '_'
&& name[1] == 'O' && name[1] == 'O'
&& name[2] == 'B' && name[2] == 'B'
&& name[3] == 'J' && name[3] == 'J'
&& name[4] == 'C' && name[4] == 'C'
&& name[5] == '_')); && name[5] == '_'));
tree temp; tree temp;
/* The PIC base symbol is always defined. */ /* The PIC base symbol is always defined. */
if (! strcmp (name, "<pic base>")) if (! strcmp (name, "<pic base>"))
return MACHOPIC_DEFINED_DATA; return MACHOPIC_DEFINED_DATA;
...@@ -146,7 +144,7 @@ machopic_classify_ident (ident) ...@@ -146,7 +144,7 @@ machopic_classify_ident (ident)
return MACHOPIC_DEFINED_DATA; return MACHOPIC_DEFINED_DATA;
} }
} }
if (name[1] == 't' || name[1] == 'T') if (name[1] == 't' || name[1] == 'T')
{ {
if (lprefix) if (lprefix)
...@@ -163,17 +161,15 @@ machopic_classify_ident (ident) ...@@ -163,17 +161,15 @@ machopic_classify_ident (ident)
} }
} }
enum machopic_addr_class enum machopic_addr_class
machopic_classify_name (name) machopic_classify_name (const char *name)
const char *name;
{ {
return machopic_classify_ident (get_identifier (name)); return machopic_classify_ident (get_identifier (name));
} }
int int
machopic_ident_defined_p (ident) machopic_ident_defined_p (tree ident)
tree ident;
{ {
switch (machopic_classify_ident (ident)) switch (machopic_classify_ident (ident))
{ {
...@@ -187,8 +183,7 @@ machopic_ident_defined_p (ident) ...@@ -187,8 +183,7 @@ machopic_ident_defined_p (ident)
} }
static int static int
machopic_data_defined_p (name) machopic_data_defined_p (const char *name)
const char *name;
{ {
switch (machopic_classify_ident (get_identifier (name))) switch (machopic_classify_ident (get_identifier (name)))
{ {
...@@ -200,24 +195,21 @@ machopic_data_defined_p (name) ...@@ -200,24 +195,21 @@ machopic_data_defined_p (name)
} }
int int
machopic_name_defined_p (name) machopic_name_defined_p (const char *name)
const char *name;
{ {
return machopic_ident_defined_p (get_identifier (name)); return machopic_ident_defined_p (get_identifier (name));
} }
void void
machopic_define_ident (ident) machopic_define_ident (tree ident)
tree ident;
{ {
if (!machopic_ident_defined_p (ident)) if (!machopic_ident_defined_p (ident))
machopic_defined_list = machopic_defined_list =
tree_cons (NULL_TREE, ident, machopic_defined_list); tree_cons (NULL_TREE, ident, machopic_defined_list);
} }
void void
machopic_define_name (name) machopic_define_name (const char *name)
const char *name;
{ {
machopic_define_ident (get_identifier (name)); machopic_define_ident (get_identifier (name));
} }
...@@ -225,17 +217,17 @@ machopic_define_name (name) ...@@ -225,17 +217,17 @@ machopic_define_name (name)
static GTY(()) char * function_base; static GTY(()) char * function_base;
const char * const char *
machopic_function_base_name () machopic_function_base_name (void)
{ {
const char *current_name; const char *current_name;
/* if dynamic-no-pic is on, we should not get here */ /* if dynamic-no-pic is on, we should not get here */
if (MACHO_DYNAMIC_NO_PIC_P) if (MACHO_DYNAMIC_NO_PIC_P)
abort (); abort ();
current_name = current_name =
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)); IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl));
if (function_base == NULL) if (function_base == NULL)
function_base = function_base =
(char *) ggc_alloc_string ("<pic base>", sizeof ("<pic base>")); (char *) ggc_alloc_string ("<pic base>", sizeof ("<pic base>"));
current_function_uses_pic_offset_table = 1; current_function_uses_pic_offset_table = 1;
...@@ -254,7 +246,7 @@ machopic_output_function_base_name (FILE *file) ...@@ -254,7 +246,7 @@ machopic_output_function_base_name (FILE *file)
/* If dynamic-no-pic is on, we should not get here. */ /* If dynamic-no-pic is on, we should not get here. */
if (MACHO_DYNAMIC_NO_PIC_P) if (MACHO_DYNAMIC_NO_PIC_P)
abort (); abort ();
current_name = current_name =
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)); IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl));
if (function_base_func_name != current_name) if (function_base_func_name != current_name)
{ {
...@@ -270,15 +262,14 @@ static GTY(()) tree machopic_non_lazy_pointers; ...@@ -270,15 +262,14 @@ static GTY(()) tree machopic_non_lazy_pointers;
either by finding it in our list of pointer names, or by generating either by finding it in our list of pointer names, or by generating
a new one. */ a new one. */
const char * const char *
machopic_non_lazy_ptr_name (name) machopic_non_lazy_ptr_name (const char *name)
const char *name;
{ {
const char *temp_name; const char *temp_name;
tree temp, ident = get_identifier (name); tree temp, ident = get_identifier (name);
for (temp = machopic_non_lazy_pointers; for (temp = machopic_non_lazy_pointers;
temp != NULL_TREE; temp != NULL_TREE;
temp = TREE_CHAIN (temp)) temp = TREE_CHAIN (temp))
{ {
if (ident == TREE_VALUE (temp)) if (ident == TREE_VALUE (temp))
...@@ -289,7 +280,7 @@ machopic_non_lazy_ptr_name (name) ...@@ -289,7 +280,7 @@ machopic_non_lazy_ptr_name (name)
/* Try again, but comparing names this time. */ /* Try again, but comparing names this time. */
for (temp = machopic_non_lazy_pointers; for (temp = machopic_non_lazy_pointers;
temp != NULL_TREE; temp != NULL_TREE;
temp = TREE_CHAIN (temp)) temp = TREE_CHAIN (temp))
{ {
if (TREE_VALUE (temp)) if (TREE_VALUE (temp))
...@@ -315,11 +306,11 @@ machopic_non_lazy_ptr_name (name) ...@@ -315,11 +306,11 @@ machopic_non_lazy_ptr_name (name)
strcat (buffer, "_"); strcat (buffer, "_");
strcat (buffer, name); strcat (buffer, name);
} }
strcat (buffer, "$non_lazy_ptr"); strcat (buffer, "$non_lazy_ptr");
ptr_name = get_identifier (buffer); ptr_name = get_identifier (buffer);
machopic_non_lazy_pointers machopic_non_lazy_pointers
= tree_cons (ptr_name, ident, machopic_non_lazy_pointers); = tree_cons (ptr_name, ident, machopic_non_lazy_pointers);
TREE_USED (machopic_non_lazy_pointers) = 0; TREE_USED (machopic_non_lazy_pointers) = 0;
...@@ -333,15 +324,14 @@ static GTY(()) tree machopic_stubs; ...@@ -333,15 +324,14 @@ static GTY(()) tree machopic_stubs;
/* Return the name of the stub corresponding to the given name, /* Return the name of the stub corresponding to the given name,
generating a new stub name if necessary. */ generating a new stub name if necessary. */
const char * const char *
machopic_stub_name (name) machopic_stub_name (const char *name)
const char *name;
{ {
tree temp, ident = get_identifier (name); tree temp, ident = get_identifier (name);
const char *tname; const char *tname;
for (temp = machopic_stubs; for (temp = machopic_stubs;
temp != NULL_TREE; temp != NULL_TREE;
temp = TREE_CHAIN (temp)) temp = TREE_CHAIN (temp))
{ {
if (ident == TREE_VALUE (temp)) if (ident == TREE_VALUE (temp))
...@@ -394,9 +384,7 @@ machopic_stub_name (name) ...@@ -394,9 +384,7 @@ machopic_stub_name (name)
} }
void void
machopic_validate_stub_or_non_lazy_ptr (name, validate_stub) machopic_validate_stub_or_non_lazy_ptr (const char *name, int validate_stub)
const char *name;
int validate_stub;
{ {
const char *real_name; const char *real_name;
tree temp, ident = get_identifier (name), id2; tree temp, ident = get_identifier (name), id2;
...@@ -423,11 +411,10 @@ machopic_validate_stub_or_non_lazy_ptr (name, validate_stub) ...@@ -423,11 +411,10 @@ machopic_validate_stub_or_non_lazy_ptr (name, validate_stub)
source using indirections. */ source using indirections. */
rtx rtx
machopic_indirect_data_reference (orig, reg) machopic_indirect_data_reference (rtx orig, rtx reg)
rtx orig, reg;
{ {
rtx ptr_ref = orig; rtx ptr_ref = orig;
if (! MACHOPIC_INDIRECT) if (! MACHOPIC_INDIRECT)
return orig; return orig;
...@@ -440,7 +427,7 @@ machopic_indirect_data_reference (orig, reg) ...@@ -440,7 +427,7 @@ machopic_indirect_data_reference (orig, reg)
if (defined && MACHO_DYNAMIC_NO_PIC_P) if (defined && MACHO_DYNAMIC_NO_PIC_P)
{ {
#if defined (TARGET_TOC) #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)); emit_insn (gen_macho_low (reg, reg, orig));
#else #else
/* some other cpu -- writeme! */ /* some other cpu -- writeme! */
...@@ -451,7 +438,7 @@ machopic_indirect_data_reference (orig, reg) ...@@ -451,7 +438,7 @@ machopic_indirect_data_reference (orig, reg)
else if (defined) else if (defined)
{ {
#if defined (TARGET_TOC) || defined (HAVE_lo_sum) #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 ()); machopic_function_base_name ());
rtx offset = gen_rtx (CONST, Pmode, rtx offset = gen_rtx (CONST, Pmode,
gen_rtx (MINUS, Pmode, orig, pic_base)); gen_rtx (MINUS, Pmode, orig, pic_base));
...@@ -507,7 +494,7 @@ machopic_indirect_data_reference (orig, reg) ...@@ -507,7 +494,7 @@ machopic_indirect_data_reference (orig, reg)
orig = machopic_indirect_data_reference (XEXP (XEXP (orig, 0), 1), orig = machopic_indirect_data_reference (XEXP (XEXP (orig, 0), 1),
(base == reg ? 0 : reg)); (base == reg ? 0 : reg));
} }
else else
return orig; return orig;
if (MACHOPIC_PURE && GET_CODE (orig) == CONST_INT) if (MACHOPIC_PURE && GET_CODE (orig) == CONST_INT)
...@@ -557,14 +544,13 @@ machopic_indirect_data_reference (orig, reg) ...@@ -557,14 +544,13 @@ machopic_indirect_data_reference (orig, reg)
corresponding symbol_stub if necessary. Return a new MEM. */ corresponding symbol_stub if necessary. Return a new MEM. */
rtx rtx
machopic_indirect_call_target (target) machopic_indirect_call_target (rtx target)
rtx target;
{ {
if (GET_CODE (target) != MEM) if (GET_CODE (target) != MEM)
return target; return target;
if (MACHOPIC_INDIRECT && GET_CODE (XEXP (target, 0)) == SYMBOL_REF) if (MACHOPIC_INDIRECT && GET_CODE (XEXP (target, 0)) == SYMBOL_REF)
{ {
enum machine_mode mode = GET_MODE (XEXP (target, 0)); enum machine_mode mode = GET_MODE (XEXP (target, 0));
const char *name = XSTR (XEXP (target, 0), 0); const char *name = XSTR (XEXP (target, 0), 0);
...@@ -578,16 +564,14 @@ machopic_indirect_call_target (target) ...@@ -578,16 +564,14 @@ machopic_indirect_call_target (target)
XEXP (target, 0) = gen_rtx (SYMBOL_REF, mode, stub_name); XEXP (target, 0) = gen_rtx (SYMBOL_REF, mode, stub_name);
RTX_UNCHANGING_P (target) = 1; RTX_UNCHANGING_P (target) = 1;
} }
} }
return target; return target;
} }
rtx rtx
machopic_legitimize_pic_address (orig, mode, reg) machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
rtx orig, reg;
enum machine_mode mode;
{ {
rtx pic_ref = orig; rtx pic_ref = orig;
...@@ -604,7 +588,7 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -604,7 +588,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
orig = machopic_indirect_data_reference (orig, reg); orig = machopic_indirect_data_reference (orig, reg);
if (GET_CODE (orig) == PLUS if (GET_CODE (orig) == PLUS
&& GET_CODE (XEXP (orig, 0)) == REG) && GET_CODE (XEXP (orig, 0)) == REG)
{ {
if (reg == 0) if (reg == 0)
...@@ -612,7 +596,7 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -612,7 +596,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
emit_move_insn (reg, orig); emit_move_insn (reg, orig);
return reg; return reg;
} }
/* if dynamic-no-pic then use 0 as the pic base */ /* if dynamic-no-pic then use 0 as the pic base */
if (MACHO_DYNAMIC_NO_PIC_P) if (MACHO_DYNAMIC_NO_PIC_P)
...@@ -629,7 +613,7 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -629,7 +613,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
else else
reg = gen_reg_rtx (Pmode); reg = gen_reg_rtx (Pmode);
} }
#ifdef HAVE_lo_sum #ifdef HAVE_lo_sum
if (MACHO_DYNAMIC_NO_PIC_P if (MACHO_DYNAMIC_NO_PIC_P
&& (GET_CODE (XEXP (orig, 0)) == SYMBOL_REF && (GET_CODE (XEXP (orig, 0)) == SYMBOL_REF
...@@ -652,7 +636,7 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -652,7 +636,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
pic_ref = reg; pic_ref = reg;
} }
else else
if (GET_CODE (XEXP (orig, 0)) == SYMBOL_REF if (GET_CODE (XEXP (orig, 0)) == SYMBOL_REF
|| GET_CODE (XEXP (orig, 0)) == LABEL_REF) || GET_CODE (XEXP (orig, 0)) == LABEL_REF)
{ {
rtx offset = gen_rtx (CONST, Pmode, rtx offset = gen_rtx (CONST, Pmode,
...@@ -670,7 +654,7 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -670,7 +654,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
gen_rtx (HIGH, Pmode, offset)))); gen_rtx (HIGH, Pmode, offset))));
emit_insn (gen_rtx (SET, VOIDmode, reg, emit_insn (gen_rtx (SET, VOIDmode, reg,
gen_rtx (MEM, GET_MODE (orig), gen_rtx (MEM, GET_MODE (orig),
gen_rtx (LO_SUM, Pmode, gen_rtx (LO_SUM, Pmode,
hi_sum_reg, offset)))); hi_sum_reg, offset))));
pic_ref = reg; pic_ref = reg;
...@@ -679,10 +663,10 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -679,10 +663,10 @@ machopic_legitimize_pic_address (orig, mode, reg)
gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM))); gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM)));
emit_insn (gen_rtx (SET, VOIDmode, reg, emit_insn (gen_rtx (SET, VOIDmode, reg,
gen_rtx (HIGH, Pmode, gen_rtx (HIGH, Pmode,
gen_rtx (CONST, Pmode, offset)))); gen_rtx (CONST, Pmode, offset))));
emit_insn (gen_rtx (SET, VOIDmode, reg, emit_insn (gen_rtx (SET, VOIDmode, reg,
gen_rtx (LO_SUM, Pmode, reg, gen_rtx (LO_SUM, Pmode, reg,
gen_rtx (CONST, Pmode, offset)))); gen_rtx (CONST, Pmode, offset))));
pic_ref = gen_rtx (PLUS, Pmode, pic_ref = gen_rtx (PLUS, Pmode,
pic_offset_table_rtx, reg); pic_offset_table_rtx, reg);
...@@ -703,13 +687,13 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -703,13 +687,13 @@ machopic_legitimize_pic_address (orig, mode, reg)
#endif #endif
pic_ref = gen_rtx (PLUS, Pmode, pic_ref = gen_rtx (PLUS, Pmode,
pic, pic,
gen_rtx (CONST, Pmode, gen_rtx (CONST, Pmode,
gen_rtx (MINUS, Pmode, gen_rtx (MINUS, Pmode,
XEXP (orig, 0), XEXP (orig, 0),
pic_base))); pic_base)));
} }
#if !defined (TARGET_TOC) #if !defined (TARGET_TOC)
emit_move_insn (reg, pic_ref); emit_move_insn (reg, pic_ref);
pic_ref = gen_rtx (MEM, GET_MODE (orig), reg); pic_ref = gen_rtx (MEM, GET_MODE (orig), reg);
...@@ -720,7 +704,7 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -720,7 +704,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
{ {
#ifdef HAVE_lo_sum #ifdef HAVE_lo_sum
if (GET_CODE (orig) == SYMBOL_REF if (GET_CODE (orig) == SYMBOL_REF
|| GET_CODE (orig) == LABEL_REF) || GET_CODE (orig) == LABEL_REF)
{ {
rtx offset = gen_rtx (CONST, Pmode, rtx offset = gen_rtx (CONST, Pmode,
...@@ -735,7 +719,7 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -735,7 +719,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
else else
reg = gen_reg_rtx (SImode); reg = gen_reg_rtx (SImode);
} }
hi_sum_reg = reg; hi_sum_reg = reg;
emit_insn (gen_rtx (SET, Pmode, hi_sum_reg, emit_insn (gen_rtx (SET, Pmode, hi_sum_reg,
...@@ -780,7 +764,7 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -780,7 +764,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
#endif #endif
pic_ref = gen_rtx (PLUS, Pmode, pic_ref = gen_rtx (PLUS, Pmode,
pic, pic,
gen_rtx (CONST, Pmode, gen_rtx (CONST, Pmode,
gen_rtx (MINUS, Pmode, gen_rtx (MINUS, Pmode,
orig, pic_base))); orig, pic_base)));
} }
...@@ -814,7 +798,7 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -814,7 +798,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
|| GET_CODE (XEXP (orig, 0)) == LABEL_REF) || GET_CODE (XEXP (orig, 0)) == LABEL_REF)
&& XEXP (orig, 0) != pic_offset_table_rtx && XEXP (orig, 0) != pic_offset_table_rtx
&& GET_CODE (XEXP (orig, 1)) != REG) && GET_CODE (XEXP (orig, 1)) != REG)
{ {
rtx base; rtx base;
int is_complex = (GET_CODE (XEXP (orig, 0)) == MEM); int is_complex = (GET_CODE (XEXP (orig, 0)) == MEM);
...@@ -862,8 +846,7 @@ machopic_legitimize_pic_address (orig, mode, reg) ...@@ -862,8 +846,7 @@ machopic_legitimize_pic_address (orig, mode, reg)
void void
machopic_finish (asm_out_file) machopic_finish (FILE *asm_out_file)
FILE *asm_out_file;
{ {
tree temp; tree temp;
...@@ -889,7 +872,7 @@ machopic_finish (asm_out_file) ...@@ -889,7 +872,7 @@ machopic_finish (asm_out_file)
if (sym_name[0] == '*' || sym_name[0] == '&') if (sym_name[0] == '*' || sym_name[0] == '&')
strcpy (sym, sym_name + 1); strcpy (sym, sym_name + 1);
else if (sym_name[0] == '-' || sym_name[0] == '+') else if (sym_name[0] == '-' || sym_name[0] == '+')
strcpy (sym, sym_name); strcpy (sym, sym_name);
else else
sym[0] = '_', strcpy (sym + 1, sym_name); sym[0] = '_', strcpy (sym + 1, sym_name);
...@@ -903,7 +886,7 @@ machopic_finish (asm_out_file) ...@@ -903,7 +886,7 @@ machopic_finish (asm_out_file)
} }
for (temp = machopic_non_lazy_pointers; for (temp = machopic_non_lazy_pointers;
temp != NULL_TREE; temp != NULL_TREE;
temp = TREE_CHAIN (temp)) temp = TREE_CHAIN (temp))
{ {
const char *const sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); const char *const sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
...@@ -924,11 +907,11 @@ machopic_finish (asm_out_file) ...@@ -924,11 +907,11 @@ machopic_finish (asm_out_file)
else else
{ {
machopic_nl_symbol_ptr_section (); 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, ":\n");
fprintf (asm_out_file, "\t.indirect_symbol "); 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"); fprintf (asm_out_file, "\n");
assemble_integer (const0_rtx, GET_MODE_SIZE (Pmode), assemble_integer (const0_rtx, GET_MODE_SIZE (Pmode),
...@@ -937,9 +920,8 @@ machopic_finish (asm_out_file) ...@@ -937,9 +920,8 @@ machopic_finish (asm_out_file)
} }
} }
int int
machopic_operand_p (op) machopic_operand_p (rtx op)
rtx op;
{ {
if (MACHOPIC_JUST_INDIRECT) if (MACHOPIC_JUST_INDIRECT)
{ {
...@@ -970,10 +952,7 @@ machopic_operand_p (op) ...@@ -970,10 +952,7 @@ machopic_operand_p (op)
use later. */ use later. */
void void
darwin_encode_section_info (decl, rtl, first) darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
tree decl;
rtx rtl;
int first ATTRIBUTE_UNUSED;
{ {
char code = '\0'; char code = '\0';
int defined = 0; int defined = 0;
...@@ -1043,8 +1022,7 @@ darwin_encode_section_info (decl, rtl, first) ...@@ -1043,8 +1022,7 @@ darwin_encode_section_info (decl, rtl, first)
/* Undo the effects of the above. */ /* Undo the effects of the above. */
const char * const char *
darwin_strip_name_encoding (str) darwin_strip_name_encoding (const char *str)
const char *str;
{ {
return str[0] == '!' ? str + 4 : str; return str[0] == '!' ? str + 4 : str;
} }
...@@ -1053,8 +1031,7 @@ darwin_strip_name_encoding (str) ...@@ -1053,8 +1031,7 @@ darwin_strip_name_encoding (str)
stripped name matches the argument. */ stripped name matches the argument. */
static void static void
update_non_lazy_ptrs (name) update_non_lazy_ptrs (const char *name)
const char *name;
{ {
const char *name1, *name2; const char *name1, *name2;
tree temp; tree temp;
...@@ -1062,7 +1039,7 @@ update_non_lazy_ptrs (name) ...@@ -1062,7 +1039,7 @@ update_non_lazy_ptrs (name)
name1 = darwin_strip_name_encoding (name); name1 = darwin_strip_name_encoding (name);
for (temp = machopic_non_lazy_pointers; for (temp = machopic_non_lazy_pointers;
temp != NULL_TREE; temp != NULL_TREE;
temp = TREE_CHAIN (temp)) temp = TREE_CHAIN (temp))
{ {
const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
...@@ -1073,7 +1050,7 @@ update_non_lazy_ptrs (name) ...@@ -1073,7 +1050,7 @@ update_non_lazy_ptrs (name)
if (strcmp (name1, name2) == 0) if (strcmp (name1, name2) == 0)
{ {
/* FIXME: This breaks the identifier hash table. */ /* 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; = (unsigned char *) name;
break; break;
} }
...@@ -1086,9 +1063,7 @@ update_non_lazy_ptrs (name) ...@@ -1086,9 +1063,7 @@ update_non_lazy_ptrs (name)
just emit the stub label now and we don't bother emitting the stub later. */ just emit the stub label now and we don't bother emitting the stub later. */
void void
machopic_output_possible_stub_label (file, name) machopic_output_possible_stub_label (FILE *file, const char *name)
FILE *file;
const char *name;
{ {
tree temp; tree temp;
...@@ -1119,8 +1094,7 @@ machopic_output_possible_stub_label (file, name) ...@@ -1119,8 +1094,7 @@ machopic_output_possible_stub_label (file, name)
stripped name matches the argument. */ stripped name matches the argument. */
static void static void
update_stubs (name) update_stubs (const char *name)
const char *name;
{ {
const char *name1, *name2; const char *name1, *name2;
tree temp; tree temp;
...@@ -1128,7 +1102,7 @@ update_stubs (name) ...@@ -1128,7 +1102,7 @@ update_stubs (name)
name1 = darwin_strip_name_encoding (name); name1 = darwin_strip_name_encoding (name);
for (temp = machopic_stubs; for (temp = machopic_stubs;
temp != NULL_TREE; temp != NULL_TREE;
temp = TREE_CHAIN (temp)) temp = TREE_CHAIN (temp))
{ {
const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp)); const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
...@@ -1139,7 +1113,7 @@ update_stubs (name) ...@@ -1139,7 +1113,7 @@ update_stubs (name)
if (strcmp (name1, name2) == 0) if (strcmp (name1, name2) == 0)
{ {
/* FIXME: This breaks the identifier hash table. */ /* 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; = (unsigned char *) name;
break; break;
} }
...@@ -1148,22 +1122,20 @@ update_stubs (name) ...@@ -1148,22 +1122,20 @@ update_stubs (name)
} }
void void
machopic_select_section (exp, reloc, align) machopic_select_section (tree exp, int reloc,
tree exp; unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
int reloc;
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
{ {
void (*base_function)(void); void (*base_function)(void);
if (decl_readonly_section_1 (exp, reloc, MACHOPIC_INDIRECT)) if (decl_readonly_section_1 (exp, reloc, MACHOPIC_INDIRECT))
base_function = readonly_data_section; base_function = readonly_data_section;
else if (TREE_READONLY (exp) || TREE_CONSTANT (exp)) else if (TREE_READONLY (exp) || TREE_CONSTANT (exp))
base_function = const_data_section; base_function = const_data_section;
else else
base_function = data_section; base_function = data_section;
if (TREE_CODE (exp) == STRING_CST if (TREE_CODE (exp) == STRING_CST
&& ((size_t) TREE_STRING_LENGTH (exp) && ((size_t) TREE_STRING_LENGTH (exp)
== strlen (TREE_STRING_POINTER (exp)) + 1) == strlen (TREE_STRING_POINTER (exp)) + 1)
&& ! flag_writable_strings) && ! flag_writable_strings)
cstring_section (); cstring_section ();
...@@ -1261,10 +1233,8 @@ machopic_select_section (exp, reloc, align) ...@@ -1261,10 +1233,8 @@ machopic_select_section (exp, reloc, align)
They must go in "const". */ They must go in "const". */
void void
machopic_select_rtx_section (mode, x, align) machopic_select_rtx_section (enum machine_mode mode, rtx x,
enum machine_mode mode; unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
rtx x;
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
{ {
if (GET_MODE_SIZE (mode) == 8) if (GET_MODE_SIZE (mode) == 8)
literal8_section (); literal8_section ();
...@@ -1277,11 +1247,9 @@ machopic_select_rtx_section (mode, x, align) ...@@ -1277,11 +1247,9 @@ machopic_select_rtx_section (mode, x, align)
} }
void void
machopic_asm_out_constructor (symbol, priority) machopic_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
rtx symbol;
int priority ATTRIBUTE_UNUSED;
{ {
if (MACHOPIC_INDIRECT) if (MACHOPIC_INDIRECT)
mod_init_section (); mod_init_section ();
else else
...@@ -1289,17 +1257,15 @@ machopic_asm_out_constructor (symbol, priority) ...@@ -1289,17 +1257,15 @@ machopic_asm_out_constructor (symbol, priority)
assemble_align (POINTER_SIZE); assemble_align (POINTER_SIZE);
assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
if (! MACHOPIC_INDIRECT) if (! MACHOPIC_INDIRECT)
fprintf (asm_out_file, ".reference .constructors_used\n"); fprintf (asm_out_file, ".reference .constructors_used\n");
} }
void void
machopic_asm_out_destructor (symbol, priority) machopic_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
rtx symbol;
int priority ATTRIBUTE_UNUSED;
{ {
if (MACHOPIC_INDIRECT) if (MACHOPIC_INDIRECT)
mod_term_section (); mod_term_section ();
else else
...@@ -1312,9 +1278,7 @@ machopic_asm_out_destructor (symbol, priority) ...@@ -1312,9 +1278,7 @@ machopic_asm_out_destructor (symbol, priority)
} }
void void
darwin_globalize_label (stream, name) darwin_globalize_label (FILE *stream, const char *name)
FILE *stream;
const char *name;
{ {
if (!!strncmp (name, "_OBJC_", 6)) if (!!strncmp (name, "_OBJC_", 6))
default_globalize_label (stream, name); default_globalize_label (stream, name);
...@@ -1330,10 +1294,8 @@ darwin_globalize_label (stream, name) ...@@ -1330,10 +1294,8 @@ darwin_globalize_label (stream, name)
static int darwin_dwarf_label_counter; static int darwin_dwarf_label_counter;
void void
darwin_asm_output_dwarf_delta (file, size, lab1, lab2) darwin_asm_output_dwarf_delta (FILE *file, int size ATTRIBUTE_UNUSED,
FILE *file; const char *lab1, const char *lab2)
int size ATTRIBUTE_UNUSED;
const char *lab1, *lab2;
{ {
const char *p = lab1 + (lab1[0] == '*'); const char *p = lab1 + (lab1[0] == '*');
int islocaldiff = (p[0] == 'L'); int islocaldiff = (p[0] == 'L');
...@@ -1350,7 +1312,7 @@ darwin_asm_output_dwarf_delta (file, size, lab1, lab2) ...@@ -1350,7 +1312,7 @@ darwin_asm_output_dwarf_delta (file, size, lab1, lab2)
} }
void void
darwin_file_end () darwin_file_end (void)
{ {
machopic_finish (asm_out_file); machopic_finish (asm_out_file);
if (strcmp (lang_hooks.name, "GNU C++") == 0) if (strcmp (lang_hooks.name, "GNU C++") == 0)
...@@ -1362,4 +1324,3 @@ darwin_file_end () ...@@ -1362,4 +1324,3 @@ darwin_file_end ()
} }
#include "gt-darwin.h" #include "gt-darwin.h"
...@@ -368,7 +368,7 @@ do { text_section (); \ ...@@ -368,7 +368,7 @@ do { text_section (); \
|| DECL_INITIAL (DECL)) \ || DECL_INITIAL (DECL)) \
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \ (* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
ASM_OUTPUT_LABEL (FILE, xname); \ 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. */ \ byte. */ \
if (tree_low_cst (DECL_SIZE_UNIT (DECL), 1) == 0) \ if (tree_low_cst (DECL_SIZE_UNIT (DECL), 1) == 0) \
assemble_zeros (1); \ assemble_zeros (1); \
...@@ -478,9 +478,9 @@ do { text_section (); \ ...@@ -478,9 +478,9 @@ do { text_section (); \
#undef SECTION_FUNCTION #undef SECTION_FUNCTION
#define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, OBJC) \ #define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, OBJC) \
extern void FUNCTION PARAMS ((void)); \ extern void FUNCTION (void); \
void \ void \
FUNCTION () \ FUNCTION (void) \
{ \ { \
if (in_section != SECTION) \ if (in_section != SECTION) \
{ \ { \
...@@ -509,7 +509,7 @@ FUNCTION () \ ...@@ -509,7 +509,7 @@ FUNCTION () \
in_objc_protocol, in_objc_string_object, \ in_objc_protocol, in_objc_string_object, \
in_objc_constant_string_object, \ in_objc_constant_string_object, \
in_objc_class_names, in_objc_meth_var_names, \ 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_nl_symbol_ptr, \
in_machopic_lazy_symbol_ptr, \ in_machopic_lazy_symbol_ptr, \
in_machopic_symbol_stub, \ in_machopic_symbol_stub, \
...@@ -521,7 +521,7 @@ FUNCTION () \ ...@@ -521,7 +521,7 @@ FUNCTION () \
#undef EXTRA_SECTION_FUNCTIONS #undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \ #define EXTRA_SECTION_FUNCTIONS \
static void objc_section_init PARAMS ((void)); \ static void objc_section_init (void); \
SECTION_FUNCTION (const_section, \ SECTION_FUNCTION (const_section, \
in_const, \ in_const, \
".const", 0) \ ".const", 0) \
...@@ -612,19 +612,19 @@ SECTION_FUNCTION (objc_cls_refs_section, \ ...@@ -612,19 +612,19 @@ SECTION_FUNCTION (objc_cls_refs_section, \
\ \
SECTION_FUNCTION (machopic_lazy_symbol_ptr_section, \ SECTION_FUNCTION (machopic_lazy_symbol_ptr_section, \
in_machopic_lazy_symbol_ptr, \ in_machopic_lazy_symbol_ptr, \
".lazy_symbol_pointer", 0) \ ".lazy_symbol_pointer", 0) \
SECTION_FUNCTION (machopic_nl_symbol_ptr_section, \ SECTION_FUNCTION (machopic_nl_symbol_ptr_section, \
in_machopic_nl_symbol_ptr, \ in_machopic_nl_symbol_ptr, \
".non_lazy_symbol_pointer", 0) \ ".non_lazy_symbol_pointer", 0) \
SECTION_FUNCTION (machopic_symbol_stub_section, \ SECTION_FUNCTION (machopic_symbol_stub_section, \
in_machopic_symbol_stub, \ in_machopic_symbol_stub, \
".symbol_stub", 0) \ ".symbol_stub", 0) \
SECTION_FUNCTION (machopic_symbol_stub1_section, \ SECTION_FUNCTION (machopic_symbol_stub1_section, \
in_machopic_symbol_stub1, \ in_machopic_symbol_stub1, \
".section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16", 0)\ ".section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16", 0)\
SECTION_FUNCTION (machopic_picsymbol_stub_section, \ SECTION_FUNCTION (machopic_picsymbol_stub_section, \
in_machopic_picsymbol_stub, \ in_machopic_picsymbol_stub, \
".picsymbol_stub", 0) \ ".picsymbol_stub", 0) \
SECTION_FUNCTION (machopic_picsymbol_stub1_section, \ SECTION_FUNCTION (machopic_picsymbol_stub1_section, \
in_machopic_picsymbol_stub1, \ in_machopic_picsymbol_stub1, \
".section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32", 0)\ ".section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32", 0)\
...@@ -636,7 +636,7 @@ SECTION_FUNCTION (darwin_eh_frame_section, \ ...@@ -636,7 +636,7 @@ SECTION_FUNCTION (darwin_eh_frame_section, \
".section __TEXT,__eh_frame", 0) \ ".section __TEXT,__eh_frame", 0) \
\ \
static void \ static void \
objc_section_init () \ objc_section_init (void) \
{ \ { \
static int been_here = 0; \ static int been_here = 0; \
\ \
...@@ -653,7 +653,7 @@ objc_section_init () \ ...@@ -653,7 +653,7 @@ objc_section_init () \
objc_cls_refs_section (); \ objc_cls_refs_section (); \
objc_class_section (); \ objc_class_section (); \
objc_meta_class_section (); \ objc_meta_class_section (); \
/* shared, hot -> cold */ \ /* shared, hot -> cold */ \
objc_cls_meth_section (); \ objc_cls_meth_section (); \
objc_inst_meth_section (); \ objc_inst_meth_section (); \
objc_protocol_section (); \ objc_protocol_section (); \
...@@ -676,7 +676,7 @@ objc_section_init () \ ...@@ -676,7 +676,7 @@ objc_section_init () \
#define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section #define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section
#define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \ #define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \
do { \ do { \
if (FILE) { \ if (FILE) { \
if (MACHOPIC_INDIRECT) \ if (MACHOPIC_INDIRECT) \
fprintf (FILE, "\t.lazy_reference "); \ fprintf (FILE, "\t.lazy_reference "); \
...@@ -691,7 +691,7 @@ objc_section_init () \ ...@@ -691,7 +691,7 @@ objc_section_init () \
do { \ do { \
if (FILE) { \ if (FILE) { \
fprintf (FILE, "\t"); \ fprintf (FILE, "\t"); \
assemble_name (FILE, NAME); \ assemble_name (FILE, NAME); \
fprintf (FILE, "=0\n"); \ fprintf (FILE, "=0\n"); \
(*targetm.asm_out.globalize_label) (FILE, NAME); \ (*targetm.asm_out.globalize_label) (FILE, NAME); \
} \ } \
...@@ -793,7 +793,7 @@ enum machopic_addr_class { ...@@ -793,7 +793,7 @@ enum machopic_addr_class {
#define TARGET_ASM_EXCEPTION_SECTION darwin_exception_section #define TARGET_ASM_EXCEPTION_SECTION darwin_exception_section
#define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section #define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section
#undef ASM_PREFERRED_EH_DATA_FORMAT #undef ASM_PREFERRED_EH_DATA_FORMAT
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
(((CODE) == 2 && (GLOBAL) == 1) \ (((CODE) == 2 && (GLOBAL) == 1) \
......
...@@ -45,7 +45,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -45,7 +45,7 @@ Boston, MA 02111-1307, USA. */
{ "console", 0, N_("Create console application") },\ { "console", 0, N_("Create console application") },\
{ "dll", 0, N_("Generate code for a DLL") }, \ { "dll", 0, N_("Generate code for a DLL") }, \
{ "nop-fun-dllimport", MASK_NOP_FUN_DLLIMPORT, \ { "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, "" }, \ { "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" }, \
{ "threads", 0, N_("Use Mingw-specific thread support") }, { "threads", 0, N_("Use Mingw-specific thread support") },
...@@ -94,7 +94,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -94,7 +94,7 @@ Boston, MA 02111-1307, USA. */
Do not define this macro if it does not need to do anything. */ Do not define this macro if it does not need to do anything. */
#undef SUBTARGET_EXTRA_SPECS #undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \ #define SUBTARGET_EXTRA_SPECS \
{ "mingw_include_path", DEFAULT_TARGET_MACHINE } { "mingw_include_path", DEFAULT_TARGET_MACHINE }
#undef MATH_LIBRARY #undef MATH_LIBRARY
...@@ -130,7 +130,7 @@ drectve_section () \ ...@@ -130,7 +130,7 @@ drectve_section () \
in_section = in_drectve; \ in_section = in_drectve; \
} \ } \
} }
void drectve_section PARAMS ((void)); void drectve_section (void);
/* Switch to SECTION (an `enum in_section'). /* Switch to SECTION (an `enum in_section').
...@@ -138,21 +138,19 @@ void drectve_section PARAMS ((void)); ...@@ -138,21 +138,19 @@ void drectve_section PARAMS ((void));
The problem is that we want to temporarily switch sections in The problem is that we want to temporarily switch sections in
ASM_DECLARE_OBJECT_NAME and then switch back to the original section ASM_DECLARE_OBJECT_NAME and then switch back to the original section
afterwards. */ afterwards. */
#define SWITCH_TO_SECTION_FUNCTION \ #define SWITCH_TO_SECTION_FUNCTION \
void switch_to_section PARAMS ((enum in_section, tree)); \ void switch_to_section (enum in_section, tree); \
void \ void \
switch_to_section (section, decl) \ switch_to_section (enum in_section section, tree decl) \
enum in_section section; \ { \
tree decl; \ switch (section) \
{ \ { \
switch (section) \ case in_text: text_section (); break; \
{ \ case in_data: data_section (); break; \
case in_text: text_section (); break; \ case in_named: named_section (decl, NULL, 0); break; \
case in_data: data_section (); break; \ case in_drectve: drectve_section (); break; \
case in_named: named_section (decl, NULL, 0); break; \ default: abort (); break; \
case in_drectve: drectve_section (); break; \ } \
default: abort (); break; \
} \
} }
/* Don't allow flag_pic to propagate since gas may produce invalid code /* Don't allow flag_pic to propagate since gas may produce invalid code
...@@ -173,15 +171,15 @@ do { \ ...@@ -173,15 +171,15 @@ do { \
differently depending on something about the variable or differently depending on something about the variable or
function named by the symbol (such as what section it is in). 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 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. attribute STDCALL.
In addition, we must mark dll symbols specially. Definitions of In addition, we must mark dll symbols specially. Definitions of
dllexport'd objects install some info in the .drectve section. dllexport'd objects install some info in the .drectve section.
References to dllimport'd objects are fetched indirectly via 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 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. 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. */ Note that we can be called twice on the same decl. */
...@@ -203,7 +201,7 @@ do { \ ...@@ -203,7 +201,7 @@ do { \
i386_pe_record_exported_symbol (NAME, 1); \ i386_pe_record_exported_symbol (NAME, 1); \
if (! i386_pe_dllimport_name_p (NAME)) \ if (! i386_pe_dllimport_name_p (NAME)) \
{ \ { \
fprintf ((STREAM), "\t.comm\t"); \ fprintf ((STREAM), "\t.comm\t"); \
assemble_name ((STREAM), (NAME)); \ assemble_name ((STREAM), (NAME)); \
fprintf ((STREAM), ", %d\t%s %d\n", \ fprintf ((STREAM), ", %d\t%s %d\n", \
(int)(ROUNDED), ASM_COMMENT_START, (int)(SIZE)); \ (int)(ROUNDED), ASM_COMMENT_START, (int)(SIZE)); \
...@@ -212,7 +210,7 @@ do { \ ...@@ -212,7 +210,7 @@ do { \
/* Output the label for an initialized variable. */ /* Output the label for an initialized variable. */
#undef ASM_DECLARE_OBJECT_NAME #undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \ #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
do { \ do { \
if (i386_pe_dllexport_name_p (NAME)) \ if (i386_pe_dllexport_name_p (NAME)) \
i386_pe_record_exported_symbol (NAME, 1); \ i386_pe_record_exported_symbol (NAME, 1); \
...@@ -248,7 +246,7 @@ do { \ ...@@ -248,7 +246,7 @@ do { \
symbols must be explicitly imported from shared libraries (DLLs). */ symbols must be explicitly imported from shared libraries (DLLs). */
#define MULTIPLE_SYMBOL_SPACES #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 TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section
#define SUPPORTS_ONE_ONLY 1 #define SUPPORTS_ONE_ONLY 1
...@@ -328,12 +326,12 @@ extern void i386_pe_unique_section PARAMS ((TREE, int)); ...@@ -328,12 +326,12 @@ extern void i386_pe_unique_section PARAMS ((TREE, int));
/* External function declarations. */ /* External function declarations. */
extern void i386_pe_record_external_function PARAMS ((const char *)); extern void i386_pe_record_external_function (const char *);
extern void i386_pe_declare_function_type PARAMS ((FILE *, const char *, int)); extern void i386_pe_declare_function_type (FILE *, const char *, int);
extern void i386_pe_record_exported_symbol PARAMS ((const char *, int)); extern void i386_pe_record_exported_symbol (const char *, int);
extern void i386_pe_file_end PARAMS ((void)); extern void i386_pe_file_end (void);
extern int i386_pe_dllexport_name_p PARAMS ((const char *)); extern int i386_pe_dllexport_name_p (const char *);
extern int i386_pe_dllimport_name_p PARAMS ((const char *)); extern int i386_pe_dllimport_name_p (const char *);
/* For Win32 ABI compatibility */ /* For Win32 ABI compatibility */
#undef DEFAULT_PCC_STRUCT_RETURN #undef DEFAULT_PCC_STRUCT_RETURN
......
...@@ -20,7 +20,7 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -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, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ 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. */ #define EXTRA_OS_CPP_BUILTINS() /* Nothing. */
...@@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA. */
#ifndef CYGWIN_MINGW_SUBDIR #ifndef CYGWIN_MINGW_SUBDIR
#define CYGWIN_MINGW_SUBDIR "/mingw" #define CYGWIN_MINGW_SUBDIR "/mingw"
#endif #endif
#define CYGWIN_MINGW_SUBDIR_LEN (sizeof (CYGWIN_MINGW_SUBDIR) - 1) #define CYGWIN_MINGW_SUBDIR_LEN (sizeof (CYGWIN_MINGW_SUBDIR) - 1)
#ifdef GPLUSPLUS_INCLUDE_DIR #ifdef GPLUSPLUS_INCLUDE_DIR
...@@ -199,7 +199,7 @@ char *cvt_to_mingw[] = ...@@ -199,7 +199,7 @@ char *cvt_to_mingw[] =
#undef GEN_CVT_ARRAY #undef GEN_CVT_ARRAY
#endif /*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 #if 1
#define GCC_DRIVER_HOST_INITIALIZATION \ #define GCC_DRIVER_HOST_INITIALIZATION \
do \ do \
......
...@@ -28,13 +28,13 @@ Boston, MA 02111-1307, USA. */ ...@@ -28,13 +28,13 @@ Boston, MA 02111-1307, USA. */
#include <string.h> #include <string.h>
/* /*
static void remove_w32api PARAMS ((void)); static void remove_w32api (void);
*/ */
static void add_mingw PARAMS ((void)); static void add_mingw (void);
static void set_mingw PARAMS((void)) __attribute__ ((constructor)); static void set_mingw (void) __attribute__ ((constructor));
static void static void
add_mingw () add_mingw (void)
{ {
char **av; char **av;
char *p; char *p;
...@@ -59,7 +59,7 @@ add_mingw () ...@@ -59,7 +59,7 @@ add_mingw ()
static void static void
set_mingw () set_mingw (void)
{ {
char *env = getenv ("GCC_CYGWIN_MINGW"); char *env = getenv ("GCC_CYGWIN_MINGW");
if (env && *env == '1') if (env && *env == '1')
......
/* Target definitions for GNU compiler for Intel 80386 running Interix /* 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: Parts:
by Douglas B. Rupp (drupp@cs.washington.edu). by Douglas B. Rupp (drupp@cs.washington.edu).
...@@ -341,7 +341,7 @@ while (0) ...@@ -341,7 +341,7 @@ while (0)
symbols must be explicitly imported from shared libraries (DLLs). */ symbols must be explicitly imported from shared libraries (DLLs). */
#define MULTIPLE_SYMBOL_SPACES #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 TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section
#define SUPPORTS_ONE_ONLY 1 #define SUPPORTS_ONE_ONLY 1
......
...@@ -46,13 +46,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -46,13 +46,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
multiple times. multiple times.
*/ */
static tree associated_type PARAMS ((tree)); static tree associated_type (tree);
const char * gen_stdcall_suffix PARAMS ((tree)); const char * gen_stdcall_suffix (tree);
const char * gen_fastcall_suffix PARAMS ((tree)); const char * gen_fastcall_suffix (tree);
int i386_pe_dllexport_p PARAMS ((tree)); int i386_pe_dllexport_p (tree);
int i386_pe_dllimport_p PARAMS ((tree)); int i386_pe_dllimport_p (tree);
void i386_pe_mark_dllexport PARAMS ((tree)); void i386_pe_mark_dllexport (tree);
void i386_pe_mark_dllimport PARAMS ((tree)); void i386_pe_mark_dllimport (tree);
/* This is we how mark internal identifiers with dllimport or dllexport /* This is we how mark internal identifiers with dllimport or dllexport
attributes. */ attributes. */
...@@ -66,12 +66,8 @@ void i386_pe_mark_dllimport PARAMS ((tree)); ...@@ -66,12 +66,8 @@ void i386_pe_mark_dllimport PARAMS ((tree));
/* Handle a "dllimport" or "dllexport" attribute; /* Handle a "dllimport" or "dllexport" attribute;
arguments as in struct attribute_spec.handler. */ arguments as in struct attribute_spec.handler. */
tree tree
ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs) ix86_handle_dll_attribute (tree * pnode, tree name, tree args, int flags,
tree * pnode; bool *no_add_attrs)
tree name;
tree args;
int flags;
bool *no_add_attrs;
{ {
tree node = *pnode; tree node = *pnode;
...@@ -121,18 +117,18 @@ ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs) ...@@ -121,18 +117,18 @@ ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs)
/* `extern' needn't be specified with dllimport. /* `extern' needn't be specified with dllimport.
Specify `extern' now and hope for the best. Sigh. */ 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 /* Also, implicitly give dllimport'd variables declared within
a function global scope, unless declared static. */ a function global scope, unless declared static. */
if (current_function_decl != NULL_TREE && !TREE_STATIC (node)) 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. */ /* Report error if symbol is not accessible at global scope. */
if (!TREE_PUBLIC (node) if (!TREE_PUBLIC (node)
&& (TREE_CODE (node) == VAR_DECL && (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.", error ("%Hexternal linkage required for symbol '%D' because of '%s' attribute.",
&DECL_SOURCE_LOCATION (node), node, IDENTIFIER_POINTER (name)); &DECL_SOURCE_LOCATION (node), node, IDENTIFIER_POINTER (name));
...@@ -145,12 +141,9 @@ ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs) ...@@ -145,12 +141,9 @@ ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs)
/* Handle a "shared" attribute; /* Handle a "shared" attribute;
arguments as in struct attribute_spec.handler. */ arguments as in struct attribute_spec.handler. */
tree tree
ix86_handle_shared_attribute (node, name, args, flags, no_add_attrs) ix86_handle_shared_attribute (tree *node, tree name,
tree *node; tree args ATTRIBUTE_UNUSED,
tree name; int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
tree args ATTRIBUTE_UNUSED;
int flags ATTRIBUTE_UNUSED;
bool *no_add_attrs;
{ {
if (TREE_CODE (*node) != VAR_DECL) if (TREE_CODE (*node) != VAR_DECL)
{ {
...@@ -166,8 +159,7 @@ ix86_handle_shared_attribute (node, name, args, flags, no_add_attrs) ...@@ -166,8 +159,7 @@ ix86_handle_shared_attribute (node, name, args, flags, no_add_attrs)
imported or exported. */ imported or exported. */
static tree static tree
associated_type (decl) associated_type (tree decl)
tree decl;
{ {
tree t = NULL_TREE; tree t = NULL_TREE;
...@@ -192,8 +184,7 @@ associated_type (decl) ...@@ -192,8 +184,7 @@ associated_type (decl)
/* Return nonzero if DECL is a dllexport'd object. */ /* Return nonzero if DECL is a dllexport'd object. */
int int
i386_pe_dllexport_p (decl) i386_pe_dllexport_p (tree decl)
tree decl;
{ {
tree exp; tree exp;
...@@ -219,8 +210,7 @@ i386_pe_dllexport_p (decl) ...@@ -219,8 +210,7 @@ i386_pe_dllexport_p (decl)
/* Return nonzero if DECL is a dllimport'd object. */ /* Return nonzero if DECL is a dllimport'd object. */
int int
i386_pe_dllimport_p (decl) i386_pe_dllimport_p (tree decl)
tree decl;
{ {
tree imp; tree imp;
int context_imp = 0; int context_imp = 0;
...@@ -262,11 +252,11 @@ i386_pe_dllimport_p (decl) ...@@ -262,11 +252,11 @@ i386_pe_dllimport_p (decl)
/* We ignore the dllimport attribute for inline member functions. /* We ignore the dllimport attribute for inline member functions.
This differs from MSVC behavior which treats it like GNUC 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)) else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INLINE (decl))
{ {
if (extra_warnings) 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); &DECL_SOURCE_LOCATION (decl), decl);
return 0; return 0;
} }
...@@ -278,7 +268,7 @@ i386_pe_dllimport_p (decl) ...@@ -278,7 +268,7 @@ i386_pe_dllimport_p (decl)
&& !DECL_EXTERNAL (decl) && context_imp) && !DECL_EXTERNAL (decl) && context_imp)
{ {
if (!DECL_VIRTUAL_P (decl)) 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; &DECL_SOURCE_LOCATION (decl), decl); return 0;
} }
...@@ -300,8 +290,7 @@ i386_pe_dllimport_p (decl) ...@@ -300,8 +290,7 @@ i386_pe_dllimport_p (decl)
/* Return nonzero if SYMBOL is marked as being dllexport'd. */ /* Return nonzero if SYMBOL is marked as being dllexport'd. */
int int
i386_pe_dllexport_name_p (symbol) i386_pe_dllexport_name_p (const char *symbol)
const char *symbol;
{ {
return (strncmp (DLL_EXPORT_PREFIX, symbol, return (strncmp (DLL_EXPORT_PREFIX, symbol,
strlen (DLL_EXPORT_PREFIX)) == 0); strlen (DLL_EXPORT_PREFIX)) == 0);
...@@ -310,8 +299,7 @@ i386_pe_dllexport_name_p (symbol) ...@@ -310,8 +299,7 @@ i386_pe_dllexport_name_p (symbol)
/* Return nonzero if SYMBOL is marked as being dllimport'd. */ /* Return nonzero if SYMBOL is marked as being dllimport'd. */
int int
i386_pe_dllimport_name_p (symbol) i386_pe_dllimport_name_p (const char *symbol)
const char *symbol;
{ {
return (strncmp (DLL_IMPORT_PREFIX, symbol, return (strncmp (DLL_IMPORT_PREFIX, symbol,
strlen (DLL_IMPORT_PREFIX)) == 0); strlen (DLL_IMPORT_PREFIX)) == 0);
...@@ -321,8 +309,7 @@ i386_pe_dllimport_name_p (symbol) ...@@ -321,8 +309,7 @@ i386_pe_dllimport_name_p (symbol)
Note that we override the previous setting (eg: dllimport). */ Note that we override the previous setting (eg: dllimport). */
void void
i386_pe_mark_dllexport (decl) i386_pe_mark_dllexport (tree decl)
tree decl;
{ {
const char *oldname; const char *oldname;
char *newname; char *newname;
...@@ -364,8 +351,7 @@ i386_pe_mark_dllexport (decl) ...@@ -364,8 +351,7 @@ i386_pe_mark_dllexport (decl)
/* Mark a DECL as being dllimport'd. */ /* Mark a DECL as being dllimport'd. */
void void
i386_pe_mark_dllimport (decl) i386_pe_mark_dllimport (tree decl)
tree decl;
{ {
const char *oldname; const char *oldname;
char *newname; char *newname;
...@@ -391,7 +377,7 @@ i386_pe_mark_dllimport (decl) ...@@ -391,7 +377,7 @@ i386_pe_mark_dllimport (decl)
/* Already done, but do a sanity check to prevent assembler errors. */ /* Already done, but do a sanity check to prevent assembler errors. */
if (!DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl)) 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); &DECL_SOURCE_LOCATION (decl), decl);
abort(); abort();
} }
...@@ -416,13 +402,12 @@ i386_pe_mark_dllimport (decl) ...@@ -416,13 +402,12 @@ i386_pe_mark_dllimport (decl)
DECL_NON_ADDR_CONST_P (decl) = 1; 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 prefix consisting of FASTCALL_PREFIX and a suffix consisting of an
atsign (@) followed by the number of bytes of arguments. */ atsign (@) followed by the number of bytes of arguments. */
const char * const char *
gen_fastcall_suffix (decl) gen_fastcall_suffix (tree decl)
tree decl;
{ {
int total = 0; int total = 0;
...@@ -448,19 +433,18 @@ gen_fastcall_suffix (decl) ...@@ -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); newsym = xmalloc (1 + strlen (asmname) + 1 + 8 + 1);
sprintf (newsym, "%c%s@%d", FASTCALL_PREFIX, asmname, total/BITS_PER_UNIT); sprintf (newsym, "%c%s@%d", FASTCALL_PREFIX, asmname, total/BITS_PER_UNIT);
return IDENTIFIER_POINTER (get_identifier (newsym)); return IDENTIFIER_POINTER (get_identifier (newsym));
} }
/* Return string which is the former assembler name modified with a /* Return string which is the former assembler name modified with a
suffix consisting of an atsign (@) followed by the number of bytes of suffix consisting of an atsign (@) followed by the number of bytes of
arguments */ arguments */
const char * const char *
gen_stdcall_suffix (decl) gen_stdcall_suffix (tree decl)
tree decl;
{ {
int total = 0; int total = 0;
/* ??? This probably should use XSTR (XEXP (DECL_RTL (decl), 0), 0) instead /* ??? This probably should use XSTR (XEXP (DECL_RTL (decl), 0), 0) instead
...@@ -469,7 +453,7 @@ gen_stdcall_suffix (decl) ...@@ -469,7 +453,7 @@ gen_stdcall_suffix (decl)
char *newsym; char *newsym;
if (TYPE_ARG_TYPES (TREE_TYPE (decl))) 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) == void_type_node)
{ {
tree formal_type = TYPE_ARG_TYPES (TREE_TYPE (decl)); tree formal_type = TYPE_ARG_TYPES (TREE_TYPE (decl));
...@@ -487,17 +471,14 @@ gen_stdcall_suffix (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); newsym = xmalloc (strlen (asmname) + 1 + 8 + 1);
sprintf (newsym, "%s@%d", asmname, total/BITS_PER_UNIT); sprintf (newsym, "%s@%d", asmname, total/BITS_PER_UNIT);
return IDENTIFIER_POINTER (get_identifier (newsym)); return IDENTIFIER_POINTER (get_identifier (newsym));
} }
void void
i386_pe_encode_section_info (decl, rtl, first) i386_pe_encode_section_info (tree decl, rtx rtl, int first)
tree decl;
rtx rtl;
int first;
{ {
default_encode_section_info (decl, rtl, first); default_encode_section_info (decl, rtl, first);
...@@ -505,7 +486,7 @@ i386_pe_encode_section_info (decl, rtl, first) ...@@ -505,7 +486,7 @@ i386_pe_encode_section_info (decl, rtl, first)
{ {
if (lookup_attribute ("stdcall", if (lookup_attribute ("stdcall",
TYPE_ATTRIBUTES (TREE_TYPE (decl)))) TYPE_ATTRIBUTES (TREE_TYPE (decl))))
XEXP (DECL_RTL (decl), 0) = XEXP (DECL_RTL (decl), 0) =
gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (decl)); gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (decl));
else if (lookup_attribute ("fastcall", else if (lookup_attribute ("fastcall",
TYPE_ATTRIBUTES (TREE_TYPE (decl)))) TYPE_ATTRIBUTES (TREE_TYPE (decl))))
...@@ -540,7 +521,7 @@ i386_pe_encode_section_info (decl, rtl, first) ...@@ -540,7 +521,7 @@ i386_pe_encode_section_info (decl, rtl, first)
warning ("%H%s '%D' %s after being referenced with dllimport linkage.", warning ("%H%s '%D' %s after being referenced with dllimport linkage.",
&DECL_SOURCE_LOCATION (decl), &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)) decl, (DECL_INITIAL (decl) || !DECL_EXTERNAL (decl))
? "defined locally" : "redeclared without dllimport attribute"); ? "defined locally" : "redeclared without dllimport attribute");
...@@ -557,8 +538,7 @@ i386_pe_encode_section_info (decl, rtl, first) ...@@ -557,8 +538,7 @@ i386_pe_encode_section_info (decl, rtl, first)
prefix if it exists. */ prefix if it exists. */
const char * const char *
i386_pe_strip_name_encoding (str) i386_pe_strip_name_encoding (const char *str)
const char *str;
{ {
if (strncmp (str, DLL_IMPORT_PREFIX, strlen (DLL_IMPORT_PREFIX)) if (strncmp (str, DLL_IMPORT_PREFIX, strlen (DLL_IMPORT_PREFIX))
== 0) == 0)
...@@ -574,12 +554,11 @@ i386_pe_strip_name_encoding (str) ...@@ -574,12 +554,11 @@ i386_pe_strip_name_encoding (str)
/* Also strip the stdcall suffix. */ /* Also strip the stdcall suffix. */
const char * const char *
i386_pe_strip_name_encoding_full (str) i386_pe_strip_name_encoding_full (const char *str)
const char *str;
{ {
const char *p; const char *p;
const char *name = i386_pe_strip_name_encoding (str); const char *name = i386_pe_strip_name_encoding (str);
p = strchr (name, '@'); p = strchr (name, '@');
if (p) if (p)
return ggc_alloc_string (name, p - name); return ggc_alloc_string (name, p - name);
...@@ -597,16 +576,16 @@ void i386_pe_output_labelref (stream, name) ...@@ -597,16 +576,16 @@ void i386_pe_output_labelref (stream, name)
{ {
if (strncmp (name, DLL_IMPORT_PREFIX, strlen (DLL_IMPORT_PREFIX)) if (strncmp (name, DLL_IMPORT_PREFIX, strlen (DLL_IMPORT_PREFIX))
== 0) == 0)
/* A dll import */ /* A dll import */
{ {
if (name[strlen (DLL_IMPORT_PREFIX)] == FASTCALL_PREFIX) if (name[strlen (DLL_IMPORT_PREFIX)] == FASTCALL_PREFIX)
/* A dllimport fastcall symbol. */ /* A dllimport fastcall symbol. */
{ {
fprintf (stream, "__imp_%s", fprintf (stream, "__imp_%s",
i386_pe_strip_name_encoding (name)); i386_pe_strip_name_encoding (name));
} }
else else
/* A dllimport non-fastcall symbol. */ /* A dllimport non-fastcall symbol. */
{ {
fprintf (stream, "__imp__%s", fprintf (stream, "__imp__%s",
i386_pe_strip_name_encoding (name)); i386_pe_strip_name_encoding (name));
...@@ -614,7 +593,7 @@ void i386_pe_output_labelref (stream, name) ...@@ -614,7 +593,7 @@ void i386_pe_output_labelref (stream, name)
} }
else if ((name[0] == FASTCALL_PREFIX) else if ((name[0] == FASTCALL_PREFIX)
|| (strncmp (name, DLL_EXPORT_PREFIX, strlen (DLL_EXPORT_PREFIX) || (strncmp (name, DLL_EXPORT_PREFIX, strlen (DLL_EXPORT_PREFIX)
== 0 == 0
&& name[strlen (DLL_EXPORT_PREFIX)] == FASTCALL_PREFIX))) && name[strlen (DLL_EXPORT_PREFIX)] == FASTCALL_PREFIX)))
/* A fastcall symbol. */ /* A fastcall symbol. */
{ {
...@@ -630,9 +609,7 @@ void i386_pe_output_labelref (stream, name) ...@@ -630,9 +609,7 @@ void i386_pe_output_labelref (stream, name)
} }
void void
i386_pe_unique_section (decl, reloc) i386_pe_unique_section (tree decl, int reloc)
tree decl;
int reloc;
{ {
int len; int len;
const char *name, *prefix; const char *name, *prefix;
...@@ -644,7 +621,7 @@ i386_pe_unique_section (decl, reloc) ...@@ -644,7 +621,7 @@ i386_pe_unique_section (decl, reloc)
/* The object is put in, for example, section .text$foo. /* The object is put in, for example, section .text$foo.
The linker will then ultimately place them in .text The linker will then ultimately place them in .text
(everything from the $ on is stripped). Don't put (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 bug when .rdata$* grouped sections are used in code
without a .rdata section. */ without a .rdata section. */
if (TREE_CODE (decl) == FUNCTION_DECL) if (TREE_CODE (decl) == FUNCTION_DECL)
...@@ -678,10 +655,7 @@ i386_pe_unique_section (decl, reloc) ...@@ -678,10 +655,7 @@ i386_pe_unique_section (decl, reloc)
#define SECTION_PE_SHARED SECTION_MACH_DEP #define SECTION_PE_SHARED SECTION_MACH_DEP
unsigned int unsigned int
i386_pe_section_type_flags (decl, name, reloc) i386_pe_section_type_flags (tree decl, const char *name, int reloc)
tree decl;
const char *name;
int reloc;
{ {
static htab_t htab; static htab_t htab;
unsigned int flags; unsigned int flags;
...@@ -727,9 +701,7 @@ i386_pe_section_type_flags (decl, name, reloc) ...@@ -727,9 +701,7 @@ i386_pe_section_type_flags (decl, name, reloc)
} }
void void
i386_pe_asm_named_section (name, flags) i386_pe_asm_named_section (const char *name, unsigned int flags)
const char *name;
unsigned int flags;
{ {
char flagchars[8], *f = flagchars; char flagchars[8], *f = flagchars;
...@@ -766,10 +738,7 @@ i386_pe_asm_named_section (name, flags) ...@@ -766,10 +738,7 @@ i386_pe_asm_named_section (name, flags)
visible. */ visible. */
void void
i386_pe_declare_function_type (file, name, public) i386_pe_declare_function_type (FILE *file, const char *name, int public)
FILE *file;
const char *name;
int public;
{ {
fprintf (file, "\t.def\t"); fprintf (file, "\t.def\t");
assemble_name (file, name); assemble_name (file, name);
...@@ -795,8 +764,7 @@ static struct extern_list *extern_head; ...@@ -795,8 +764,7 @@ static struct extern_list *extern_head;
for it then. */ for it then. */
void void
i386_pe_record_external_function (name) i386_pe_record_external_function (const char *name)
const char *name;
{ {
struct extern_list *p; struct extern_list *p;
...@@ -820,13 +788,11 @@ static struct export_list *export_head; ...@@ -820,13 +788,11 @@ static struct export_list *export_head;
/* Assemble an export symbol entry. We need to keep a list of /* 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 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, 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. */ linkonce. */
void void
i386_pe_record_exported_symbol (name, is_data) i386_pe_record_exported_symbol (const char *name, int is_data)
const char *name;
int is_data;
{ {
struct export_list *p; struct export_list *p;
...@@ -842,7 +808,7 @@ i386_pe_record_exported_symbol (name, is_data) ...@@ -842,7 +808,7 @@ i386_pe_record_exported_symbol (name, is_data)
output the .drectve section. */ output the .drectve section. */
void void
i386_pe_file_end () i386_pe_file_end (void)
{ {
struct extern_list *p; struct extern_list *p;
...@@ -859,7 +825,7 @@ i386_pe_file_end () ...@@ -859,7 +825,7 @@ i386_pe_file_end ()
{ {
TREE_ASM_WRITTEN (decl) = 1; TREE_ASM_WRITTEN (decl) = 1;
i386_pe_declare_function_type (asm_out_file, p->name, i386_pe_declare_function_type (asm_out_file, p->name,
TREE_PUBLIC (decl)); TREE_PUBLIC (decl));
} }
} }
......
/* Definitions of target machine for GNU compiler for IA-64. /* 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. This file is part of GCC.
...@@ -29,130 +30,125 @@ extern GTY(()) rtx ia64_compare_op1; ...@@ -29,130 +30,125 @@ extern GTY(()) rtx ia64_compare_op1;
extern int bundling_p; extern int bundling_p;
#ifdef RTX_CODE #ifdef RTX_CODE
extern int ia64_st_address_bypass_p PARAMS((rtx, rtx)); extern int ia64_st_address_bypass_p (rtx, rtx);
extern int ia64_ld_address_bypass_p PARAMS((rtx, rtx)); extern int ia64_ld_address_bypass_p (rtx, rtx);
extern int ia64_produce_address_p PARAMS((rtx)); extern int ia64_produce_address_p (rtx);
extern int call_operand PARAMS((rtx, enum machine_mode)); extern int call_operand (rtx, enum machine_mode);
extern int sdata_symbolic_operand PARAMS((rtx, enum machine_mode)); extern int sdata_symbolic_operand (rtx, enum machine_mode);
extern int got_symbolic_operand PARAMS((rtx, enum machine_mode)); extern int got_symbolic_operand (rtx, enum machine_mode);
extern int symbolic_operand PARAMS((rtx, enum machine_mode)); extern int symbolic_operand (rtx, enum machine_mode);
extern int tls_symbolic_operand PARAMS((rtx, enum machine_mode)); extern int tls_symbolic_operand (rtx, enum machine_mode);
extern int function_operand PARAMS((rtx, enum machine_mode)); extern int function_operand (rtx, enum machine_mode);
extern int setjmp_operand PARAMS((rtx, enum machine_mode)); extern int setjmp_operand (rtx, enum machine_mode);
extern int move_operand PARAMS((rtx, enum machine_mode)); extern int move_operand (rtx, enum machine_mode);
extern int gr_register_operand PARAMS((rtx, enum machine_mode)); extern int gr_register_operand (rtx, enum machine_mode);
extern int fr_register_operand PARAMS((rtx, enum machine_mode)); extern int fr_register_operand (rtx, enum machine_mode);
extern int grfr_register_operand PARAMS((rtx, enum machine_mode)); extern int grfr_register_operand (rtx, enum machine_mode);
extern int gr_nonimmediate_operand PARAMS((rtx, enum machine_mode)); extern int gr_nonimmediate_operand (rtx, enum machine_mode);
extern int fr_nonimmediate_operand PARAMS((rtx, enum machine_mode)); extern int fr_nonimmediate_operand (rtx, enum machine_mode);
extern int grfr_nonimmediate_operand PARAMS((rtx, enum machine_mode)); extern int grfr_nonimmediate_operand (rtx, enum machine_mode);
extern int gr_reg_or_0_operand PARAMS((rtx, enum machine_mode)); extern int gr_reg_or_0_operand (rtx, enum machine_mode);
extern int gr_reg_or_5bit_operand PARAMS((rtx, enum machine_mode)); extern int gr_reg_or_5bit_operand (rtx, enum machine_mode);
extern int gr_reg_or_6bit_operand PARAMS((rtx, enum machine_mode)); extern int gr_reg_or_6bit_operand (rtx, enum machine_mode);
extern int gr_reg_or_8bit_operand PARAMS((rtx, enum machine_mode)); extern int gr_reg_or_8bit_operand (rtx, enum machine_mode);
extern int grfr_reg_or_8bit_operand PARAMS((rtx, enum machine_mode)); extern int grfr_reg_or_8bit_operand (rtx, enum machine_mode);
extern int gr_reg_or_8bit_adjusted_operand PARAMS((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 PARAMS((rtx, enum machine_mode)); extern int gr_reg_or_8bit_and_adjusted_operand (rtx, enum machine_mode);
extern int gr_reg_or_14bit_operand PARAMS((rtx, enum machine_mode)); extern int gr_reg_or_14bit_operand (rtx, enum machine_mode);
extern int gr_reg_or_22bit_operand PARAMS((rtx, enum machine_mode)); extern int gr_reg_or_22bit_operand (rtx, enum machine_mode);
extern int shift_count_operand PARAMS((rtx, enum machine_mode)); extern int shift_count_operand (rtx, enum machine_mode);
extern int shift_32bit_count_operand PARAMS((rtx, enum machine_mode)); extern int shift_32bit_count_operand (rtx, enum machine_mode);
extern int shladd_operand PARAMS((rtx, enum machine_mode)); extern int shladd_operand (rtx, enum machine_mode);
extern int fetchadd_operand PARAMS((rtx, enum machine_mode)); extern int fetchadd_operand (rtx, enum machine_mode);
extern int fr_reg_or_fp01_operand PARAMS((rtx, enum machine_mode)); extern int fr_reg_or_fp01_operand (rtx, enum machine_mode);
extern int normal_comparison_operator PARAMS((rtx, enum machine_mode)); extern int normal_comparison_operator (rtx, enum machine_mode);
extern int adjusted_comparison_operator PARAMS((rtx, enum machine_mode)); extern int adjusted_comparison_operator (rtx, enum machine_mode);
extern int signed_inequality_operator PARAMS((rtx, enum machine_mode)); extern int signed_inequality_operator (rtx, enum machine_mode);
extern int destination_operand PARAMS((rtx, enum machine_mode)); extern int destination_operand (rtx, enum machine_mode);
extern int not_postinc_memory_operand PARAMS((rtx, enum machine_mode)); extern int not_postinc_memory_operand (rtx, enum machine_mode);
extern int predicate_operator PARAMS((rtx, enum machine_mode)); extern int predicate_operator (rtx, enum machine_mode);
extern int ar_lc_reg_operand PARAMS((rtx, enum machine_mode)); extern int ar_lc_reg_operand (rtx, enum machine_mode);
extern int ar_ccv_reg_operand PARAMS((rtx, enum machine_mode)); extern int ar_ccv_reg_operand (rtx, enum machine_mode);
extern int ar_pfs_reg_operand PARAMS((rtx, enum machine_mode)); extern int ar_pfs_reg_operand (rtx, enum machine_mode);
extern int general_tfmode_operand PARAMS((rtx, enum machine_mode)); extern int general_tfmode_operand (rtx, enum machine_mode);
extern int destination_tfmode_operand PARAMS((rtx, enum machine_mode)); extern int destination_tfmode_operand (rtx, enum machine_mode);
extern int tfreg_or_fp01_operand PARAMS((rtx, enum machine_mode)); extern int tfreg_or_fp01_operand (rtx, enum machine_mode);
extern int basereg_operand PARAMS((rtx, enum machine_mode)); extern int basereg_operand (rtx, enum machine_mode);
extern rtx ia64_expand_move PARAMS ((rtx, rtx)); extern rtx ia64_expand_move (rtx, rtx);
extern int ia64_move_ok PARAMS((rtx, rtx)); extern int ia64_move_ok (rtx, rtx);
extern int addp4_optimize_ok PARAMS((rtx, rtx)); extern int addp4_optimize_ok (rtx, rtx);
extern void ia64_emit_cond_move PARAMS((rtx, rtx, rtx)); extern void ia64_emit_cond_move (rtx, rtx, rtx);
extern int ia64_depz_field_mask PARAMS((rtx, rtx)); extern int ia64_depz_field_mask (rtx, rtx);
extern rtx ia64_split_timode PARAMS((rtx[], rtx, rtx)); extern rtx ia64_split_timode (rtx[], rtx, rtx);
extern rtx spill_tfmode_operand PARAMS((rtx, int)); extern rtx spill_tfmode_operand (rtx, int);
extern rtx ia64_expand_compare PARAMS((enum rtx_code, enum machine_mode)); extern rtx ia64_expand_compare (enum rtx_code, enum machine_mode);
extern void ia64_expand_call PARAMS((rtx, rtx, rtx, int)); extern void ia64_expand_call (rtx, rtx, rtx, int);
extern void ia64_split_call PARAMS((rtx, rtx, rtx, rtx, rtx, int, int)); extern void ia64_split_call (rtx, rtx, rtx, rtx, rtx, int, int);
extern void ia64_reload_gp PARAMS((void)); extern void ia64_reload_gp (void);
extern HOST_WIDE_INT ia64_initial_elimination_offset PARAMS((int, int)); extern HOST_WIDE_INT ia64_initial_elimination_offset (int, int);
extern void ia64_expand_prologue PARAMS((void)); extern void ia64_expand_prologue (void);
extern void ia64_expand_epilogue PARAMS((int)); extern void ia64_expand_epilogue (int);
extern int ia64_direct_return PARAMS((void)); extern int ia64_direct_return (void);
extern void ia64_expand_load_address PARAMS((rtx, rtx)); extern void ia64_expand_load_address (rtx, rtx);
extern int ia64_hard_regno_rename_ok PARAMS((int, int)); extern int ia64_hard_regno_rename_ok (int, int);
extern void ia64_initialize_trampoline PARAMS((rtx, rtx, rtx)); extern void ia64_initialize_trampoline (rtx, rtx, rtx);
extern void ia64_print_operand_address PARAMS((FILE *, rtx)); extern void ia64_print_operand_address (FILE *, rtx);
extern void ia64_print_operand PARAMS((FILE *, rtx, int)); extern void ia64_print_operand (FILE *, rtx, int);
extern enum reg_class ia64_secondary_reload_class PARAMS((enum reg_class, extern enum reg_class ia64_secondary_reload_class (enum reg_class,
enum machine_mode, enum machine_mode, rtx);
rtx)); extern void ia64_output_dwarf_dtprel (FILE*, int, rtx);
extern void ia64_output_dwarf_dtprel PARAMS ((FILE*, int, rtx)); extern void process_for_unwind_directive (FILE *, rtx);
extern void process_for_unwind_directive PARAMS ((FILE *, rtx)); extern const char *get_bundle_name (int);
extern const char *get_bundle_name PARAMS ((int));
#endif /* RTX_CODE */ #endif /* RTX_CODE */
#ifdef TREE_CODE #ifdef TREE_CODE
#ifdef RTX_CODE #ifdef RTX_CODE
extern rtx ia64_function_arg PARAMS((CUMULATIVE_ARGS *, enum machine_mode, extern rtx ia64_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
tree, int, int)); tree, int, int);
extern rtx ia64_expand_builtin PARAMS((tree, rtx, rtx, extern rtx ia64_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
enum machine_mode, int)); extern rtx ia64_va_arg (tree, tree);
extern rtx ia64_va_arg PARAMS((tree, tree)); extern rtx ia64_function_value (tree, tree);
extern rtx ia64_function_value PARAMS((tree, tree));
#endif /* RTX_CODE */ #endif /* RTX_CODE */
extern void ia64_setup_incoming_varargs PARAMS((CUMULATIVE_ARGS, int, tree, extern void ia64_setup_incoming_varargs (CUMULATIVE_ARGS, int, tree,
int *, int)); int *, int);
extern int ia64_function_arg_partial_nregs PARAMS((CUMULATIVE_ARGS *, extern int ia64_function_arg_partial_nregs (CUMULATIVE_ARGS *,
enum machine_mode, enum machine_mode, tree, int);
tree, int)); extern void ia64_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
extern void ia64_function_arg_advance PARAMS((CUMULATIVE_ARGS *, tree, int);
enum machine_mode, extern int ia64_function_arg_pass_by_reference (CUMULATIVE_ARGS *,
tree, int)); enum machine_mode, tree, int);
extern int ia64_function_arg_pass_by_reference PARAMS((CUMULATIVE_ARGS *, extern int ia64_return_in_memory (tree);
enum machine_mode, extern void ia64_asm_output_external (FILE *, tree, const char *);
tree, int));
extern int ia64_return_in_memory PARAMS((tree));
extern void ia64_asm_output_external PARAMS((FILE *, tree, const char *));
#endif /* TREE_CODE */ #endif /* TREE_CODE */
extern int ia64_register_move_cost PARAMS((enum machine_mode, enum reg_class, extern int ia64_register_move_cost (enum machine_mode, enum reg_class,
enum reg_class)); enum reg_class);
extern int ia64_epilogue_uses PARAMS((int)); extern int ia64_epilogue_uses (int);
extern int ia64_eh_uses PARAMS((int)); extern int ia64_eh_uses (int);
extern void emit_safe_across_calls PARAMS((void)); extern void emit_safe_across_calls (void);
extern void ia64_init_builtins PARAMS((void)); extern void ia64_init_builtins (void);
extern void ia64_override_options PARAMS((void)); extern void ia64_override_options (void);
extern int ia64_dbx_register_number PARAMS((int)); extern int ia64_dbx_register_number (int);
extern rtx ia64_return_addr_rtx PARAMS ((HOST_WIDE_INT, rtx)); extern rtx ia64_return_addr_rtx (HOST_WIDE_INT, rtx);
extern void ia64_split_return_addr_rtx PARAMS ((rtx)); extern void ia64_split_return_addr_rtx (rtx);
#ifdef SDATA_SECTION_ASM_OP #ifdef SDATA_SECTION_ASM_OP
extern void sdata_section PARAMS ((void)); extern void sdata_section (void);
#endif #endif
#ifdef SBSS_SECTION_ASM_OP #ifdef SBSS_SECTION_ASM_OP
extern void sbss_section PARAMS ((void)); extern void sbss_section (void);
#endif #endif
#ifdef ARGS_SIZE_RTX #ifdef ARGS_SIZE_RTX
/* expr.h defines ARGS_SIZE_RTX and `enum direction'. */ /* 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 */ #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 *);
/* Definitions of target machine for GNU compiler. /* Definitions of target machine for GNU compiler.
Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by James E. Wilson <wilson@cygnus.com> and Contributed by James E. Wilson <wilson@cygnus.com> and
David Mosberger <davidm@hpl.hp.com>. David Mosberger <davidm@hpl.hp.com>.
This file is part of GCC. This file is part of GCC.
...@@ -136,7 +136,7 @@ struct ia64_frame_info ...@@ -136,7 +136,7 @@ struct ia64_frame_info
HOST_WIDE_INT spill_size; /* size of the gr/br/fr spill area. */ HOST_WIDE_INT spill_size; /* size of the gr/br/fr spill area. */
HOST_WIDE_INT extra_spill_size; /* size of spill area for others. */ HOST_WIDE_INT extra_spill_size; /* size of spill area for others. */
HARD_REG_SET mask; /* mask of saved registers. */ HARD_REG_SET mask; /* mask of saved registers. */
unsigned int gr_used_mask; /* mask of registers in use as gr spill unsigned int gr_used_mask; /* mask of registers in use as gr spill
registers or long-term scratches. */ registers or long-term scratches. */
int n_spilled; /* number of spilled registers. */ int n_spilled; /* number of spilled registers. */
int reg_fp; /* register for fp. */ int reg_fp; /* register for fp. */
...@@ -158,108 +158,100 @@ struct ia64_frame_info ...@@ -158,108 +158,100 @@ struct ia64_frame_info
/* Current frame information calculated by ia64_compute_frame_size. */ /* Current frame information calculated by ia64_compute_frame_size. */
static struct ia64_frame_info current_frame_info; static struct ia64_frame_info current_frame_info;
static int ia64_use_dfa_pipeline_interface PARAMS ((void)); static int ia64_use_dfa_pipeline_interface (void);
static int ia64_first_cycle_multipass_dfa_lookahead PARAMS ((void)); static int ia64_first_cycle_multipass_dfa_lookahead (void);
static void ia64_dependencies_evaluation_hook PARAMS ((rtx, rtx)); static void ia64_dependencies_evaluation_hook (rtx, rtx);
static void ia64_init_dfa_pre_cycle_insn PARAMS ((void)); static void ia64_init_dfa_pre_cycle_insn (void);
static rtx ia64_dfa_pre_cycle_insn PARAMS ((void)); static rtx ia64_dfa_pre_cycle_insn (void);
static int ia64_first_cycle_multipass_dfa_lookahead_guard PARAMS ((rtx)); static int ia64_first_cycle_multipass_dfa_lookahead_guard (rtx);
static int ia64_dfa_new_cycle PARAMS ((FILE *, int, rtx, int, int, int *)); static int ia64_dfa_new_cycle (FILE *, int, rtx, int, int, int *);
static rtx gen_tls_get_addr PARAMS ((void)); static rtx gen_tls_get_addr (void);
static rtx gen_thread_pointer PARAMS ((void)); static rtx gen_thread_pointer (void);
static rtx ia64_expand_tls_address PARAMS ((enum tls_model, rtx, rtx)); static rtx ia64_expand_tls_address (enum tls_model, rtx, rtx);
static int find_gr_spill PARAMS ((int)); static int find_gr_spill (int);
static int next_scratch_gr_reg PARAMS ((void)); static int next_scratch_gr_reg (void);
static void mark_reg_gr_used_mask PARAMS ((rtx, void *)); static void mark_reg_gr_used_mask (rtx, void *);
static void ia64_compute_frame_size PARAMS ((HOST_WIDE_INT)); static void ia64_compute_frame_size (HOST_WIDE_INT);
static void setup_spill_pointers PARAMS ((int, rtx, HOST_WIDE_INT)); static void setup_spill_pointers (int, rtx, HOST_WIDE_INT);
static void finish_spill_pointers PARAMS ((void)); static void finish_spill_pointers (void);
static rtx spill_restore_mem PARAMS ((rtx, HOST_WIDE_INT)); static rtx spill_restore_mem (rtx, HOST_WIDE_INT);
static void do_spill PARAMS ((rtx (*)(rtx, rtx, rtx), rtx, HOST_WIDE_INT, rtx)); static void do_spill (rtx (*)(rtx, rtx, rtx), rtx, HOST_WIDE_INT, rtx);
static void do_restore PARAMS ((rtx (*)(rtx, rtx, rtx), rtx, HOST_WIDE_INT)); static void do_restore (rtx (*)(rtx, rtx, rtx), rtx, HOST_WIDE_INT);
static rtx gen_movdi_x PARAMS ((rtx, rtx, rtx)); static rtx gen_movdi_x (rtx, rtx, rtx);
static rtx gen_fr_spill_x PARAMS ((rtx, rtx, rtx)); static rtx gen_fr_spill_x (rtx, rtx, rtx);
static rtx gen_fr_restore_x PARAMS ((rtx, rtx, rtx)); static rtx gen_fr_restore_x (rtx, rtx, rtx);
static enum machine_mode hfa_element_mode PARAMS ((tree, int)); static enum machine_mode hfa_element_mode (tree, int);
static bool ia64_function_ok_for_sibcall PARAMS ((tree, tree)); static bool ia64_function_ok_for_sibcall (tree, tree);
static bool ia64_rtx_costs PARAMS ((rtx, int, int, int *)); static bool ia64_rtx_costs (rtx, int, int, int *);
static void fix_range PARAMS ((const char *)); static void fix_range (const char *);
static struct machine_function * ia64_init_machine_status PARAMS ((void)); static struct machine_function * ia64_init_machine_status (void);
static void emit_insn_group_barriers PARAMS ((FILE *)); static void emit_insn_group_barriers (FILE *);
static void emit_all_insn_group_barriers PARAMS ((FILE *)); static void emit_all_insn_group_barriers (FILE *);
static void final_emit_insn_group_barriers PARAMS ((FILE *)); static void final_emit_insn_group_barriers (FILE *);
static void emit_predicate_relation_info PARAMS ((void)); static void emit_predicate_relation_info (void);
static void ia64_reorg PARAMS ((void)); static void ia64_reorg (void);
static bool ia64_in_small_data_p PARAMS ((tree)); static bool ia64_in_small_data_p (tree);
static void process_epilogue PARAMS ((void)); static void process_epilogue (void);
static int process_set PARAMS ((FILE *, rtx)); static int process_set (FILE *, rtx);
static rtx ia64_expand_fetch_and_op PARAMS ((optab, enum machine_mode, static rtx ia64_expand_fetch_and_op (optab, enum machine_mode, tree, rtx);
tree, rtx)); static rtx ia64_expand_op_and_fetch (optab, enum machine_mode, tree, rtx);
static rtx ia64_expand_op_and_fetch PARAMS ((optab, enum machine_mode, static rtx ia64_expand_compare_and_swap (enum machine_mode, enum machine_mode,
tree, rtx)); int, tree, rtx);
static rtx ia64_expand_compare_and_swap PARAMS ((enum machine_mode, static rtx ia64_expand_lock_test_and_set (enum machine_mode, tree, rtx);
enum machine_mode, static rtx ia64_expand_lock_release (enum machine_mode, tree, rtx);
int, tree, rtx)); static bool ia64_assemble_integer (rtx, unsigned int, int);
static rtx ia64_expand_lock_test_and_set PARAMS ((enum machine_mode, static void ia64_output_function_prologue (FILE *, HOST_WIDE_INT);
tree, rtx)); static void ia64_output_function_epilogue (FILE *, HOST_WIDE_INT);
static rtx ia64_expand_lock_release PARAMS ((enum machine_mode, tree, rtx)); static void ia64_output_function_end_prologue (FILE *);
static bool ia64_assemble_integer PARAMS ((rtx, unsigned int, int));
static void ia64_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static int ia64_issue_rate (void);
static void ia64_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static int ia64_adjust_cost (rtx, rtx, rtx, int);
static void ia64_output_function_end_prologue PARAMS ((FILE *)); static void ia64_sched_init (FILE *, int, int);
static void ia64_sched_finish (FILE *, int);
static int ia64_issue_rate PARAMS ((void)); static int ia64_dfa_sched_reorder (FILE *, int, rtx *, int *, int, int);
static int ia64_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int ia64_sched_reorder (FILE *, int, rtx *, int *, int);
static void ia64_sched_init PARAMS ((FILE *, int, int)); static int ia64_sched_reorder2 (FILE *, int, rtx *, int *, int);
static void ia64_sched_finish PARAMS ((FILE *, int)); static int ia64_variable_issue (FILE *, int, rtx, int);
static int ia64_dfa_sched_reorder PARAMS ((FILE *, int, rtx *, int *,
int, int)); static struct bundle_state *get_free_bundle_state (void);
static int ia64_sched_reorder PARAMS ((FILE *, int, rtx *, int *, int)); static void free_bundle_state (struct bundle_state *);
static int ia64_sched_reorder2 PARAMS ((FILE *, int, rtx *, int *, int)); static void initiate_bundle_states (void);
static int ia64_variable_issue PARAMS ((FILE *, int, rtx, int)); static void finish_bundle_states (void);
static unsigned bundle_state_hash (const void *);
static struct bundle_state *get_free_bundle_state PARAMS ((void)); static int bundle_state_eq_p (const void *, const void *);
static void free_bundle_state PARAMS ((struct bundle_state *)); static int insert_bundle_state (struct bundle_state *);
static void initiate_bundle_states PARAMS ((void)); static void initiate_bundle_state_table (void);
static void finish_bundle_states PARAMS ((void)); static void finish_bundle_state_table (void);
static unsigned bundle_state_hash PARAMS ((const void *)); static int try_issue_nops (struct bundle_state *, int);
static int bundle_state_eq_p PARAMS ((const void *, const void *)); static int try_issue_insn (struct bundle_state *, rtx);
static int insert_bundle_state PARAMS ((struct bundle_state *)); static void issue_nops_and_insn (struct bundle_state *, int, rtx, int, int);
static void initiate_bundle_state_table PARAMS ((void)); static int get_max_pos (state_t);
static void finish_bundle_state_table PARAMS ((void)); static int get_template (state_t, int);
static int try_issue_nops PARAMS ((struct bundle_state *, int));
static int try_issue_insn PARAMS ((struct bundle_state *, rtx)); static rtx get_next_important_insn (rtx, rtx);
static void issue_nops_and_insn PARAMS ((struct bundle_state *, int, static void bundling (FILE *, int, rtx, rtx);
rtx, int, int));
static int get_max_pos PARAMS ((state_t)); static void ia64_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
static int get_template PARAMS ((state_t, int)); HOST_WIDE_INT, tree);
static void ia64_file_start (void);
static rtx get_next_important_insn PARAMS ((rtx, rtx));
static void bundling PARAMS ((FILE *, int, rtx, rtx)); static void ia64_select_rtx_section (enum machine_mode, rtx,
unsigned HOST_WIDE_INT);
static void ia64_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, static void ia64_rwreloc_select_section (tree, int, unsigned HOST_WIDE_INT)
HOST_WIDE_INT, tree));
static void ia64_file_start PARAMS ((void));
static void ia64_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT));
static void ia64_rwreloc_select_section PARAMS ((tree, int,
unsigned HOST_WIDE_INT))
ATTRIBUTE_UNUSED; ATTRIBUTE_UNUSED;
static void ia64_rwreloc_unique_section PARAMS ((tree, int)) static void ia64_rwreloc_unique_section (tree, int)
ATTRIBUTE_UNUSED; ATTRIBUTE_UNUSED;
static void ia64_rwreloc_select_rtx_section PARAMS ((enum machine_mode, rtx, static void ia64_rwreloc_select_rtx_section (enum machine_mode, rtx,
unsigned HOST_WIDE_INT)) unsigned HOST_WIDE_INT)
ATTRIBUTE_UNUSED; ATTRIBUTE_UNUSED;
static unsigned int ia64_rwreloc_section_type_flags static unsigned int ia64_rwreloc_section_type_flags (tree, const char *, int)
PARAMS ((tree, const char *, int))
ATTRIBUTE_UNUSED; ATTRIBUTE_UNUSED;
static void ia64_hpux_add_extern_decl PARAMS ((const char *name)) static void ia64_hpux_add_extern_decl (const char *name)
ATTRIBUTE_UNUSED; ATTRIBUTE_UNUSED;
static void ia64_hpux_file_end PARAMS ((void)) static void ia64_hpux_file_end (void)
ATTRIBUTE_UNUSED; ATTRIBUTE_UNUSED;
static tree ia64_handle_model_attribute (tree *, tree, tree, int, bool *); static tree ia64_handle_model_attribute (tree *, tree, tree, int, bool *);
...@@ -380,9 +372,7 @@ struct gcc_target targetm = TARGET_INITIALIZER; ...@@ -380,9 +372,7 @@ struct gcc_target targetm = TARGET_INITIALIZER;
/* Return 1 if OP is a valid operand for the MEM of a CALL insn. */ /* Return 1 if OP is a valid operand for the MEM of a CALL insn. */
int int
call_operand (op, mode) call_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode != GET_MODE (op) && mode != VOIDmode) if (mode != GET_MODE (op) && mode != VOIDmode)
return 0; return 0;
...@@ -394,9 +384,7 @@ call_operand (op, mode) ...@@ -394,9 +384,7 @@ call_operand (op, mode)
/* Return 1 if OP refers to a symbol in the sdata section. */ /* Return 1 if OP refers to a symbol in the sdata section. */
int int
sdata_symbolic_operand (op, mode) sdata_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
switch (GET_CODE (op)) switch (GET_CODE (op))
{ {
...@@ -429,9 +417,7 @@ small_addr_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) ...@@ -429,9 +417,7 @@ small_addr_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
/* Return 1 if OP refers to a symbol, and is appropriate for a GOT load. */ /* Return 1 if OP refers to a symbol, and is appropriate for a GOT load. */
int int
got_symbolic_operand (op, mode) got_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
switch (GET_CODE (op)) switch (GET_CODE (op))
{ {
...@@ -476,9 +462,7 @@ got_symbolic_operand (op, mode) ...@@ -476,9 +462,7 @@ got_symbolic_operand (op, mode)
/* Return 1 if OP refers to a symbol. */ /* Return 1 if OP refers to a symbol. */
int int
symbolic_operand (op, mode) symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
switch (GET_CODE (op)) switch (GET_CODE (op))
{ {
...@@ -496,9 +480,7 @@ symbolic_operand (op, mode) ...@@ -496,9 +480,7 @@ symbolic_operand (op, mode)
/* Return tls_model if OP refers to a TLS symbol. */ /* Return tls_model if OP refers to a TLS symbol. */
int int
tls_symbolic_operand (op, mode) tls_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) != SYMBOL_REF) if (GET_CODE (op) != SYMBOL_REF)
return 0; return 0;
...@@ -509,9 +491,7 @@ tls_symbolic_operand (op, mode) ...@@ -509,9 +491,7 @@ tls_symbolic_operand (op, mode)
/* Return 1 if OP refers to a function. */ /* Return 1 if OP refers to a function. */
int int
function_operand (op, mode) function_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (op)) if (GET_CODE (op) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (op))
return 1; return 1;
...@@ -524,9 +504,7 @@ function_operand (op, mode) ...@@ -524,9 +504,7 @@ function_operand (op, mode)
/* ??? This is an unsatisfying solution. Should rethink. */ /* ??? This is an unsatisfying solution. Should rethink. */
int int
setjmp_operand (op, mode) setjmp_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
const char *name; const char *name;
int retval = 0; int retval = 0;
...@@ -572,9 +550,7 @@ setjmp_operand (op, mode) ...@@ -572,9 +550,7 @@ setjmp_operand (op, mode)
/* Return 1 if OP is a general operand, excluding tls symbolic operands. */ /* Return 1 if OP is a general operand, excluding tls symbolic operands. */
int int
move_operand (op, mode) move_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return general_operand (op, mode) && !tls_symbolic_operand (op, mode); return general_operand (op, mode) && !tls_symbolic_operand (op, mode);
} }
...@@ -582,9 +558,7 @@ move_operand (op, mode) ...@@ -582,9 +558,7 @@ move_operand (op, mode)
/* Return 1 if OP is a register operand that is (or could be) a GR reg. */ /* Return 1 if OP is a register operand that is (or could be) a GR reg. */
int int
gr_register_operand (op, mode) gr_register_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! register_operand (op, mode)) if (! register_operand (op, mode))
return 0; return 0;
...@@ -602,9 +576,7 @@ gr_register_operand (op, mode) ...@@ -602,9 +576,7 @@ gr_register_operand (op, mode)
/* Return 1 if OP is a register operand that is (or could be) an FR reg. */ /* Return 1 if OP is a register operand that is (or could be) an FR reg. */
int int
fr_register_operand (op, mode) fr_register_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! register_operand (op, mode)) if (! register_operand (op, mode))
return 0; return 0;
...@@ -622,9 +594,7 @@ fr_register_operand (op, mode) ...@@ -622,9 +594,7 @@ fr_register_operand (op, mode)
/* Return 1 if OP is a register operand that is (or could be) a GR/FR reg. */ /* Return 1 if OP is a register operand that is (or could be) a GR/FR reg. */
int int
grfr_register_operand (op, mode) grfr_register_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! register_operand (op, mode)) if (! register_operand (op, mode))
return 0; return 0;
...@@ -642,9 +612,7 @@ grfr_register_operand (op, mode) ...@@ -642,9 +612,7 @@ grfr_register_operand (op, mode)
/* Return 1 if OP is a nonimmediate operand that is (or could be) a GR reg. */ /* Return 1 if OP is a nonimmediate operand that is (or could be) a GR reg. */
int int
gr_nonimmediate_operand (op, mode) gr_nonimmediate_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! nonimmediate_operand (op, mode)) if (! nonimmediate_operand (op, mode))
return 0; return 0;
...@@ -662,9 +630,7 @@ gr_nonimmediate_operand (op, mode) ...@@ -662,9 +630,7 @@ gr_nonimmediate_operand (op, mode)
/* Return 1 if OP is a nonimmediate operand that is (or could be) a FR reg. */ /* Return 1 if OP is a nonimmediate operand that is (or could be) a FR reg. */
int int
fr_nonimmediate_operand (op, mode) fr_nonimmediate_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! nonimmediate_operand (op, mode)) if (! nonimmediate_operand (op, mode))
return 0; return 0;
...@@ -682,9 +648,7 @@ fr_nonimmediate_operand (op, mode) ...@@ -682,9 +648,7 @@ fr_nonimmediate_operand (op, mode)
/* Return 1 if OP is a nonimmediate operand that is a GR/FR reg. */ /* Return 1 if OP is a nonimmediate operand that is a GR/FR reg. */
int int
grfr_nonimmediate_operand (op, mode) grfr_nonimmediate_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! nonimmediate_operand (op, mode)) if (! nonimmediate_operand (op, mode))
return 0; return 0;
...@@ -702,9 +666,7 @@ grfr_nonimmediate_operand (op, mode) ...@@ -702,9 +666,7 @@ grfr_nonimmediate_operand (op, mode)
/* Return 1 if OP is a GR register operand, or zero. */ /* Return 1 if OP is a GR register operand, or zero. */
int int
gr_reg_or_0_operand (op, mode) gr_reg_or_0_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (op == const0_rtx || gr_register_operand (op, mode)); return (op == const0_rtx || gr_register_operand (op, mode));
} }
...@@ -712,9 +674,7 @@ gr_reg_or_0_operand (op, mode) ...@@ -712,9 +674,7 @@ gr_reg_or_0_operand (op, mode)
/* Return 1 if OP is a GR register operand, or a 5 bit immediate operand. */ /* Return 1 if OP is a GR register operand, or a 5 bit immediate operand. */
int int
gr_reg_or_5bit_operand (op, mode) gr_reg_or_5bit_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((GET_CODE (op) == CONST_INT && INTVAL (op) >= 0 && INTVAL (op) < 32) return ((GET_CODE (op) == CONST_INT && INTVAL (op) >= 0 && INTVAL (op) < 32)
|| GET_CODE (op) == CONSTANT_P_RTX || GET_CODE (op) == CONSTANT_P_RTX
...@@ -724,9 +684,7 @@ gr_reg_or_5bit_operand (op, mode) ...@@ -724,9 +684,7 @@ gr_reg_or_5bit_operand (op, mode)
/* Return 1 if OP is a GR register operand, or a 6 bit immediate operand. */ /* Return 1 if OP is a GR register operand, or a 6 bit immediate operand. */
int int
gr_reg_or_6bit_operand (op, mode) gr_reg_or_6bit_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_M (INTVAL (op))) return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_M (INTVAL (op)))
|| GET_CODE (op) == CONSTANT_P_RTX || GET_CODE (op) == CONSTANT_P_RTX
...@@ -736,9 +694,7 @@ gr_reg_or_6bit_operand (op, mode) ...@@ -736,9 +694,7 @@ gr_reg_or_6bit_operand (op, mode)
/* Return 1 if OP is a GR register operand, or an 8 bit immediate operand. */ /* Return 1 if OP is a GR register operand, or an 8 bit immediate operand. */
int int
gr_reg_or_8bit_operand (op, mode) gr_reg_or_8bit_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op))) return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op)))
|| GET_CODE (op) == CONSTANT_P_RTX || GET_CODE (op) == CONSTANT_P_RTX
...@@ -748,9 +704,7 @@ gr_reg_or_8bit_operand (op, mode) ...@@ -748,9 +704,7 @@ gr_reg_or_8bit_operand (op, mode)
/* Return 1 if OP is a GR/FR register operand, or an 8 bit immediate. */ /* Return 1 if OP is a GR/FR register operand, or an 8 bit immediate. */
int int
grfr_reg_or_8bit_operand (op, mode) grfr_reg_or_8bit_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op))) return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op)))
|| GET_CODE (op) == CONSTANT_P_RTX || GET_CODE (op) == CONSTANT_P_RTX
...@@ -761,9 +715,7 @@ grfr_reg_or_8bit_operand (op, mode) ...@@ -761,9 +715,7 @@ grfr_reg_or_8bit_operand (op, mode)
operand. */ operand. */
int int
gr_reg_or_8bit_adjusted_operand (op, mode) gr_reg_or_8bit_adjusted_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_L (INTVAL (op))) return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_L (INTVAL (op)))
|| GET_CODE (op) == CONSTANT_P_RTX || GET_CODE (op) == CONSTANT_P_RTX
...@@ -776,9 +728,7 @@ gr_reg_or_8bit_adjusted_operand (op, mode) ...@@ -776,9 +728,7 @@ gr_reg_or_8bit_adjusted_operand (op, mode)
so we need the union of the immediates accepted by GT and LT. */ so we need the union of the immediates accepted by GT and LT. */
int int
gr_reg_or_8bit_and_adjusted_operand (op, mode) gr_reg_or_8bit_and_adjusted_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op)) return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_K (INTVAL (op))
&& CONST_OK_FOR_L (INTVAL (op))) && CONST_OK_FOR_L (INTVAL (op)))
...@@ -789,9 +739,7 @@ gr_reg_or_8bit_and_adjusted_operand (op, mode) ...@@ -789,9 +739,7 @@ gr_reg_or_8bit_and_adjusted_operand (op, mode)
/* Return 1 if OP is a register operand, or a 14 bit immediate operand. */ /* Return 1 if OP is a register operand, or a 14 bit immediate operand. */
int int
gr_reg_or_14bit_operand (op, mode) gr_reg_or_14bit_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_I (INTVAL (op))) return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_I (INTVAL (op)))
|| GET_CODE (op) == CONSTANT_P_RTX || GET_CODE (op) == CONSTANT_P_RTX
...@@ -801,9 +749,7 @@ gr_reg_or_14bit_operand (op, mode) ...@@ -801,9 +749,7 @@ gr_reg_or_14bit_operand (op, mode)
/* Return 1 if OP is a register operand, or a 22 bit immediate operand. */ /* Return 1 if OP is a register operand, or a 22 bit immediate operand. */
int int
gr_reg_or_22bit_operand (op, mode) gr_reg_or_22bit_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_J (INTVAL (op))) return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_J (INTVAL (op)))
|| GET_CODE (op) == CONSTANT_P_RTX || GET_CODE (op) == CONSTANT_P_RTX
...@@ -813,9 +759,7 @@ gr_reg_or_22bit_operand (op, mode) ...@@ -813,9 +759,7 @@ gr_reg_or_22bit_operand (op, mode)
/* Return 1 if OP is a 6 bit immediate operand. */ /* Return 1 if OP is a 6 bit immediate operand. */
int int
shift_count_operand (op, mode) shift_count_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_M (INTVAL (op))) return ((GET_CODE (op) == CONST_INT && CONST_OK_FOR_M (INTVAL (op)))
|| GET_CODE (op) == CONSTANT_P_RTX); || GET_CODE (op) == CONSTANT_P_RTX);
...@@ -824,9 +768,7 @@ shift_count_operand (op, mode) ...@@ -824,9 +768,7 @@ shift_count_operand (op, mode)
/* Return 1 if OP is a 5 bit immediate operand. */ /* Return 1 if OP is a 5 bit immediate operand. */
int int
shift_32bit_count_operand (op, mode) shift_32bit_count_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return ((GET_CODE (op) == CONST_INT return ((GET_CODE (op) == CONST_INT
&& (INTVAL (op) >= 0 && INTVAL (op) < 32)) && (INTVAL (op) >= 0 && INTVAL (op) < 32))
...@@ -836,9 +778,7 @@ shift_32bit_count_operand (op, mode) ...@@ -836,9 +778,7 @@ shift_32bit_count_operand (op, mode)
/* Return 1 if OP is a 2, 4, 8, or 16 immediate operand. */ /* Return 1 if OP is a 2, 4, 8, or 16 immediate operand. */
int int
shladd_operand (op, mode) shladd_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == CONST_INT return (GET_CODE (op) == CONST_INT
&& (INTVAL (op) == 2 || INTVAL (op) == 4 && (INTVAL (op) == 2 || INTVAL (op) == 4
...@@ -848,9 +788,7 @@ shladd_operand (op, mode) ...@@ -848,9 +788,7 @@ shladd_operand (op, mode)
/* Return 1 if OP is a -16, -8, -4, -1, 1, 4, 8, or 16 immediate operand. */ /* Return 1 if OP is a -16, -8, -4, -1, 1, 4, 8, or 16 immediate operand. */
int int
fetchadd_operand (op, mode) fetchadd_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == CONST_INT return (GET_CODE (op) == CONST_INT
&& (INTVAL (op) == -16 || INTVAL (op) == -8 || && (INTVAL (op) == -16 || INTVAL (op) == -8 ||
...@@ -862,9 +800,7 @@ fetchadd_operand (op, mode) ...@@ -862,9 +800,7 @@ fetchadd_operand (op, mode)
/* Return 1 if OP is a floating-point constant zero, one, or a register. */ /* Return 1 if OP is a floating-point constant zero, one, or a register. */
int int
fr_reg_or_fp01_operand (op, mode) fr_reg_or_fp01_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((GET_CODE (op) == CONST_DOUBLE && CONST_DOUBLE_OK_FOR_G (op)) return ((GET_CODE (op) == CONST_DOUBLE && CONST_DOUBLE_OK_FOR_G (op))
|| fr_register_operand (op, mode)); || fr_register_operand (op, mode));
...@@ -874,9 +810,7 @@ fr_reg_or_fp01_operand (op, mode) ...@@ -874,9 +810,7 @@ fr_reg_or_fp01_operand (op, mode)
POST_MODIFY with a REG as displacement. */ POST_MODIFY with a REG as displacement. */
int int
destination_operand (op, mode) destination_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! nonimmediate_operand (op, mode)) if (! nonimmediate_operand (op, mode))
return 0; return 0;
...@@ -890,9 +824,7 @@ destination_operand (op, mode) ...@@ -890,9 +824,7 @@ destination_operand (op, mode)
/* Like memory_operand, but don't allow post-increments. */ /* Like memory_operand, but don't allow post-increments. */
int int
not_postinc_memory_operand (op, mode) not_postinc_memory_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (memory_operand (op, mode) return (memory_operand (op, mode)
&& GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != 'a'); && GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != 'a');
...@@ -902,9 +834,7 @@ not_postinc_memory_operand (op, mode) ...@@ -902,9 +834,7 @@ not_postinc_memory_operand (op, mode)
signed immediate operand. */ signed immediate operand. */
int int
normal_comparison_operator (op, mode) normal_comparison_operator (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
return ((mode == VOIDmode || GET_MODE (op) == mode) return ((mode == VOIDmode || GET_MODE (op) == mode)
...@@ -916,9 +846,7 @@ normal_comparison_operator (op, mode) ...@@ -916,9 +846,7 @@ normal_comparison_operator (op, mode)
signed immediate operand. */ signed immediate operand. */
int int
adjusted_comparison_operator (op, mode) adjusted_comparison_operator (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
return ((mode == VOIDmode || GET_MODE (op) == mode) return ((mode == VOIDmode || GET_MODE (op) == mode)
...@@ -928,9 +856,7 @@ adjusted_comparison_operator (op, mode) ...@@ -928,9 +856,7 @@ adjusted_comparison_operator (op, mode)
/* Return 1 if this is a signed inequality operator. */ /* Return 1 if this is a signed inequality operator. */
int int
signed_inequality_operator (op, mode) signed_inequality_operator (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
return ((mode == VOIDmode || GET_MODE (op) == mode) return ((mode == VOIDmode || GET_MODE (op) == mode)
...@@ -941,9 +867,7 @@ signed_inequality_operator (op, mode) ...@@ -941,9 +867,7 @@ signed_inequality_operator (op, mode)
/* Return 1 if this operator is valid for predication. */ /* Return 1 if this operator is valid for predication. */
int int
predicate_operator (op, mode) predicate_operator (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
return ((GET_MODE (op) == mode || mode == VOIDmode) return ((GET_MODE (op) == mode || mode == VOIDmode)
...@@ -953,9 +877,7 @@ predicate_operator (op, mode) ...@@ -953,9 +877,7 @@ predicate_operator (op, mode)
/* Return 1 if this operator can be used in a conditional operation. */ /* Return 1 if this operator can be used in a conditional operation. */
int int
condop_operator (op, mode) condop_operator (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
return ((GET_MODE (op) == mode || mode == VOIDmode) return ((GET_MODE (op) == mode || mode == VOIDmode)
...@@ -966,9 +888,7 @@ condop_operator (op, mode) ...@@ -966,9 +888,7 @@ condop_operator (op, mode)
/* Return 1 if this is the ar.lc register. */ /* Return 1 if this is the ar.lc register. */
int int
ar_lc_reg_operand (op, mode) ar_lc_reg_operand (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
return (GET_MODE (op) == DImode return (GET_MODE (op) == DImode
&& (mode == DImode || mode == VOIDmode) && (mode == DImode || mode == VOIDmode)
...@@ -979,9 +899,7 @@ ar_lc_reg_operand (op, mode) ...@@ -979,9 +899,7 @@ ar_lc_reg_operand (op, mode)
/* Return 1 if this is the ar.ccv register. */ /* Return 1 if this is the ar.ccv register. */
int int
ar_ccv_reg_operand (op, mode) ar_ccv_reg_operand (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
return ((GET_MODE (op) == mode || mode == VOIDmode) return ((GET_MODE (op) == mode || mode == VOIDmode)
&& GET_CODE (op) == REG && GET_CODE (op) == REG
...@@ -991,9 +909,7 @@ ar_ccv_reg_operand (op, mode) ...@@ -991,9 +909,7 @@ ar_ccv_reg_operand (op, mode)
/* Return 1 if this is the ar.pfs register. */ /* Return 1 if this is the ar.pfs register. */
int int
ar_pfs_reg_operand (op, mode) ar_pfs_reg_operand (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
return ((GET_MODE (op) == mode || mode == VOIDmode) return ((GET_MODE (op) == mode || mode == VOIDmode)
&& GET_CODE (op) == REG && GET_CODE (op) == REG
...@@ -1003,9 +919,7 @@ ar_pfs_reg_operand (op, mode) ...@@ -1003,9 +919,7 @@ ar_pfs_reg_operand (op, mode)
/* Like general_operand, but don't allow (mem (addressof)). */ /* Like general_operand, but don't allow (mem (addressof)). */
int int
general_tfmode_operand (op, mode) general_tfmode_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! general_operand (op, mode)) if (! general_operand (op, mode))
return 0; return 0;
...@@ -1017,9 +931,7 @@ general_tfmode_operand (op, mode) ...@@ -1017,9 +931,7 @@ general_tfmode_operand (op, mode)
/* Similarly. */ /* Similarly. */
int int
destination_tfmode_operand (op, mode) destination_tfmode_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! destination_operand (op, mode)) if (! destination_operand (op, mode))
return 0; return 0;
...@@ -1031,9 +943,7 @@ destination_tfmode_operand (op, mode) ...@@ -1031,9 +943,7 @@ destination_tfmode_operand (op, mode)
/* Similarly. */ /* Similarly. */
int int
tfreg_or_fp01_operand (op, mode) tfreg_or_fp01_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == SUBREG) if (GET_CODE (op) == SUBREG)
return 0; return 0;
...@@ -1043,9 +953,7 @@ tfreg_or_fp01_operand (op, mode) ...@@ -1043,9 +953,7 @@ tfreg_or_fp01_operand (op, mode)
/* Return 1 if OP is valid as a base register in a reg + offset address. */ /* Return 1 if OP is valid as a base register in a reg + offset address. */
int int
basereg_operand (op, mode) basereg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
/* ??? Should I copy the flag_omit_frame_pointer and cse_not_expected /* ??? Should I copy the flag_omit_frame_pointer and cse_not_expected
checks from pa.c basereg_operand as well? Seems to be OK without them checks from pa.c basereg_operand as well? Seems to be OK without them
...@@ -1096,10 +1004,7 @@ ia64_get_addr_area (tree decl) ...@@ -1096,10 +1004,7 @@ ia64_get_addr_area (tree decl)
} }
static tree static tree
ia64_handle_model_attribute (tree *node, tree name, ia64_handle_model_attribute (tree *node, tree name, tree args, int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
tree args,
int flags ATTRIBUTE_UNUSED,
bool *no_add_attrs)
{ {
ia64_addr_area addr_area = ADDR_AREA_NORMAL; ia64_addr_area addr_area = ADDR_AREA_NORMAL;
ia64_addr_area area; ia64_addr_area area;
...@@ -1181,8 +1086,7 @@ ia64_encode_section_info (tree decl, rtx rtl, int first) ...@@ -1181,8 +1086,7 @@ ia64_encode_section_info (tree decl, rtx rtl, int first)
/* Return 1 if the operands of a move are ok. */ /* Return 1 if the operands of a move are ok. */
int int
ia64_move_ok (dst, src) ia64_move_ok (rtx dst, rtx src)
rtx dst, src;
{ {
/* If we're under init_recog_no_volatile, we'll not be able to use /* If we're under init_recog_no_volatile, we'll not be able to use
memory_operand. So check the code directly and don't worry about memory_operand. So check the code directly and don't worry about
...@@ -1206,8 +1110,7 @@ ia64_move_ok (dst, src) ...@@ -1206,8 +1110,7 @@ ia64_move_ok (dst, src)
C++ because of GNAT c++/6685. */ C++ because of GNAT c++/6685. */
int int
addp4_optimize_ok (op1, op2) addp4_optimize_ok (rtx op1, rtx op2)
rtx op1, op2;
{ {
if (!strcmp (lang_hooks.name, "GNU C++")) if (!strcmp (lang_hooks.name, "GNU C++"))
...@@ -1221,8 +1124,7 @@ addp4_optimize_ok (op1, op2) ...@@ -1221,8 +1124,7 @@ addp4_optimize_ok (op1, op2)
Return the length of the field, or <= 0 on failure. */ Return the length of the field, or <= 0 on failure. */
int int
ia64_depz_field_mask (rop, rshift) ia64_depz_field_mask (rtx rop, rtx rshift)
rtx rop, rshift;
{ {
unsigned HOST_WIDE_INT op = INTVAL (rop); unsigned HOST_WIDE_INT op = INTVAL (rop);
unsigned HOST_WIDE_INT shift = INTVAL (rshift); unsigned HOST_WIDE_INT shift = INTVAL (rshift);
...@@ -1237,8 +1139,7 @@ ia64_depz_field_mask (rop, rshift) ...@@ -1237,8 +1139,7 @@ ia64_depz_field_mask (rop, rshift)
/* Expand a symbolic constant load. */ /* Expand a symbolic constant load. */
void void
ia64_expand_load_address (dest, src) ia64_expand_load_address (rtx dest, rtx src)
rtx dest, src;
{ {
if (tls_symbolic_operand (src, VOIDmode)) if (tls_symbolic_operand (src, VOIDmode))
abort (); abort ();
...@@ -1305,7 +1206,7 @@ ia64_expand_load_address (dest, src) ...@@ -1305,7 +1206,7 @@ ia64_expand_load_address (dest, src)
static GTY(()) rtx gen_tls_tga; static GTY(()) rtx gen_tls_tga;
static rtx static rtx
gen_tls_get_addr () gen_tls_get_addr (void)
{ {
if (!gen_tls_tga) if (!gen_tls_tga)
gen_tls_tga = init_one_libfunc ("__tls_get_addr"); gen_tls_tga = init_one_libfunc ("__tls_get_addr");
...@@ -1314,7 +1215,7 @@ gen_tls_get_addr () ...@@ -1314,7 +1215,7 @@ gen_tls_get_addr ()
static GTY(()) rtx thread_pointer_rtx; static GTY(()) rtx thread_pointer_rtx;
static rtx static rtx
gen_thread_pointer () gen_thread_pointer (void)
{ {
if (!thread_pointer_rtx) if (!thread_pointer_rtx)
{ {
...@@ -1325,9 +1226,7 @@ gen_thread_pointer () ...@@ -1325,9 +1226,7 @@ gen_thread_pointer ()
} }
static rtx static rtx
ia64_expand_tls_address (tls_kind, op0, op1) ia64_expand_tls_address (enum tls_model tls_kind, rtx op0, rtx op1)
enum tls_model tls_kind;
rtx op0, op1;
{ {
rtx tga_op1, tga_op2, tga_ret, tga_eqv, tmp, insns; rtx tga_op1, tga_op2, tga_ret, tga_eqv, tmp, insns;
...@@ -1345,7 +1244,7 @@ ia64_expand_tls_address (tls_kind, op0, op1) ...@@ -1345,7 +1244,7 @@ ia64_expand_tls_address (tls_kind, op0, op1)
emit_insn (gen_load_ltoff_dtprel (tga_op2, op1)); emit_insn (gen_load_ltoff_dtprel (tga_op2, op1));
tga_op2 = gen_rtx_MEM (Pmode, tga_op2); tga_op2 = gen_rtx_MEM (Pmode, tga_op2);
RTX_UNCHANGING_P (tga_op2) = 1; RTX_UNCHANGING_P (tga_op2) = 1;
tga_ret = emit_library_call_value (gen_tls_get_addr (), NULL_RTX, tga_ret = emit_library_call_value (gen_tls_get_addr (), NULL_RTX,
LCT_CONST, Pmode, 2, tga_op1, LCT_CONST, Pmode, 2, tga_op1,
Pmode, tga_op2, Pmode); Pmode, tga_op2, Pmode);
...@@ -1432,8 +1331,7 @@ ia64_expand_tls_address (tls_kind, op0, op1) ...@@ -1432,8 +1331,7 @@ ia64_expand_tls_address (tls_kind, op0, op1)
} }
rtx rtx
ia64_expand_move (op0, op1) ia64_expand_move (rtx op0, rtx op1)
rtx op0, op1;
{ {
enum machine_mode mode = GET_MODE (op0); enum machine_mode mode = GET_MODE (op0);
...@@ -1459,8 +1357,7 @@ ia64_expand_move (op0, op1) ...@@ -1459,8 +1357,7 @@ ia64_expand_move (op0, op1)
/* Split a move from OP1 to OP0 conditional on COND. */ /* Split a move from OP1 to OP0 conditional on COND. */
void void
ia64_emit_cond_move (op0, op1, cond) ia64_emit_cond_move (rtx op0, rtx op1, rtx cond)
rtx op0, op1, cond;
{ {
rtx insn, first = get_last_insn (); rtx insn, first = get_last_insn ();
...@@ -1475,9 +1372,7 @@ ia64_emit_cond_move (op0, op1, cond) ...@@ -1475,9 +1372,7 @@ ia64_emit_cond_move (op0, op1, cond)
/* Split a post-reload TImode reference into two DImode components. */ /* Split a post-reload TImode reference into two DImode components. */
rtx rtx
ia64_split_timode (out, in, scratch) ia64_split_timode (rtx out[2], rtx in, rtx scratch)
rtx out[2];
rtx in, scratch;
{ {
switch (GET_CODE (in)) switch (GET_CODE (in))
{ {
...@@ -1544,14 +1439,12 @@ ia64_split_timode (out, in, scratch) ...@@ -1544,14 +1439,12 @@ ia64_split_timode (out, in, scratch)
SECONDARY_RELOAD_CLASS, but not both. SECONDARY_RELOAD_CLASS, but not both.
We got into problems in the first place by allowing a construct like We got into problems in the first place by allowing a construct like
(subreg:TF (reg:TI)), which we got from a union containing a long double. (subreg:TF (reg:TI)), which we got from a union containing a long double.
This solution attempts to prevent this situation from occurring. When This solution attempts to prevent this situation from occurring. When
we see something like the above, we spill the inner register to memory. */ we see something like the above, we spill the inner register to memory. */
rtx rtx
spill_tfmode_operand (in, force) spill_tfmode_operand (rtx in, int force)
rtx in;
int force;
{ {
if (GET_CODE (in) == SUBREG if (GET_CODE (in) == SUBREG
&& GET_MODE (SUBREG_REG (in)) == TImode && GET_MODE (SUBREG_REG (in)) == TImode
...@@ -1576,9 +1469,7 @@ spill_tfmode_operand (in, force) ...@@ -1576,9 +1469,7 @@ spill_tfmode_operand (in, force)
that holds the compare result in the proper mode. */ that holds the compare result in the proper mode. */
rtx rtx
ia64_expand_compare (code, mode) ia64_expand_compare (enum rtx_code code, enum machine_mode mode)
enum rtx_code code;
enum machine_mode mode;
{ {
rtx op0 = ia64_compare_op0, op1 = ia64_compare_op1; rtx op0 = ia64_compare_op0, op1 = ia64_compare_op1;
rtx cmp; rtx cmp;
...@@ -1606,11 +1497,8 @@ ia64_expand_compare (code, mode) ...@@ -1606,11 +1497,8 @@ ia64_expand_compare (code, mode)
/* Emit the appropriate sequence for a call. */ /* Emit the appropriate sequence for a call. */
void void
ia64_expand_call (retval, addr, nextarg, sibcall_p) ia64_expand_call (rtx retval, rtx addr, rtx nextarg ATTRIBUTE_UNUSED,
rtx retval; int sibcall_p)
rtx addr;
rtx nextarg ATTRIBUTE_UNUSED;
int sibcall_p;
{ {
rtx insn, b0; rtx insn, b0;
...@@ -1646,7 +1534,7 @@ ia64_expand_call (retval, addr, nextarg, sibcall_p) ...@@ -1646,7 +1534,7 @@ ia64_expand_call (retval, addr, nextarg, sibcall_p)
} }
void void
ia64_reload_gp () ia64_reload_gp (void)
{ {
rtx tmp; rtx tmp;
...@@ -1686,10 +1574,8 @@ ia64_reload_gp () ...@@ -1686,10 +1574,8 @@ ia64_reload_gp ()
} }
void void
ia64_split_call (retval, addr, retaddr, scratch_r, scratch_b, ia64_split_call (rtx retval, rtx addr, rtx retaddr, rtx scratch_r,
noreturn_p, sibcall_p) rtx scratch_b, int noreturn_p, int sibcall_p)
rtx retval, addr, retaddr, scratch_r, scratch_b;
int noreturn_p, sibcall_p;
{ {
rtx insn; rtx insn;
bool is_desc = false; bool is_desc = false;
...@@ -1703,7 +1589,7 @@ ia64_split_call (retval, addr, retaddr, scratch_r, scratch_b, ...@@ -1703,7 +1589,7 @@ ia64_split_call (retval, addr, retaddr, scratch_r, scratch_b,
/* ??? We are currently constrained to *not* use peep2, because /* ??? We are currently constrained to *not* use peep2, because
we can legitimately change the global lifetime of the GP we can legitimately change the global lifetime of the GP
(in the form of killing where previously live). This is (in the form of killing where previously live). This is
because a call through a descriptor doesn't use the previous because a call through a descriptor doesn't use the previous
value of the GP, while a direct call does, and we do not value of the GP, while a direct call does, and we do not
commit to either form until the split here. commit to either form until the split here.
...@@ -1752,14 +1638,14 @@ ia64_split_call (retval, addr, retaddr, scratch_r, scratch_b, ...@@ -1752,14 +1638,14 @@ ia64_split_call (retval, addr, retaddr, scratch_r, scratch_b,
/* Begin the assembly file. */ /* Begin the assembly file. */
static void static void
ia64_file_start () ia64_file_start (void)
{ {
default_file_start (); default_file_start ();
emit_safe_across_calls (); emit_safe_across_calls ();
} }
void void
emit_safe_across_calls () emit_safe_across_calls (void)
{ {
unsigned int rs, re; unsigned int rs, re;
int out_state; int out_state;
...@@ -1797,8 +1683,7 @@ emit_safe_across_calls () ...@@ -1797,8 +1683,7 @@ emit_safe_across_calls ()
TRY_LOCALS is true if we should attempt to locate a local regnum. */ TRY_LOCALS is true if we should attempt to locate a local regnum. */
static int static int
find_gr_spill (try_locals) find_gr_spill (int try_locals)
int try_locals;
{ {
int regno; int regno;
...@@ -1847,7 +1732,7 @@ find_gr_spill (try_locals) ...@@ -1847,7 +1732,7 @@ find_gr_spill (try_locals)
static int last_scratch_gr_reg; static int last_scratch_gr_reg;
static int static int
next_scratch_gr_reg () next_scratch_gr_reg (void)
{ {
int i, regno; int i, regno;
...@@ -1872,9 +1757,7 @@ next_scratch_gr_reg () ...@@ -1872,9 +1757,7 @@ next_scratch_gr_reg ()
diddle_return_value. Mark REG in current_frame_info.gr_used_mask. */ diddle_return_value. Mark REG in current_frame_info.gr_used_mask. */
static void static void
mark_reg_gr_used_mask (reg, data) mark_reg_gr_used_mask (rtx reg, void *data ATTRIBUTE_UNUSED)
rtx reg;
void *data ATTRIBUTE_UNUSED;
{ {
unsigned int regno = REGNO (reg); unsigned int regno = REGNO (reg);
if (regno < 32) if (regno < 32)
...@@ -1890,8 +1773,7 @@ mark_reg_gr_used_mask (reg, data) ...@@ -1890,8 +1773,7 @@ mark_reg_gr_used_mask (reg, data)
needed for local variables. */ needed for local variables. */
static void static void
ia64_compute_frame_size (size) ia64_compute_frame_size (HOST_WIDE_INT size)
HOST_WIDE_INT size;
{ {
HOST_WIDE_INT total_size; HOST_WIDE_INT total_size;
HOST_WIDE_INT spill_size = 0; HOST_WIDE_INT spill_size = 0;
...@@ -1964,7 +1846,7 @@ ia64_compute_frame_size (size) ...@@ -1964,7 +1846,7 @@ ia64_compute_frame_size (size)
current_frame_info.n_rotate_regs = 0; current_frame_info.n_rotate_regs = 0;
/* Discover which registers need spilling, and how much room that /* Discover which registers need spilling, and how much room that
will take. Begin with floating point and general registers, will take. Begin with floating point and general registers,
which will always wind up on the stack. */ which will always wind up on the stack. */
for (regno = FR_REG (2); regno <= FR_REG (127); regno++) for (regno = FR_REG (2); regno <= FR_REG (127); regno++)
...@@ -1995,7 +1877,7 @@ ia64_compute_frame_size (size) ...@@ -1995,7 +1877,7 @@ ia64_compute_frame_size (size)
/* Now come all special registers that might get saved in other /* Now come all special registers that might get saved in other
general registers. */ general registers. */
if (frame_pointer_needed) if (frame_pointer_needed)
{ {
current_frame_info.reg_fp = find_gr_spill (1); current_frame_info.reg_fp = find_gr_spill (1);
...@@ -2157,8 +2039,7 @@ ia64_compute_frame_size (size) ...@@ -2157,8 +2039,7 @@ ia64_compute_frame_size (size)
/* Compute the initial difference between the specified pair of registers. */ /* Compute the initial difference between the specified pair of registers. */
HOST_WIDE_INT HOST_WIDE_INT
ia64_initial_elimination_offset (from, to) ia64_initial_elimination_offset (int from, int to)
int from, to;
{ {
HOST_WIDE_INT offset; HOST_WIDE_INT offset;
...@@ -2230,10 +2111,7 @@ struct spill_fill_data ...@@ -2230,10 +2111,7 @@ struct spill_fill_data
static struct spill_fill_data spill_fill_data; static struct spill_fill_data spill_fill_data;
static void static void
setup_spill_pointers (n_spills, init_reg, cfa_off) setup_spill_pointers (int n_spills, rtx init_reg, HOST_WIDE_INT cfa_off)
int n_spills;
rtx init_reg;
HOST_WIDE_INT cfa_off;
{ {
int i; int i;
...@@ -2259,15 +2137,13 @@ setup_spill_pointers (n_spills, init_reg, cfa_off) ...@@ -2259,15 +2137,13 @@ setup_spill_pointers (n_spills, init_reg, cfa_off)
} }
static void static void
finish_spill_pointers () finish_spill_pointers (void)
{ {
current_frame_info.gr_used_mask = spill_fill_data.save_gr_used_mask; current_frame_info.gr_used_mask = spill_fill_data.save_gr_used_mask;
} }
static rtx static rtx
spill_restore_mem (reg, cfa_off) spill_restore_mem (rtx reg, HOST_WIDE_INT cfa_off)
rtx reg;
HOST_WIDE_INT cfa_off;
{ {
int iter = spill_fill_data.next_iter; int iter = spill_fill_data.next_iter;
HOST_WIDE_INT disp = spill_fill_data.prev_off[iter] - cfa_off; HOST_WIDE_INT disp = spill_fill_data.prev_off[iter] - cfa_off;
...@@ -2380,10 +2256,8 @@ spill_restore_mem (reg, cfa_off) ...@@ -2380,10 +2256,8 @@ spill_restore_mem (reg, cfa_off)
} }
static void static void
do_spill (move_fn, reg, cfa_off, frame_reg) do_spill (rtx (*move_fn) (rtx, rtx, rtx), rtx reg, HOST_WIDE_INT cfa_off,
rtx (*move_fn) PARAMS ((rtx, rtx, rtx)); rtx frame_reg)
rtx reg, frame_reg;
HOST_WIDE_INT cfa_off;
{ {
int iter = spill_fill_data.next_iter; int iter = spill_fill_data.next_iter;
rtx mem, insn; rtx mem, insn;
...@@ -2399,7 +2273,7 @@ do_spill (move_fn, reg, cfa_off, frame_reg) ...@@ -2399,7 +2273,7 @@ do_spill (move_fn, reg, cfa_off, frame_reg)
RTX_FRAME_RELATED_P (insn) = 1; RTX_FRAME_RELATED_P (insn) = 1;
/* Don't even pretend that the unwind code can intuit its way /* Don't even pretend that the unwind code can intuit its way
through a pair of interleaved post_modify iterators. Just through a pair of interleaved post_modify iterators. Just
provide the correct answer. */ provide the correct answer. */
...@@ -2425,10 +2299,7 @@ do_spill (move_fn, reg, cfa_off, frame_reg) ...@@ -2425,10 +2299,7 @@ do_spill (move_fn, reg, cfa_off, frame_reg)
} }
static void static void
do_restore (move_fn, reg, cfa_off) do_restore (rtx (*move_fn) (rtx, rtx, rtx), rtx reg, HOST_WIDE_INT cfa_off)
rtx (*move_fn) PARAMS ((rtx, rtx, rtx));
rtx reg;
HOST_WIDE_INT cfa_off;
{ {
int iter = spill_fill_data.next_iter; int iter = spill_fill_data.next_iter;
rtx insn; rtx insn;
...@@ -2443,25 +2314,19 @@ do_restore (move_fn, reg, cfa_off) ...@@ -2443,25 +2314,19 @@ do_restore (move_fn, reg, cfa_off)
use a consistent function interface. */ use a consistent function interface. */
static rtx static rtx
gen_movdi_x (dest, src, offset) gen_movdi_x (rtx dest, rtx src, rtx offset ATTRIBUTE_UNUSED)
rtx dest, src;
rtx offset ATTRIBUTE_UNUSED;
{ {
return gen_movdi (dest, src); return gen_movdi (dest, src);
} }
static rtx static rtx
gen_fr_spill_x (dest, src, offset) gen_fr_spill_x (rtx dest, rtx src, rtx offset ATTRIBUTE_UNUSED)
rtx dest, src;
rtx offset ATTRIBUTE_UNUSED;
{ {
return gen_fr_spill (dest, src); return gen_fr_spill (dest, src);
} }
static rtx static rtx
gen_fr_restore_x (dest, src, offset) gen_fr_restore_x (rtx dest, rtx src, rtx offset ATTRIBUTE_UNUSED)
rtx dest, src;
rtx offset ATTRIBUTE_UNUSED;
{ {
return gen_fr_restore (dest, src); return gen_fr_restore (dest, src);
} }
...@@ -2489,7 +2354,7 @@ gen_fr_restore_x (dest, src, offset) ...@@ -2489,7 +2354,7 @@ gen_fr_restore_x (dest, src, offset)
adds instruction. */ adds instruction. */
void void
ia64_expand_prologue () ia64_expand_prologue (void)
{ {
rtx insn, ar_pfs_save_reg, ar_unat_save_reg; rtx insn, ar_pfs_save_reg, ar_unat_save_reg;
int i, epilogue_p, regno, alt_regno, cfa_off, n_varargs; int i, epilogue_p, regno, alt_regno, cfa_off, n_varargs;
...@@ -2568,7 +2433,7 @@ ia64_expand_prologue () ...@@ -2568,7 +2433,7 @@ ia64_expand_prologue ()
regno = next_scratch_gr_reg (); regno = next_scratch_gr_reg ();
ar_pfs_save_reg = gen_rtx_REG (DImode, regno); ar_pfs_save_reg = gen_rtx_REG (DImode, regno);
insn = emit_insn (gen_alloc (ar_pfs_save_reg, insn = emit_insn (gen_alloc (ar_pfs_save_reg,
GEN_INT (current_frame_info.n_input_regs), GEN_INT (current_frame_info.n_input_regs),
GEN_INT (current_frame_info.n_local_regs), GEN_INT (current_frame_info.n_local_regs),
GEN_INT (current_frame_info.n_output_regs), GEN_INT (current_frame_info.n_output_regs),
...@@ -2598,7 +2463,7 @@ ia64_expand_prologue () ...@@ -2598,7 +2463,7 @@ ia64_expand_prologue ()
else else
{ {
regno = next_scratch_gr_reg (); regno = next_scratch_gr_reg ();
offset = gen_rtx_REG (DImode, regno); offset = gen_rtx_REG (DImode, regno);
emit_move_insn (offset, frame_size_rtx); emit_move_insn (offset, frame_size_rtx);
} }
...@@ -2835,8 +2700,7 @@ ia64_expand_prologue () ...@@ -2835,8 +2700,7 @@ ia64_expand_prologue ()
insn to prevent such scheduling. */ insn to prevent such scheduling. */
void void
ia64_expand_epilogue (sibcall_p) ia64_expand_epilogue (int sibcall_p)
int sibcall_p;
{ {
rtx insn, reg, alt_reg, ar_unat_save_reg; rtx insn, reg, alt_reg, ar_unat_save_reg;
int regno, alt_regno, cfa_off; int regno, alt_regno, cfa_off;
...@@ -2850,7 +2714,7 @@ ia64_expand_epilogue (sibcall_p) ...@@ -2850,7 +2714,7 @@ ia64_expand_epilogue (sibcall_p)
setup_spill_pointers (current_frame_info.n_spilled, setup_spill_pointers (current_frame_info.n_spilled,
hard_frame_pointer_rtx, 0); hard_frame_pointer_rtx, 0);
else else
setup_spill_pointers (current_frame_info.n_spilled, stack_pointer_rtx, setup_spill_pointers (current_frame_info.n_spilled, stack_pointer_rtx,
current_frame_info.total_size); current_frame_info.total_size);
if (current_frame_info.total_size != 0) if (current_frame_info.total_size != 0)
...@@ -2902,7 +2766,7 @@ ia64_expand_epilogue (sibcall_p) ...@@ -2902,7 +2766,7 @@ ia64_expand_epilogue (sibcall_p)
} }
else else
ar_unat_save_reg = NULL_RTX; ar_unat_save_reg = NULL_RTX;
if (current_frame_info.reg_save_ar_pfs != 0) if (current_frame_info.reg_save_ar_pfs != 0)
{ {
alt_reg = gen_rtx_REG (DImode, current_frame_info.reg_save_ar_pfs); alt_reg = gen_rtx_REG (DImode, current_frame_info.reg_save_ar_pfs);
...@@ -2952,7 +2816,7 @@ ia64_expand_epilogue (sibcall_p) ...@@ -2952,7 +2816,7 @@ ia64_expand_epilogue (sibcall_p)
do_restore (gen_gr_restore, reg, cfa_off); do_restore (gen_gr_restore, reg, cfa_off);
cfa_off -= 8; cfa_off -= 8;
} }
/* Restore the branch registers. Handle B0 specially, as it may /* Restore the branch registers. Handle B0 specially, as it may
have gotten stored in some GR register. */ have gotten stored in some GR register. */
if (TEST_HARD_REG_BIT (current_frame_info.mask, BR_REG (0))) if (TEST_HARD_REG_BIT (current_frame_info.mask, BR_REG (0)))
...@@ -2969,7 +2833,7 @@ ia64_expand_epilogue (sibcall_p) ...@@ -2969,7 +2833,7 @@ ia64_expand_epilogue (sibcall_p)
reg = gen_rtx_REG (DImode, BR_REG (0)); reg = gen_rtx_REG (DImode, BR_REG (0));
emit_move_insn (reg, alt_reg); emit_move_insn (reg, alt_reg);
} }
for (regno = BR_REG (1); regno <= BR_REG (7); ++regno) for (regno = BR_REG (1); regno <= BR_REG (7); ++regno)
if (TEST_HARD_REG_BIT (current_frame_info.mask, regno)) if (TEST_HARD_REG_BIT (current_frame_info.mask, regno))
{ {
...@@ -3053,15 +2917,15 @@ ia64_expand_epilogue (sibcall_p) ...@@ -3053,15 +2917,15 @@ ia64_expand_epilogue (sibcall_p)
if (cfun->machine->ia64_eh_epilogue_bsp) if (cfun->machine->ia64_eh_epilogue_bsp)
emit_insn (gen_set_bsp (cfun->machine->ia64_eh_epilogue_bsp)); emit_insn (gen_set_bsp (cfun->machine->ia64_eh_epilogue_bsp));
if (! sibcall_p) if (! sibcall_p)
emit_jump_insn (gen_return_internal (gen_rtx_REG (DImode, BR_REG (0)))); emit_jump_insn (gen_return_internal (gen_rtx_REG (DImode, BR_REG (0))));
else else
{ {
int fp = GR_REG (2); int fp = GR_REG (2);
/* We need a throw away register here, r0 and r1 are reserved, so r2 is the /* We need a throw away register here, r0 and r1 are reserved, so r2 is the
first available call clobbered register. If there was a frame_pointer first available call clobbered register. If there was a frame_pointer
register, we may have swapped the names of r2 and HARD_FRAME_POINTER_REGNUM, register, we may have swapped the names of r2 and HARD_FRAME_POINTER_REGNUM,
so we have to make sure we're using the string "r2" when emitting so we have to make sure we're using the string "r2" when emitting
the register name for the assembler. */ the register name for the assembler. */
if (current_frame_info.reg_fp && current_frame_info.reg_fp == GR_REG (2)) if (current_frame_info.reg_fp && current_frame_info.reg_fp == GR_REG (2))
...@@ -3086,7 +2950,7 @@ ia64_expand_epilogue (sibcall_p) ...@@ -3086,7 +2950,7 @@ ia64_expand_epilogue (sibcall_p)
function. */ function. */
int int
ia64_direct_return () ia64_direct_return (void)
{ {
if (reload_completed && ! frame_pointer_needed) if (reload_completed && ! frame_pointer_needed)
{ {
...@@ -3107,9 +2971,7 @@ ia64_direct_return () ...@@ -3107,9 +2971,7 @@ ia64_direct_return ()
during early compilation. */ during early compilation. */
rtx rtx
ia64_return_addr_rtx (count, frame) ia64_return_addr_rtx (HOST_WIDE_INT count, rtx frame ATTRIBUTE_UNUSED)
HOST_WIDE_INT count;
rtx frame ATTRIBUTE_UNUSED;
{ {
if (count != 0) if (count != 0)
return NULL; return NULL;
...@@ -3120,8 +2982,7 @@ ia64_return_addr_rtx (count, frame) ...@@ -3120,8 +2982,7 @@ ia64_return_addr_rtx (count, frame)
address is saved. */ address is saved. */
void void
ia64_split_return_addr_rtx (dest) ia64_split_return_addr_rtx (rtx dest)
rtx dest;
{ {
rtx src; rtx src;
...@@ -3170,9 +3031,7 @@ ia64_split_return_addr_rtx (dest) ...@@ -3170,9 +3031,7 @@ ia64_split_return_addr_rtx (dest)
} }
int int
ia64_hard_regno_rename_ok (from, to) ia64_hard_regno_rename_ok (int from, int to)
int from;
int to;
{ {
/* Don't clobber any of the registers we reserved for the prologue. */ /* Don't clobber any of the registers we reserved for the prologue. */
if (to == current_frame_info.reg_fp if (to == current_frame_info.reg_fp
...@@ -3206,10 +3065,7 @@ ia64_hard_regno_rename_ok (from, to) ...@@ -3206,10 +3065,7 @@ ia64_hard_regno_rename_ok (from, to)
aligned objects and detect the cases when @fptr is needed. */ aligned objects and detect the cases when @fptr is needed. */
static bool static bool
ia64_assemble_integer (x, size, aligned_p) ia64_assemble_integer (rtx x, unsigned int size, int aligned_p)
rtx x;
unsigned int size;
int aligned_p;
{ {
if (size == (TARGET_ILP32 ? 4 : 8) if (size == (TARGET_ILP32 ? 4 : 8)
&& aligned_p && aligned_p
...@@ -3231,9 +3087,7 @@ ia64_assemble_integer (x, size, aligned_p) ...@@ -3231,9 +3087,7 @@ ia64_assemble_integer (x, size, aligned_p)
/* Emit the function prologue. */ /* Emit the function prologue. */
static void static void
ia64_output_function_prologue (file, size) ia64_output_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
FILE *file;
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
{ {
int mask, grsave, grsave_prev; int mask, grsave, grsave_prev;
...@@ -3300,8 +3154,7 @@ ia64_output_function_prologue (file, size) ...@@ -3300,8 +3154,7 @@ ia64_output_function_prologue (file, size)
/* Emit the .body directive at the scheduled end of the prologue. */ /* Emit the .body directive at the scheduled end of the prologue. */
static void static void
ia64_output_function_end_prologue (file) ia64_output_function_end_prologue (FILE *file)
FILE *file;
{ {
if (!flag_unwind_tables && (!flag_exceptions || USING_SJLJ_EXCEPTIONS)) if (!flag_unwind_tables && (!flag_exceptions || USING_SJLJ_EXCEPTIONS))
return; return;
...@@ -3312,9 +3165,8 @@ ia64_output_function_end_prologue (file) ...@@ -3312,9 +3165,8 @@ ia64_output_function_end_prologue (file)
/* Emit the function epilogue. */ /* Emit the function epilogue. */
static void static void
ia64_output_function_epilogue (file, size) ia64_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED,
FILE *file ATTRIBUTE_UNUSED; HOST_WIDE_INT size ATTRIBUTE_UNUSED)
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
{ {
int i; int i;
...@@ -3339,8 +3191,7 @@ ia64_output_function_epilogue (file, size) ...@@ -3339,8 +3191,7 @@ ia64_output_function_epilogue (file, size)
} }
int int
ia64_dbx_register_number (regno) ia64_dbx_register_number (int regno)
int regno;
{ {
/* In ia64_expand_prologue we quite literally renamed the frame pointer /* In ia64_expand_prologue we quite literally renamed the frame pointer
from its home at loc79 to something inside the register frame. We from its home at loc79 to something inside the register frame. We
...@@ -3365,8 +3216,7 @@ ia64_dbx_register_number (regno) ...@@ -3365,8 +3216,7 @@ ia64_dbx_register_number (regno)
} }
void void
ia64_initialize_trampoline (addr, fnaddr, static_chain) ia64_initialize_trampoline (rtx addr, rtx fnaddr, rtx static_chain)
rtx addr, fnaddr, static_chain;
{ {
rtx addr_reg, eight = GEN_INT (8); rtx addr_reg, eight = GEN_INT (8);
...@@ -3398,12 +3248,9 @@ ia64_initialize_trampoline (addr, fnaddr, static_chain) ...@@ -3398,12 +3248,9 @@ ia64_initialize_trampoline (addr, fnaddr, static_chain)
We generate the actual spill instructions during prologue generation. */ We generate the actual spill instructions during prologue generation. */
void void
ia64_setup_incoming_varargs (cum, int_mode, type, pretend_size, second_time) ia64_setup_incoming_varargs (CUMULATIVE_ARGS cum, int int_mode, tree type,
CUMULATIVE_ARGS cum; int * pretend_size,
int int_mode; int second_time ATTRIBUTE_UNUSED)
tree type;
int * pretend_size;
int second_time ATTRIBUTE_UNUSED;
{ {
/* Skip the current argument. */ /* Skip the current argument. */
ia64_function_arg_advance (&cum, int_mode, type, 1); ia64_function_arg_advance (&cum, int_mode, type, 1);
...@@ -3425,9 +3272,7 @@ ia64_setup_incoming_varargs (cum, int_mode, type, pretend_size, second_time) ...@@ -3425,9 +3272,7 @@ ia64_setup_incoming_varargs (cum, int_mode, type, pretend_size, second_time)
SFmode). 128-bit quad-precision floats are excluded. */ SFmode). 128-bit quad-precision floats are excluded. */
static enum machine_mode static enum machine_mode
hfa_element_mode (type, nested) hfa_element_mode (tree type, int nested)
tree type;
int nested;
{ {
enum machine_mode element_mode = VOIDmode; enum machine_mode element_mode = VOIDmode;
enum machine_mode mode; enum machine_mode mode;
...@@ -3508,12 +3353,8 @@ hfa_element_mode (type, nested) ...@@ -3508,12 +3353,8 @@ hfa_element_mode (type, nested)
registers. */ registers. */
rtx rtx
ia64_function_arg (cum, mode, type, named, incoming) ia64_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
CUMULATIVE_ARGS *cum; int named, int incoming)
enum machine_mode mode;
tree type;
int named;
int incoming;
{ {
int basereg = (incoming ? GR_ARG_FIRST : AR_ARG_FIRST); int basereg = (incoming ? GR_ARG_FIRST : AR_ARG_FIRST);
int words = (((mode == BLKmode ? int_size_in_bytes (type) int words = (((mode == BLKmode ? int_size_in_bytes (type)
...@@ -3684,11 +3525,8 @@ ia64_function_arg (cum, mode, type, named, incoming) ...@@ -3684,11 +3525,8 @@ ia64_function_arg (cum, mode, type, named, incoming)
in memory. */ in memory. */
int int
ia64_function_arg_partial_nregs (cum, mode, type, named) ia64_function_arg_partial_nregs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
CUMULATIVE_ARGS *cum; tree type, int named ATTRIBUTE_UNUSED)
enum machine_mode mode;
tree type;
int named ATTRIBUTE_UNUSED;
{ {
int words = (((mode == BLKmode ? int_size_in_bytes (type) int words = (((mode == BLKmode ? int_size_in_bytes (type)
: GET_MODE_SIZE (mode)) + UNITS_PER_WORD - 1) : GET_MODE_SIZE (mode)) + UNITS_PER_WORD - 1)
...@@ -3721,11 +3559,8 @@ ia64_function_arg_partial_nregs (cum, mode, type, named) ...@@ -3721,11 +3559,8 @@ ia64_function_arg_partial_nregs (cum, mode, type, named)
ia64_function_arg. */ ia64_function_arg. */
void void
ia64_function_arg_advance (cum, mode, type, named) ia64_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
CUMULATIVE_ARGS *cum; tree type, int named)
enum machine_mode mode;
tree type;
int named;
{ {
int words = (((mode == BLKmode ? int_size_in_bytes (type) int words = (((mode == BLKmode ? int_size_in_bytes (type)
: GET_MODE_SIZE (mode)) + UNITS_PER_WORD - 1) : GET_MODE_SIZE (mode)) + UNITS_PER_WORD - 1)
...@@ -3805,7 +3640,7 @@ ia64_function_arg_advance (cum, mode, type, named) ...@@ -3805,7 +3640,7 @@ ia64_function_arg_advance (cum, mode, type, named)
/* If there is no prototype, then FP values go in both FR and GR /* If there is no prototype, then FP values go in both FR and GR
registers. */ registers. */
else else
{ {
/* ??? Complex types should not reach here. */ /* ??? Complex types should not reach here. */
cum->fp_regs += (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT ? 2 : 1); cum->fp_regs += (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT ? 2 : 1);
cum->int_regs = cum->words; cum->int_regs = cum->words;
...@@ -3816,11 +3651,9 @@ ia64_function_arg_advance (cum, mode, type, named) ...@@ -3816,11 +3651,9 @@ ia64_function_arg_advance (cum, mode, type, named)
/* ??? At present this is a GCC extension to the IA-64 ABI. */ /* ??? At present this is a GCC extension to the IA-64 ABI. */
int int
ia64_function_arg_pass_by_reference (cum, mode, type, named) ia64_function_arg_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED; tree type, int named ATTRIBUTE_UNUSED)
tree type;
int named ATTRIBUTE_UNUSED;
{ {
return type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST; return type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST;
} }
...@@ -3829,9 +3662,7 @@ ia64_function_arg_pass_by_reference (cum, mode, type, named) ...@@ -3829,9 +3662,7 @@ ia64_function_arg_pass_by_reference (cum, mode, type, named)
call expression EXP. DECL will be the called function, or NULL if call expression EXP. DECL will be the called function, or NULL if
this is an indirect call. */ this is an indirect call. */
static bool static bool
ia64_function_ok_for_sibcall (decl, exp) ia64_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
tree decl;
tree exp ATTRIBUTE_UNUSED;
{ {
/* We must always return with our current GP. This means we can /* We must always return with our current GP. This means we can
only sibcall to functions defined in the current module. */ only sibcall to functions defined in the current module. */
...@@ -3842,8 +3673,7 @@ ia64_function_ok_for_sibcall (decl, exp) ...@@ -3842,8 +3673,7 @@ ia64_function_ok_for_sibcall (decl, exp)
/* Implement va_arg. */ /* Implement va_arg. */
rtx rtx
ia64_va_arg (valist, type) ia64_va_arg (tree valist, tree type)
tree valist, type;
{ {
tree t; tree t;
...@@ -3874,8 +3704,7 @@ ia64_va_arg (valist, type) ...@@ -3874,8 +3704,7 @@ ia64_va_arg (valist, type)
in a register. */ in a register. */
int int
ia64_return_in_memory (valtype) ia64_return_in_memory (tree valtype)
tree valtype;
{ {
enum machine_mode mode; enum machine_mode mode;
enum machine_mode hfa_mode; enum machine_mode hfa_mode;
...@@ -3911,9 +3740,7 @@ ia64_return_in_memory (valtype) ...@@ -3911,9 +3740,7 @@ ia64_return_in_memory (valtype)
/* Return rtx for register that holds the function return value. */ /* Return rtx for register that holds the function return value. */
rtx rtx
ia64_function_value (valtype, func) ia64_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
tree valtype;
tree func ATTRIBUTE_UNUSED;
{ {
enum machine_mode mode; enum machine_mode mode;
enum machine_mode hfa_mode; enum machine_mode hfa_mode;
...@@ -3980,10 +3807,7 @@ ia64_function_value (valtype, func) ...@@ -3980,10 +3807,7 @@ ia64_function_value (valtype, func)
We need to emit DTP-relative relocations. */ We need to emit DTP-relative relocations. */
void void
ia64_output_dwarf_dtprel (file, size, x) ia64_output_dwarf_dtprel (FILE *file, int size, rtx x)
FILE *file;
int size;
rtx x;
{ {
if (size != 8) if (size != 8)
abort (); abort ();
...@@ -3998,9 +3822,8 @@ ia64_output_dwarf_dtprel (file, size, x) ...@@ -3998,9 +3822,8 @@ ia64_output_dwarf_dtprel (file, size, x)
also call this from ia64_print_operand for memory addresses. */ also call this from ia64_print_operand for memory addresses. */
void void
ia64_print_operand_address (stream, address) ia64_print_operand_address (FILE * stream ATTRIBUTE_UNUSED,
FILE * stream ATTRIBUTE_UNUSED; rtx address ATTRIBUTE_UNUSED)
rtx address ATTRIBUTE_UNUSED;
{ {
} }
...@@ -4025,10 +3848,7 @@ ia64_print_operand_address (stream, address) ...@@ -4025,10 +3848,7 @@ ia64_print_operand_address (stream, address)
r Print register name, or constant 0 as r0. HP compatibility for r Print register name, or constant 0 as r0. HP compatibility for
Linux kernel. */ Linux kernel. */
void void
ia64_print_operand (file, x, code) ia64_print_operand (FILE * file, rtx x, int code)
FILE * file;
rtx x;
int code;
{ {
const char *str; const char *str;
...@@ -4187,7 +4007,7 @@ ia64_print_operand (file, x, code) ...@@ -4187,7 +4007,7 @@ ia64_print_operand (file, x, code)
case '+': case '+':
{ {
const char *which; const char *which;
/* For conditional branches, returns or calls, substitute /* For conditional branches, returns or calls, substitute
sptk, dptk, dpnt, or spnt for %s. */ sptk, dptk, dpnt, or spnt for %s. */
x = find_reg_note (current_output_insn, REG_BR_PROB, 0); x = find_reg_note (current_output_insn, REG_BR_PROB, 0);
...@@ -4266,10 +4086,7 @@ ia64_print_operand (file, x, code) ...@@ -4266,10 +4086,7 @@ ia64_print_operand (file, x, code)
/* ??? This is incomplete. */ /* ??? This is incomplete. */
static bool static bool
ia64_rtx_costs (x, code, outer_code, total) ia64_rtx_costs (rtx x, int code, int outer_code, int *total)
rtx x;
int code, outer_code;
int *total;
{ {
switch (code) switch (code)
{ {
...@@ -4343,9 +4160,8 @@ ia64_rtx_costs (x, code, outer_code, total) ...@@ -4343,9 +4160,8 @@ ia64_rtx_costs (x, code, outer_code, total)
one in class TO, using MODE. */ one in class TO, using MODE. */
int int
ia64_register_move_cost (mode, from, to) ia64_register_move_cost (enum machine_mode mode, enum reg_class from,
enum machine_mode mode; enum reg_class to)
enum reg_class from, to;
{ {
/* ADDL_REGS is the same as GR_REGS for movement purposes. */ /* ADDL_REGS is the same as GR_REGS for movement purposes. */
if (to == ADDL_REGS) if (to == ADDL_REGS)
...@@ -4417,10 +4233,8 @@ ia64_register_move_cost (mode, from, to) ...@@ -4417,10 +4233,8 @@ ia64_register_move_cost (mode, from, to)
is required. */ is required. */
enum reg_class enum reg_class
ia64_secondary_reload_class (class, mode, x) ia64_secondary_reload_class (enum reg_class class,
enum reg_class class; enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
enum machine_mode mode ATTRIBUTE_UNUSED;
rtx x;
{ {
int regno = -1; int regno = -1;
...@@ -4457,7 +4271,7 @@ ia64_secondary_reload_class (class, mode, x) ...@@ -4457,7 +4271,7 @@ ia64_secondary_reload_class (class, mode, x)
/* Need to go through general registers to get to other class regs. */ /* Need to go through general registers to get to other class regs. */
if (regno >= 0 && ! (FR_REGNO_P (regno) || GENERAL_REGNO_P (regno))) if (regno >= 0 && ! (FR_REGNO_P (regno) || GENERAL_REGNO_P (regno)))
return GR_REGS; return GR_REGS;
/* This can happen when a paradoxical subreg is an operand to the /* This can happen when a paradoxical subreg is an operand to the
muldi3 pattern. */ muldi3 pattern. */
/* ??? This shouldn't be necessary after instruction scheduling is /* ??? This shouldn't be necessary after instruction scheduling is
...@@ -4517,10 +4331,7 @@ ia64_secondary_reload_class (class, mode, x) ...@@ -4517,10 +4331,7 @@ ia64_secondary_reload_class (class, mode, x)
the Intel assembler does not support undefined externals. */ the Intel assembler does not support undefined externals. */
void void
ia64_asm_output_external (file, decl, name) ia64_asm_output_external (FILE *file, tree decl, const char *name)
FILE *file;
tree decl;
const char *name;
{ {
int save_referenced; int save_referenced;
...@@ -4562,8 +4373,7 @@ ia64_asm_output_external (file, decl, name) ...@@ -4562,8 +4373,7 @@ ia64_asm_output_external (file, decl, name)
/* Parse the -mfixed-range= option string. */ /* Parse the -mfixed-range= option string. */
static void static void
fix_range (const_str) fix_range (const char *const_str)
const char *const_str;
{ {
int i, first, last; int i, first, last;
char *str, *dash, *comma; char *str, *dash, *comma;
...@@ -4626,7 +4436,7 @@ fix_range (const_str) ...@@ -4626,7 +4436,7 @@ fix_range (const_str)
} }
static struct machine_function * static struct machine_function *
ia64_init_machine_status () ia64_init_machine_status (void)
{ {
return ggc_alloc_cleared (sizeof (struct machine_function)); return ggc_alloc_cleared (sizeof (struct machine_function));
} }
...@@ -4634,7 +4444,7 @@ ia64_init_machine_status () ...@@ -4634,7 +4444,7 @@ ia64_init_machine_status ()
/* Handle TARGET_OPTIONS switches. */ /* Handle TARGET_OPTIONS switches. */
void void
ia64_override_options () ia64_override_options (void)
{ {
static struct pta static struct pta
{ {
...@@ -4706,12 +4516,11 @@ ia64_override_options () ...@@ -4706,12 +4516,11 @@ ia64_override_options ()
real_format_for_mode[TFmode - QFmode] = &ieee_extended_intel_128_format; real_format_for_mode[TFmode - QFmode] = &ieee_extended_intel_128_format;
} }
static enum attr_itanium_class ia64_safe_itanium_class PARAMS((rtx)); static enum attr_itanium_class ia64_safe_itanium_class (rtx);
static enum attr_type ia64_safe_type PARAMS((rtx)); static enum attr_type ia64_safe_type (rtx);
static enum attr_itanium_class static enum attr_itanium_class
ia64_safe_itanium_class (insn) ia64_safe_itanium_class (rtx insn)
rtx insn;
{ {
if (recog_memoized (insn) >= 0) if (recog_memoized (insn) >= 0)
return get_attr_itanium_class (insn); return get_attr_itanium_class (insn);
...@@ -4720,8 +4529,7 @@ ia64_safe_itanium_class (insn) ...@@ -4720,8 +4529,7 @@ ia64_safe_itanium_class (insn)
} }
static enum attr_type static enum attr_type
ia64_safe_type (insn) ia64_safe_type (rtx insn)
rtx insn;
{ {
if (recog_memoized (insn) >= 0) if (recog_memoized (insn) >= 0)
return get_attr_type (insn); return get_attr_type (insn);
...@@ -4799,26 +4607,21 @@ struct reg_flags ...@@ -4799,26 +4607,21 @@ struct reg_flags
unsigned int is_sibcall : 1; /* Is this a sibling or normal call? */ unsigned int is_sibcall : 1; /* Is this a sibling or normal call? */
}; };
static void rws_update PARAMS ((struct reg_write_state *, int, static void rws_update (struct reg_write_state *, int, struct reg_flags, int);
struct reg_flags, int)); static int rws_access_regno (int, struct reg_flags, int);
static int rws_access_regno PARAMS ((int, struct reg_flags, int)); static int rws_access_reg (rtx, struct reg_flags, int);
static int rws_access_reg PARAMS ((rtx, struct reg_flags, int)); static void update_set_flags (rtx, struct reg_flags *, int *, rtx *);
static void update_set_flags PARAMS ((rtx, struct reg_flags *, int *, rtx *)); static int set_src_needs_barrier (rtx, struct reg_flags, int, rtx);
static int set_src_needs_barrier PARAMS ((rtx, struct reg_flags, int, rtx)); static int rtx_needs_barrier (rtx, struct reg_flags, int);
static int rtx_needs_barrier PARAMS ((rtx, struct reg_flags, int)); static void init_insn_group_barriers (void);
static void init_insn_group_barriers PARAMS ((void)); static int group_barrier_needed_p (rtx);
static int group_barrier_needed_p PARAMS ((rtx)); static int safe_group_barrier_needed_p (rtx);
static int safe_group_barrier_needed_p PARAMS ((rtx));
/* Update *RWS for REGNO, which is being written by the current instruction, /* Update *RWS for REGNO, which is being written by the current instruction,
with predicate PRED, and associated register flags in FLAGS. */ with predicate PRED, and associated register flags in FLAGS. */
static void static void
rws_update (rws, regno, flags, pred) rws_update (struct reg_write_state *rws, int regno, struct reg_flags flags, int pred)
struct reg_write_state *rws;
int regno;
struct reg_flags flags;
int pred;
{ {
if (pred) if (pred)
rws[regno].write_count++; rws[regno].write_count++;
...@@ -4836,10 +4639,7 @@ rws_update (rws, regno, flags, pred) ...@@ -4836,10 +4639,7 @@ rws_update (rws, regno, flags, pred)
a dependency with an earlier instruction in the same group. */ a dependency with an earlier instruction in the same group. */
static int static int
rws_access_regno (regno, flags, pred) rws_access_regno (int regno, struct reg_flags flags, int pred)
int regno;
struct reg_flags flags;
int pred;
{ {
int need_barrier = 0; int need_barrier = 0;
...@@ -4874,7 +4674,7 @@ rws_access_regno (regno, flags, pred) ...@@ -4874,7 +4674,7 @@ rws_access_regno (regno, flags, pred)
/* ??? This assumes that P and P+1 are always complementary /* ??? This assumes that P and P+1 are always complementary
predicates for P even. */ predicates for P even. */
if (flags.is_and && rws_sum[regno].written_by_and) if (flags.is_and && rws_sum[regno].written_by_and)
; ;
else if (flags.is_or && rws_sum[regno].written_by_or) else if (flags.is_or && rws_sum[regno].written_by_or)
; ;
else if ((rws_sum[regno].first_pred ^ 1) != pred) else if ((rws_sum[regno].first_pred ^ 1) != pred)
...@@ -4957,10 +4757,7 @@ rws_access_regno (regno, flags, pred) ...@@ -4957,10 +4757,7 @@ rws_access_regno (regno, flags, pred)
} }
static int static int
rws_access_reg (reg, flags, pred) rws_access_reg (rtx reg, struct reg_flags flags, int pred)
rtx reg;
struct reg_flags flags;
int pred;
{ {
int regno = REGNO (reg); int regno = REGNO (reg);
int n = HARD_REGNO_NREGS (REGNO (reg), GET_MODE (reg)); int n = HARD_REGNO_NREGS (REGNO (reg), GET_MODE (reg));
...@@ -4980,11 +4777,7 @@ rws_access_reg (reg, flags, pred) ...@@ -4980,11 +4777,7 @@ rws_access_reg (reg, flags, pred)
the condition, stored in *PFLAGS, *PPRED and *PCOND. */ the condition, stored in *PFLAGS, *PPRED and *PCOND. */
static void static void
update_set_flags (x, pflags, ppred, pcond) update_set_flags (rtx x, struct reg_flags *pflags, int *ppred, rtx *pcond)
rtx x;
struct reg_flags *pflags;
int *ppred;
rtx *pcond;
{ {
rtx src = SET_SRC (x); rtx src = SET_SRC (x);
...@@ -4998,7 +4791,7 @@ update_set_flags (x, pflags, ppred, pcond) ...@@ -4998,7 +4791,7 @@ update_set_flags (x, pflags, ppred, pcond)
case IF_THEN_ELSE: case IF_THEN_ELSE:
if (SET_DEST (x) == pc_rtx) if (SET_DEST (x) == pc_rtx)
/* X is a conditional branch. */ /* X is a conditional branch. */
return; return;
else else
{ {
int is_complemented = 0; int is_complemented = 0;
...@@ -5061,13 +4854,9 @@ update_set_flags (x, pflags, ppred, pcond) ...@@ -5061,13 +4854,9 @@ update_set_flags (x, pflags, ppred, pcond)
source of a given SET rtx found in X needs a barrier. FLAGS and PRED source of a given SET rtx found in X needs a barrier. FLAGS and PRED
are as in rtx_needs_barrier. COND is an rtx that holds the condition are as in rtx_needs_barrier. COND is an rtx that holds the condition
for this insn. */ for this insn. */
static int static int
set_src_needs_barrier (x, flags, pred, cond) set_src_needs_barrier (rtx x, struct reg_flags flags, int pred, rtx cond)
rtx x;
struct reg_flags flags;
int pred;
rtx cond;
{ {
int need_barrier = 0; int need_barrier = 0;
rtx dst; rtx dst;
...@@ -5107,10 +4896,7 @@ set_src_needs_barrier (x, flags, pred, cond) ...@@ -5107,10 +4896,7 @@ set_src_needs_barrier (x, flags, pred, cond)
in the same group. */ in the same group. */
static int static int
rtx_needs_barrier (x, flags, pred) rtx_needs_barrier (rtx x, struct reg_flags flags, int pred)
rtx x;
struct reg_flags flags;
int pred;
{ {
int i, j; int i, j;
int is_complemented = 0; int is_complemented = 0;
...@@ -5126,7 +4912,7 @@ rtx_needs_barrier (x, flags, pred) ...@@ -5126,7 +4912,7 @@ rtx_needs_barrier (x, flags, pred)
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
case SET: case SET:
update_set_flags (x, &new_flags, &pred, &cond); update_set_flags (x, &new_flags, &pred, &cond);
need_barrier = set_src_needs_barrier (x, new_flags, pred, cond); need_barrier = set_src_needs_barrier (x, new_flags, pred, cond);
if (GET_CODE (SET_SRC (x)) != CALL) if (GET_CODE (SET_SRC (x)) != CALL)
...@@ -5329,7 +5115,7 @@ rtx_needs_barrier (x, flags, pred) ...@@ -5329,7 +5115,7 @@ rtx_needs_barrier (x, flags, pred)
new_flags, pred); new_flags, pred);
break; break;
} }
case UNSPEC_FR_SPILL: case UNSPEC_FR_SPILL:
case UNSPEC_FR_RESTORE: case UNSPEC_FR_RESTORE:
case UNSPEC_GETF_EXP: case UNSPEC_GETF_EXP:
...@@ -5431,7 +5217,7 @@ rtx_needs_barrier (x, flags, pred) ...@@ -5431,7 +5217,7 @@ rtx_needs_barrier (x, flags, pred)
sequence of insns. */ sequence of insns. */
static void static void
init_insn_group_barriers () init_insn_group_barriers (void)
{ {
memset (rws_sum, 0, sizeof (rws_sum)); memset (rws_sum, 0, sizeof (rws_sum));
first_instruction = 1; first_instruction = 1;
...@@ -5442,8 +5228,7 @@ init_insn_group_barriers () ...@@ -5442,8 +5228,7 @@ init_insn_group_barriers ()
Return nonzero if so. */ Return nonzero if so. */
static int static int
group_barrier_needed_p (insn) group_barrier_needed_p (rtx insn)
rtx insn;
{ {
rtx pat; rtx pat;
int need_barrier = 0; int need_barrier = 0;
...@@ -5554,8 +5339,7 @@ group_barrier_needed_p (insn) ...@@ -5554,8 +5339,7 @@ group_barrier_needed_p (insn)
/* Like group_barrier_needed_p, but do not clobber the current state. */ /* Like group_barrier_needed_p, but do not clobber the current state. */
static int static int
safe_group_barrier_needed_p (insn) safe_group_barrier_needed_p (rtx insn)
rtx insn;
{ {
struct reg_write_state rws_saved[NUM_REGS]; struct reg_write_state rws_saved[NUM_REGS];
int saved_first_instruction; int saved_first_instruction;
...@@ -5580,8 +5364,7 @@ safe_group_barrier_needed_p (insn) ...@@ -5580,8 +5364,7 @@ safe_group_barrier_needed_p (insn)
invisible to the scheduler. */ invisible to the scheduler. */
static void static void
emit_insn_group_barriers (dump) emit_insn_group_barriers (FILE *dump)
FILE *dump;
{ {
rtx insn; rtx insn;
rtx last_label = 0; rtx last_label = 0;
...@@ -5637,8 +5420,7 @@ emit_insn_group_barriers (dump) ...@@ -5637,8 +5420,7 @@ emit_insn_group_barriers (dump)
This function has to emit all necessary group barriers. */ This function has to emit all necessary group barriers. */
static void static void
emit_all_insn_group_barriers (dump) emit_all_insn_group_barriers (FILE *dump ATTRIBUTE_UNUSED)
FILE *dump ATTRIBUTE_UNUSED;
{ {
rtx insn; rtx insn;
...@@ -5675,9 +5457,9 @@ emit_all_insn_group_barriers (dump) ...@@ -5675,9 +5457,9 @@ emit_all_insn_group_barriers (dump)
} }
static int errata_find_address_regs PARAMS ((rtx *, void *)); static int errata_find_address_regs (rtx *, void *);
static void errata_emit_nops PARAMS ((rtx)); static void errata_emit_nops (rtx);
static void fixup_errata PARAMS ((void)); static void fixup_errata (void);
/* This structure is used to track some details about the previous insns /* This structure is used to track some details about the previous insns
groups so we can determine if it may be necessary to insert NOPs to groups so we can determine if it may be necessary to insert NOPs to
...@@ -5695,9 +5477,7 @@ static int group_idx; ...@@ -5695,9 +5477,7 @@ static int group_idx;
conditionally set in the previous group is used as an address register. conditionally set in the previous group is used as an address register.
It ensures that for_each_rtx returns 1 in that case. */ It ensures that for_each_rtx returns 1 in that case. */
static int static int
errata_find_address_regs (xp, data) errata_find_address_regs (rtx *xp, void *data ATTRIBUTE_UNUSED)
rtx *xp;
void *data ATTRIBUTE_UNUSED;
{ {
rtx x = *xp; rtx x = *xp;
if (GET_CODE (x) != MEM) if (GET_CODE (x) != MEM)
...@@ -5720,8 +5500,7 @@ errata_find_address_regs (xp, data) ...@@ -5720,8 +5500,7 @@ errata_find_address_regs (xp, data)
last_group and emits additional NOPs if necessary to work around last_group and emits additional NOPs if necessary to work around
an Itanium A/B step erratum. */ an Itanium A/B step erratum. */
static void static void
errata_emit_nops (insn) errata_emit_nops (rtx insn)
rtx insn;
{ {
struct group *this_group = last_group + group_idx; struct group *this_group = last_group + group_idx;
struct group *prev_group = last_group + (group_idx ^ 1); struct group *prev_group = last_group + (group_idx ^ 1);
...@@ -5794,7 +5573,7 @@ errata_emit_nops (insn) ...@@ -5794,7 +5573,7 @@ errata_emit_nops (insn)
/* Emit extra nops if they are required to work around hardware errata. */ /* Emit extra nops if they are required to work around hardware errata. */
static void static void
fixup_errata () fixup_errata (void)
{ {
rtx insn; rtx insn;
...@@ -5903,14 +5682,13 @@ static int *clocks; ...@@ -5903,14 +5682,13 @@ static int *clocks;
static int *add_cycles; static int *add_cycles;
static rtx ia64_single_set PARAMS ((rtx)); static rtx ia64_single_set (rtx);
static void ia64_emit_insn_before PARAMS ((rtx, rtx)); static void ia64_emit_insn_before (rtx, rtx);
/* Map a bundle number to its pseudo-op. */ /* Map a bundle number to its pseudo-op. */
const char * const char *
get_bundle_name (b) get_bundle_name (int b)
int b;
{ {
return bundle_name[b]; return bundle_name[b];
} }
...@@ -5919,7 +5697,7 @@ get_bundle_name (b) ...@@ -5919,7 +5697,7 @@ get_bundle_name (b)
/* Return the maximum number of instructions a cpu can issue. */ /* Return the maximum number of instructions a cpu can issue. */
static int static int
ia64_issue_rate () ia64_issue_rate (void)
{ {
return 6; return 6;
} }
...@@ -5927,8 +5705,7 @@ ia64_issue_rate () ...@@ -5927,8 +5705,7 @@ ia64_issue_rate ()
/* Helper function - like single_set, but look inside COND_EXEC. */ /* Helper function - like single_set, but look inside COND_EXEC. */
static rtx static rtx
ia64_single_set (insn) ia64_single_set (rtx insn)
rtx insn;
{ {
rtx x = PATTERN (insn), ret; rtx x = PATTERN (insn), ret;
if (GET_CODE (x) == COND_EXEC) if (GET_CODE (x) == COND_EXEC)
...@@ -5958,9 +5735,7 @@ ia64_single_set (insn) ...@@ -5958,9 +5735,7 @@ ia64_single_set (insn)
a dependency LINK or INSN on DEP_INSN. COST is the current cost. */ a dependency LINK or INSN on DEP_INSN. COST is the current cost. */
static int static int
ia64_adjust_cost (insn, link, dep_insn, cost) ia64_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
rtx insn, link, dep_insn;
int cost;
{ {
enum attr_itanium_class dep_class; enum attr_itanium_class dep_class;
enum attr_itanium_class insn_class; enum attr_itanium_class insn_class;
...@@ -5981,8 +5756,7 @@ ia64_adjust_cost (insn, link, dep_insn, cost) ...@@ -5981,8 +5756,7 @@ ia64_adjust_cost (insn, link, dep_insn, cost)
??? When cycle display notes are implemented, update this. */ ??? When cycle display notes are implemented, update this. */
static void static void
ia64_emit_insn_before (insn, before) ia64_emit_insn_before (rtx insn, rtx before)
rtx insn, before;
{ {
emit_insn_before (insn, before); emit_insn_before (insn, before);
} }
...@@ -5993,11 +5767,10 @@ ia64_emit_insn_before (insn, before) ...@@ -5993,11 +5767,10 @@ ia64_emit_insn_before (insn, before)
`ia64_produce_address_p' and the DFA descriptions). */ `ia64_produce_address_p' and the DFA descriptions). */
static void static void
ia64_dependencies_evaluation_hook (head, tail) ia64_dependencies_evaluation_hook (rtx head, rtx tail)
rtx head, tail;
{ {
rtx insn, link, next, next_tail; rtx insn, link, next, next_tail;
next_tail = NEXT_INSN (tail); next_tail = NEXT_INSN (tail);
for (insn = head; insn != next_tail; insn = NEXT_INSN (insn)) for (insn = head; insn != next_tail; insn = NEXT_INSN (insn))
if (INSN_P (insn)) if (INSN_P (insn))
...@@ -6026,14 +5799,13 @@ ia64_dependencies_evaluation_hook (head, tail) ...@@ -6026,14 +5799,13 @@ ia64_dependencies_evaluation_hook (head, tail)
/* We're beginning a new block. Initialize data structures as necessary. */ /* We're beginning a new block. Initialize data structures as necessary. */
static void static void
ia64_sched_init (dump, sched_verbose, max_ready) ia64_sched_init (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED,
int sched_verbose ATTRIBUTE_UNUSED; int max_ready ATTRIBUTE_UNUSED)
int max_ready ATTRIBUTE_UNUSED;
{ {
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
rtx insn; rtx insn;
if (reload_completed) if (reload_completed)
for (insn = NEXT_INSN (current_sched_info->prev_head); for (insn = NEXT_INSN (current_sched_info->prev_head);
insn != current_sched_info->next_tail; insn != current_sched_info->next_tail;
...@@ -6049,14 +5821,9 @@ ia64_sched_init (dump, sched_verbose, max_ready) ...@@ -6049,14 +5821,9 @@ ia64_sched_init (dump, sched_verbose, max_ready)
Override the default sort algorithm to better slot instructions. */ Override the default sort algorithm to better slot instructions. */
static int static int
ia64_dfa_sched_reorder (dump, sched_verbose, ready, pn_ready, ia64_dfa_sched_reorder (FILE *dump, int sched_verbose, rtx *ready,
clock_var, reorder_type) int *pn_ready, int clock_var ATTRIBUTE_UNUSED,
FILE *dump; int reorder_type)
int sched_verbose;
rtx *ready;
int *pn_ready;
int clock_var ATTRIBUTE_UNUSED;
int reorder_type;
{ {
int n_asms; int n_asms;
int n_ready = *pn_ready; int n_ready = *pn_ready;
...@@ -6113,7 +5880,7 @@ ia64_dfa_sched_reorder (dump, sched_verbose, ready, pn_ready, ...@@ -6113,7 +5880,7 @@ ia64_dfa_sched_reorder (dump, sched_verbose, ready, pn_ready,
for (insnp = ready; insnp < e_ready; insnp++) for (insnp = ready; insnp < e_ready; insnp++)
if (safe_group_barrier_needed_p (*insnp)) if (safe_group_barrier_needed_p (*insnp))
nr_need_stop++; nr_need_stop++;
if (reorder_type == 1 && n_ready == nr_need_stop) if (reorder_type == 1 && n_ready == nr_need_stop)
return 0; return 0;
if (reorder_type == 0) if (reorder_type == 0)
...@@ -6142,12 +5909,8 @@ ia64_dfa_sched_reorder (dump, sched_verbose, ready, pn_ready, ...@@ -6142,12 +5909,8 @@ ia64_dfa_sched_reorder (dump, sched_verbose, ready, pn_ready,
the default sort algorithm to better slot instructions. */ the default sort algorithm to better slot instructions. */
static int static int
ia64_sched_reorder (dump, sched_verbose, ready, pn_ready, clock_var) ia64_sched_reorder (FILE *dump, int sched_verbose, rtx *ready, int *pn_ready,
FILE *dump; int clock_var)
int sched_verbose;
rtx *ready;
int *pn_ready;
int clock_var;
{ {
return ia64_dfa_sched_reorder (dump, sched_verbose, ready, return ia64_dfa_sched_reorder (dump, sched_verbose, ready,
pn_ready, clock_var, 0); pn_ready, clock_var, 0);
...@@ -6157,12 +5920,9 @@ ia64_sched_reorder (dump, sched_verbose, ready, pn_ready, clock_var) ...@@ -6157,12 +5920,9 @@ ia64_sched_reorder (dump, sched_verbose, ready, pn_ready, clock_var)
Override the default sort algorithm to better slot instructions. */ Override the default sort algorithm to better slot instructions. */
static int static int
ia64_sched_reorder2 (dump, sched_verbose, ready, pn_ready, clock_var) ia64_sched_reorder2 (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED, rtx *ready,
int sched_verbose ATTRIBUTE_UNUSED; int *pn_ready, int clock_var)
rtx *ready;
int *pn_ready;
int clock_var;
{ {
if (ia64_tune == PROCESSOR_ITANIUM && reload_completed && last_scheduled_insn) if (ia64_tune == PROCESSOR_ITANIUM && reload_completed && last_scheduled_insn)
clocks [INSN_UID (last_scheduled_insn)] = clock_var; clocks [INSN_UID (last_scheduled_insn)] = clock_var;
...@@ -6174,11 +5934,10 @@ ia64_sched_reorder2 (dump, sched_verbose, ready, pn_ready, clock_var) ...@@ -6174,11 +5934,10 @@ ia64_sched_reorder2 (dump, sched_verbose, ready, pn_ready, clock_var)
ready queue that can be issued this cycle. */ ready queue that can be issued this cycle. */
static int static int
ia64_variable_issue (dump, sched_verbose, insn, can_issue_more) ia64_variable_issue (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED,
int sched_verbose ATTRIBUTE_UNUSED; rtx insn ATTRIBUTE_UNUSED,
rtx insn ATTRIBUTE_UNUSED; int can_issue_more ATTRIBUTE_UNUSED)
int can_issue_more ATTRIBUTE_UNUSED;
{ {
last_scheduled_insn = insn; last_scheduled_insn = insn;
memcpy (prev_cycle_state, curr_state, dfa_state_size); memcpy (prev_cycle_state, curr_state, dfa_state_size);
...@@ -6198,8 +5957,7 @@ ia64_variable_issue (dump, sched_verbose, insn, can_issue_more) ...@@ -6198,8 +5957,7 @@ ia64_variable_issue (dump, sched_verbose, insn, can_issue_more)
can be chosen. */ can be chosen. */
static int static int
ia64_first_cycle_multipass_dfa_lookahead_guard (insn) ia64_first_cycle_multipass_dfa_lookahead_guard (rtx insn)
rtx insn;
{ {
if (insn == NULL_RTX || !INSN_P (insn)) if (insn == NULL_RTX || !INSN_P (insn))
abort (); abort ();
...@@ -6218,12 +5976,8 @@ static rtx dfa_pre_cycle_insn; ...@@ -6218,12 +5976,8 @@ static rtx dfa_pre_cycle_insn;
the ready queue on the next clock start. */ the ready queue on the next clock start. */
static int static int
ia64_dfa_new_cycle (dump, verbose, insn, last_clock, clock, sort_p) ia64_dfa_new_cycle (FILE *dump, int verbose, rtx insn, int last_clock,
FILE *dump; int clock, int *sort_p)
int verbose;
rtx insn;
int last_clock, clock;
int *sort_p;
{ {
int setup_clocks_p = FALSE; int setup_clocks_p = FALSE;
...@@ -6262,18 +6016,18 @@ ia64_dfa_new_cycle (dump, verbose, insn, last_clock, clock, sort_p) ...@@ -6262,18 +6016,18 @@ ia64_dfa_new_cycle (dump, verbose, insn, last_clock, clock, sort_p)
if (setup_clocks_p && ia64_tune == PROCESSOR_ITANIUM) if (setup_clocks_p && ia64_tune == PROCESSOR_ITANIUM)
{ {
enum attr_itanium_class c = ia64_safe_itanium_class (insn); enum attr_itanium_class c = ia64_safe_itanium_class (insn);
if (c != ITANIUM_CLASS_MMMUL && c != ITANIUM_CLASS_MMSHF) if (c != ITANIUM_CLASS_MMMUL && c != ITANIUM_CLASS_MMSHF)
{ {
rtx link; rtx link;
int d = -1; int d = -1;
for (link = LOG_LINKS (insn); link; link = XEXP (link, 1)) for (link = LOG_LINKS (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == 0) if (REG_NOTE_KIND (link) == 0)
{ {
enum attr_itanium_class dep_class; enum attr_itanium_class dep_class;
rtx dep_insn = XEXP (link, 0); rtx dep_insn = XEXP (link, 0);
dep_class = ia64_safe_itanium_class (dep_insn); dep_class = ia64_safe_itanium_class (dep_insn);
if ((dep_class == ITANIUM_CLASS_MMMUL if ((dep_class == ITANIUM_CLASS_MMMUL
|| dep_class == ITANIUM_CLASS_MMSHF) || dep_class == ITANIUM_CLASS_MMSHF)
...@@ -6339,7 +6093,7 @@ static struct bundle_state *free_bundle_state_chain; ...@@ -6339,7 +6093,7 @@ static struct bundle_state *free_bundle_state_chain;
/* The following function returns a free bundle state. */ /* The following function returns a free bundle state. */
static struct bundle_state * static struct bundle_state *
get_free_bundle_state () get_free_bundle_state (void)
{ {
struct bundle_state *result; struct bundle_state *result;
...@@ -6357,14 +6111,13 @@ get_free_bundle_state () ...@@ -6357,14 +6111,13 @@ get_free_bundle_state ()
} }
result->unique_num = bundle_states_num++; result->unique_num = bundle_states_num++;
return result; return result;
} }
/* The following function frees given bundle state. */ /* The following function frees given bundle state. */
static void static void
free_bundle_state (state) free_bundle_state (struct bundle_state *state)
struct bundle_state *state;
{ {
state->next = free_bundle_state_chain; state->next = free_bundle_state_chain;
free_bundle_state_chain = state; free_bundle_state_chain = state;
...@@ -6373,7 +6126,7 @@ free_bundle_state (state) ...@@ -6373,7 +6126,7 @@ free_bundle_state (state)
/* Start work with abstract data `bundle states'. */ /* Start work with abstract data `bundle states'. */
static void static void
initiate_bundle_states () initiate_bundle_states (void)
{ {
bundle_states_num = 0; bundle_states_num = 0;
free_bundle_state_chain = NULL; free_bundle_state_chain = NULL;
...@@ -6383,7 +6136,7 @@ initiate_bundle_states () ...@@ -6383,7 +6136,7 @@ initiate_bundle_states ()
/* Finish work with abstract data `bundle states'. */ /* Finish work with abstract data `bundle states'. */
static void static void
finish_bundle_states () finish_bundle_states (void)
{ {
struct bundle_state *curr_state, *next_state; struct bundle_state *curr_state, *next_state;
...@@ -6405,8 +6158,7 @@ static htab_t bundle_state_table; ...@@ -6405,8 +6158,7 @@ static htab_t bundle_state_table;
/* The function returns hash of BUNDLE_STATE. */ /* The function returns hash of BUNDLE_STATE. */
static unsigned static unsigned
bundle_state_hash (bundle_state) bundle_state_hash (const void *bundle_state)
const void *bundle_state;
{ {
const struct bundle_state *state = (struct bundle_state *) bundle_state; const struct bundle_state *state = (struct bundle_state *) bundle_state;
unsigned result, i; unsigned result, i;
...@@ -6420,9 +6172,7 @@ bundle_state_hash (bundle_state) ...@@ -6420,9 +6172,7 @@ bundle_state_hash (bundle_state)
/* The function returns nonzero if the bundle state keys are equal. */ /* The function returns nonzero if the bundle state keys are equal. */
static int static int
bundle_state_eq_p (bundle_state_1, bundle_state_2) bundle_state_eq_p (const void *bundle_state_1, const void *bundle_state_2)
const void *bundle_state_1;
const void *bundle_state_2;
{ {
const struct bundle_state * state1 = (struct bundle_state *) bundle_state_1; const struct bundle_state * state1 = (struct bundle_state *) bundle_state_1;
const struct bundle_state * state2 = (struct bundle_state *) bundle_state_2; const struct bundle_state * state2 = (struct bundle_state *) bundle_state_2;
...@@ -6437,8 +6187,7 @@ bundle_state_eq_p (bundle_state_1, bundle_state_2) ...@@ -6437,8 +6187,7 @@ bundle_state_eq_p (bundle_state_1, bundle_state_2)
table. The table contains the best bundle state with given key. */ table. The table contains the best bundle state with given key. */
static int static int
insert_bundle_state (bundle_state) insert_bundle_state (struct bundle_state *bundle_state)
struct bundle_state *bundle_state;
{ {
void **entry_ptr; void **entry_ptr;
...@@ -6460,7 +6209,7 @@ insert_bundle_state (bundle_state) ...@@ -6460,7 +6209,7 @@ insert_bundle_state (bundle_state)
&& ((struct bundle_state *) && ((struct bundle_state *)
*entry_ptr)->branch_deviation *entry_ptr)->branch_deviation
> bundle_state->branch_deviation)))) > bundle_state->branch_deviation))))
{ {
struct bundle_state temp; struct bundle_state temp;
...@@ -6475,7 +6224,7 @@ insert_bundle_state (bundle_state) ...@@ -6475,7 +6224,7 @@ insert_bundle_state (bundle_state)
/* Start work with the hash table. */ /* Start work with the hash table. */
static void static void
initiate_bundle_state_table () initiate_bundle_state_table (void)
{ {
bundle_state_table = htab_create (50, bundle_state_hash, bundle_state_eq_p, bundle_state_table = htab_create (50, bundle_state_hash, bundle_state_eq_p,
(htab_del) 0); (htab_del) 0);
...@@ -6484,7 +6233,7 @@ initiate_bundle_state_table () ...@@ -6484,7 +6233,7 @@ initiate_bundle_state_table ()
/* Finish work with the hash table. */ /* Finish work with the hash table. */
static void static void
finish_bundle_state_table () finish_bundle_state_table (void)
{ {
htab_delete (bundle_state_table); htab_delete (bundle_state_table);
} }
...@@ -6501,9 +6250,7 @@ static rtx ia64_nop; ...@@ -6501,9 +6250,7 @@ static rtx ia64_nop;
function returns FALSE and frees the current state. */ function returns FALSE and frees the current state. */
static int static int
try_issue_nops (curr_state, nops_num) try_issue_nops (struct bundle_state *curr_state, int nops_num)
struct bundle_state *curr_state;
int nops_num;
{ {
int i; int i;
...@@ -6521,9 +6268,7 @@ try_issue_nops (curr_state, nops_num) ...@@ -6521,9 +6268,7 @@ try_issue_nops (curr_state, nops_num)
function returns FALSE and frees the current state. */ function returns FALSE and frees the current state. */
static int static int
try_issue_insn (curr_state, insn) try_issue_insn (struct bundle_state *curr_state, rtx insn)
struct bundle_state *curr_state;
rtx insn;
{ {
if (insn && state_transition (curr_state->dfa_state, insn) >= 0) if (insn && state_transition (curr_state->dfa_state, insn) >= 0)
{ {
...@@ -6541,12 +6286,8 @@ try_issue_insn (curr_state, insn) ...@@ -6541,12 +6286,8 @@ try_issue_insn (curr_state, insn)
insert into the hash table and into `index_to_bundle_states'. */ insert into the hash table and into `index_to_bundle_states'. */
static void static void
issue_nops_and_insn (originator, before_nops_num, insn, try_bundle_end_p, issue_nops_and_insn (struct bundle_state *originator, int before_nops_num,
only_bundle_end_p) rtx insn, int try_bundle_end_p, int only_bundle_end_p)
struct bundle_state *originator;
int before_nops_num;
rtx insn;
int try_bundle_end_p, only_bundle_end_p;
{ {
struct bundle_state *curr_state; struct bundle_state *curr_state;
...@@ -6652,8 +6393,7 @@ issue_nops_and_insn (originator, before_nops_num, insn, try_bundle_end_p, ...@@ -6652,8 +6393,7 @@ issue_nops_and_insn (originator, before_nops_num, insn, try_bundle_end_p,
for given STATE. */ for given STATE. */
static int static int
get_max_pos (state) get_max_pos (state_t state)
state_t state;
{ {
if (cpu_unit_reservation_p (state, pos_6)) if (cpu_unit_reservation_p (state, pos_6))
return 6; return 6;
...@@ -6676,9 +6416,7 @@ get_max_pos (state) ...@@ -6676,9 +6416,7 @@ get_max_pos (state)
position equal to 3 or 6. */ position equal to 3 or 6. */
static int static int
get_template (state, pos) get_template (state_t state, int pos)
state_t state;
int pos;
{ {
switch (pos) switch (pos)
{ {
...@@ -6737,8 +6475,7 @@ get_template (state, pos) ...@@ -6737,8 +6475,7 @@ get_template (state, pos)
followed by INSN and before TAIL. */ followed by INSN and before TAIL. */
static rtx static rtx
get_next_important_insn (insn, tail) get_next_important_insn (rtx insn, rtx tail)
rtx insn, tail;
{ {
for (; insn && insn != tail; insn = NEXT_INSN (insn)) for (; insn && insn != tail; insn = NEXT_INSN (insn))
if (INSN_P (insn) if (INSN_P (insn)
...@@ -6758,10 +6495,7 @@ get_next_important_insn (insn, tail) ...@@ -6758,10 +6495,7 @@ get_next_important_insn (insn, tail)
scheduling. */ scheduling. */
static void static void
bundling (dump, verbose, prev_head_insn, tail) bundling (FILE *dump, int verbose, rtx prev_head_insn, rtx tail)
FILE *dump;
int verbose;
rtx prev_head_insn, tail;
{ {
struct bundle_state *curr_state, *next_state, *best_state; struct bundle_state *curr_state, *next_state, *best_state;
rtx insn, next_insn; rtx insn, next_insn;
...@@ -6876,7 +6610,7 @@ bundling (dump, verbose, prev_head_insn, tail) ...@@ -6876,7 +6610,7 @@ bundling (dump, verbose, prev_head_insn, tail)
unsigned short two_automaton_state; unsigned short two_automaton_state;
unsigned short twob_automaton_state; unsigned short twob_automaton_state;
}; };
fprintf fprintf
(dump, (dump,
"// Bundle state %d (orig %d, cost %d, nops %d/%d, insns %d, branch %d, state %d) for %d\n", "// Bundle state %d (orig %d, cost %d, nops %d/%d, insns %d, branch %d, state %d) for %d\n",
...@@ -6929,7 +6663,7 @@ bundling (dump, verbose, prev_head_insn, tail) ...@@ -6929,7 +6663,7 @@ bundling (dump, verbose, prev_head_insn, tail)
unsigned short two_automaton_state; unsigned short two_automaton_state;
unsigned short twob_automaton_state; unsigned short twob_automaton_state;
}; };
fprintf fprintf
(dump, (dump,
"// Best %d (orig %d, cost %d, nops %d/%d, insns %d, branch %d, state %d) for %d\n", "// Best %d (orig %d, cost %d, nops %d/%d, insns %d, branch %d, state %d) for %d\n",
...@@ -7042,7 +6776,7 @@ bundling (dump, verbose, prev_head_insn, tail) ...@@ -7042,7 +6776,7 @@ bundling (dump, verbose, prev_head_insn, tail)
rtx last; rtx last;
int i, j, n; int i, j, n;
int pred_stop_p; int pred_stop_p;
last = prev_active_insn (insn); last = prev_active_insn (insn);
pred_stop_p = recog_memoized (last) == CODE_FOR_insn_group_barrier; pred_stop_p = recog_memoized (last) == CODE_FOR_insn_group_barrier;
if (pred_stop_p) if (pred_stop_p)
...@@ -7106,9 +6840,7 @@ bundling (dump, verbose, prev_head_insn, tail) ...@@ -7106,9 +6840,7 @@ bundling (dump, verbose, prev_head_insn, tail)
EBB. After reload, it inserts stop bits and does insn bundling. */ EBB. After reload, it inserts stop bits and does insn bundling. */
static void static void
ia64_sched_finish (dump, sched_verbose) ia64_sched_finish (FILE *dump, int sched_verbose)
FILE *dump;
int sched_verbose;
{ {
if (sched_verbose) if (sched_verbose)
fprintf (dump, "// Finishing schedule.\n"); fprintf (dump, "// Finishing schedule.\n");
...@@ -7123,7 +6855,7 @@ ia64_sched_finish (dump, sched_verbose) ...@@ -7123,7 +6855,7 @@ ia64_sched_finish (dump, sched_verbose)
fprintf (dump, "// finishing %d-%d\n", fprintf (dump, "// finishing %d-%d\n",
INSN_UID (NEXT_INSN (current_sched_info->prev_head)), INSN_UID (NEXT_INSN (current_sched_info->prev_head)),
INSN_UID (PREV_INSN (current_sched_info->next_tail))); INSN_UID (PREV_INSN (current_sched_info->next_tail)));
return; return;
} }
} }
...@@ -7131,8 +6863,7 @@ ia64_sched_finish (dump, sched_verbose) ...@@ -7131,8 +6863,7 @@ ia64_sched_finish (dump, sched_verbose)
/* The following function inserts stop bits in scheduled BB or EBB. */ /* The following function inserts stop bits in scheduled BB or EBB. */
static void static void
final_emit_insn_group_barriers (dump) final_emit_insn_group_barriers (FILE *dump ATTRIBUTE_UNUSED)
FILE *dump ATTRIBUTE_UNUSED;
{ {
rtx insn; rtx insn;
int need_barrier_p = 0; int need_barrier_p = 0;
...@@ -7173,7 +6904,7 @@ final_emit_insn_group_barriers (dump) ...@@ -7173,7 +6904,7 @@ final_emit_insn_group_barriers (dump)
if (TARGET_EARLY_STOP_BITS) if (TARGET_EARLY_STOP_BITS)
{ {
rtx last; rtx last;
for (last = insn; for (last = insn;
last != current_sched_info->prev_head; last != current_sched_info->prev_head;
last = PREV_INSN (last)) last = PREV_INSN (last))
...@@ -7218,7 +6949,7 @@ final_emit_insn_group_barriers (dump) ...@@ -7218,7 +6949,7 @@ final_emit_insn_group_barriers (dump)
insn scheduler. */ insn scheduler. */
static int static int
ia64_use_dfa_pipeline_interface () ia64_use_dfa_pipeline_interface (void)
{ {
return 1; return 1;
} }
...@@ -7227,7 +6958,7 @@ ia64_use_dfa_pipeline_interface () ...@@ -7227,7 +6958,7 @@ ia64_use_dfa_pipeline_interface ()
insn scheduler. */ insn scheduler. */
static int static int
ia64_first_cycle_multipass_dfa_lookahead () ia64_first_cycle_multipass_dfa_lookahead (void)
{ {
return (reload_completed ? 6 : 4); return (reload_completed ? 6 : 4);
} }
...@@ -7235,7 +6966,7 @@ ia64_first_cycle_multipass_dfa_lookahead () ...@@ -7235,7 +6966,7 @@ ia64_first_cycle_multipass_dfa_lookahead ()
/* The following function initiates variable `dfa_pre_cycle_insn'. */ /* The following function initiates variable `dfa_pre_cycle_insn'. */
static void static void
ia64_init_dfa_pre_cycle_insn () ia64_init_dfa_pre_cycle_insn (void)
{ {
if (temp_dfa_state == NULL) if (temp_dfa_state == NULL)
{ {
...@@ -7255,7 +6986,7 @@ ia64_init_dfa_pre_cycle_insn () ...@@ -7255,7 +6986,7 @@ ia64_init_dfa_pre_cycle_insn ()
used by the DFA insn scheduler. */ used by the DFA insn scheduler. */
static rtx static rtx
ia64_dfa_pre_cycle_insn () ia64_dfa_pre_cycle_insn (void)
{ {
return dfa_pre_cycle_insn; return dfa_pre_cycle_insn;
} }
...@@ -7264,9 +6995,7 @@ ia64_dfa_pre_cycle_insn () ...@@ -7264,9 +6995,7 @@ ia64_dfa_pre_cycle_insn ()
ld) produces address for CONSUMER (of type st or stf). */ ld) produces address for CONSUMER (of type st or stf). */
int int
ia64_st_address_bypass_p (producer, consumer) ia64_st_address_bypass_p (rtx producer, rtx consumer)
rtx producer;
rtx consumer;
{ {
rtx dest, reg, mem; rtx dest, reg, mem;
...@@ -7289,9 +7018,7 @@ ia64_st_address_bypass_p (producer, consumer) ...@@ -7289,9 +7018,7 @@ ia64_st_address_bypass_p (producer, consumer)
ld) produces address for CONSUMER (of type ld or fld). */ ld) produces address for CONSUMER (of type ld or fld). */
int int
ia64_ld_address_bypass_p (producer, consumer) ia64_ld_address_bypass_p (rtx producer, rtx consumer)
rtx producer;
rtx consumer;
{ {
rtx dest, src, reg, mem; rtx dest, src, reg, mem;
...@@ -7323,8 +7050,7 @@ ia64_ld_address_bypass_p (producer, consumer) ...@@ -7323,8 +7050,7 @@ ia64_ld_address_bypass_p (producer, consumer)
decreases its latency time. */ decreases its latency time. */
int int
ia64_produce_address_p (insn) ia64_produce_address_p (rtx insn)
rtx insn;
{ {
return insn->call; return insn->call;
} }
...@@ -7336,7 +7062,7 @@ ia64_produce_address_p (insn) ...@@ -7336,7 +7062,7 @@ ia64_produce_address_p (insn)
straight-line code. */ straight-line code. */
static void static void
emit_predicate_relation_info () emit_predicate_relation_info (void)
{ {
basic_block bb; basic_block bb;
...@@ -7370,7 +7096,7 @@ emit_predicate_relation_info () ...@@ -7370,7 +7096,7 @@ emit_predicate_relation_info ()
FOR_EACH_BB_REVERSE (bb) FOR_EACH_BB_REVERSE (bb)
{ {
rtx insn = bb->head; rtx insn = bb->head;
while (1) while (1)
{ {
if (GET_CODE (insn) == CALL_INSN if (GET_CODE (insn) == CALL_INSN
...@@ -7384,7 +7110,7 @@ emit_predicate_relation_info () ...@@ -7384,7 +7110,7 @@ emit_predicate_relation_info ()
if (bb->end == insn) if (bb->end == insn)
bb->end = a; bb->end = a;
} }
if (insn == bb->end) if (insn == bb->end)
break; break;
insn = NEXT_INSN (insn); insn = NEXT_INSN (insn);
...@@ -7395,7 +7121,7 @@ emit_predicate_relation_info () ...@@ -7395,7 +7121,7 @@ emit_predicate_relation_info ()
/* Perform machine dependent operations on the rtl chain INSNS. */ /* Perform machine dependent operations on the rtl chain INSNS. */
static void static void
ia64_reorg () ia64_reorg (void)
{ {
/* We are freeing block_for_insn in the toplev to keep compatibility /* We are freeing block_for_insn in the toplev to keep compatibility
with old MDEP_REORGS that are not CFG based. Recompute it now. */ with old MDEP_REORGS that are not CFG based. Recompute it now. */
...@@ -7533,8 +7259,7 @@ ia64_reorg () ...@@ -7533,8 +7259,7 @@ ia64_reorg ()
/* Return true if REGNO is used by the epilogue. */ /* Return true if REGNO is used by the epilogue. */
int int
ia64_epilogue_uses (regno) ia64_epilogue_uses (int regno)
int regno;
{ {
switch (regno) switch (regno)
{ {
...@@ -7573,8 +7298,7 @@ ia64_epilogue_uses (regno) ...@@ -7573,8 +7298,7 @@ ia64_epilogue_uses (regno)
/* Return true if REGNO is used by the frame unwinder. */ /* Return true if REGNO is used by the frame unwinder. */
int int
ia64_eh_uses (regno) ia64_eh_uses (int regno)
int regno;
{ {
if (! reload_completed) if (! reload_completed)
return 0; return 0;
...@@ -7606,8 +7330,7 @@ ia64_eh_uses (regno) ...@@ -7606,8 +7330,7 @@ ia64_eh_uses (regno)
types which can't go in sdata/sbss. */ types which can't go in sdata/sbss. */
static bool static bool
ia64_in_small_data_p (exp) ia64_in_small_data_p (tree exp)
tree exp;
{ {
if (TARGET_NO_SDATA) if (TARGET_NO_SDATA)
return false; return false;
...@@ -7649,7 +7372,7 @@ static bool need_copy_state; ...@@ -7649,7 +7372,7 @@ static bool need_copy_state;
/* The function emits unwind directives for the start of an epilogue. */ /* The function emits unwind directives for the start of an epilogue. */
static void static void
process_epilogue () process_epilogue (void)
{ {
/* If this isn't the last block of the function, then we need to label the /* If this isn't the last block of the function, then we need to label the
current state, and copy it back in at the start of the next block. */ current state, and copy it back in at the start of the next block. */
...@@ -7667,9 +7390,7 @@ process_epilogue () ...@@ -7667,9 +7390,7 @@ process_epilogue ()
which result in emitting an assembly directive required for unwinding. */ which result in emitting an assembly directive required for unwinding. */
static int static int
process_set (asm_out_file, pat) process_set (FILE *asm_out_file, rtx pat)
FILE *asm_out_file;
rtx pat;
{ {
rtx src = SET_SRC (pat); rtx src = SET_SRC (pat);
rtx dest = SET_DEST (pat); rtx dest = SET_DEST (pat);
...@@ -7879,9 +7600,7 @@ process_set (asm_out_file, pat) ...@@ -7879,9 +7600,7 @@ process_set (asm_out_file, pat)
/* This function looks at a single insn and emits any directives /* This function looks at a single insn and emits any directives
required to unwind this insn. */ required to unwind this insn. */
void void
process_for_unwind_directive (asm_out_file, insn) process_for_unwind_directive (FILE *asm_out_file, rtx insn)
FILE *asm_out_file;
rtx insn;
{ {
if (flag_unwind_tables if (flag_unwind_tables
|| (flag_exceptions && !USING_SJLJ_EXCEPTIONS)) || (flag_exceptions && !USING_SJLJ_EXCEPTIONS))
...@@ -7938,7 +7657,7 @@ process_for_unwind_directive (asm_out_file, insn) ...@@ -7938,7 +7657,7 @@ process_for_unwind_directive (asm_out_file, insn)
void void
ia64_init_builtins () ia64_init_builtins (void)
{ {
tree psi_type_node = build_pointer_type (integer_type_node); tree psi_type_node = build_pointer_type (integer_type_node);
tree pdi_type_node = build_pointer_type (long_integer_type_node); tree pdi_type_node = build_pointer_type (long_integer_type_node);
...@@ -8010,8 +7729,8 @@ ia64_init_builtins () ...@@ -8010,8 +7729,8 @@ ia64_init_builtins ()
build_function_type (ptr_type_node, void_list_node), build_function_type (ptr_type_node, void_list_node),
IA64_BUILTIN_BSP); IA64_BUILTIN_BSP);
def_builtin ("__builtin_ia64_flushrs", def_builtin ("__builtin_ia64_flushrs",
build_function_type (void_type_node, void_list_node), build_function_type (void_type_node, void_list_node),
IA64_BUILTIN_FLUSHRS); IA64_BUILTIN_FLUSHRS);
def_builtin ("__sync_fetch_and_add_si", si_ftype_psi_si, def_builtin ("__sync_fetch_and_add_si", si_ftype_psi_si,
...@@ -8082,11 +7801,8 @@ ia64_init_builtins () ...@@ -8082,11 +7801,8 @@ ia64_init_builtins ()
*/ */
static rtx static rtx
ia64_expand_fetch_and_op (binoptab, mode, arglist, target) ia64_expand_fetch_and_op (optab binoptab, enum machine_mode mode,
optab binoptab; tree arglist, rtx target)
enum machine_mode mode;
tree arglist;
rtx target;
{ {
rtx ret, label, tmp, ccv, insn, mem, value; rtx ret, label, tmp, ccv, insn, mem, value;
tree arg0, arg1; tree arg0, arg1;
...@@ -8163,11 +7879,8 @@ ia64_expand_fetch_and_op (binoptab, mode, arglist, target) ...@@ -8163,11 +7879,8 @@ ia64_expand_fetch_and_op (binoptab, mode, arglist, target)
*/ */
static rtx static rtx
ia64_expand_op_and_fetch (binoptab, mode, arglist, target) ia64_expand_op_and_fetch (optab binoptab, enum machine_mode mode,
optab binoptab; tree arglist, rtx target)
enum machine_mode mode;
tree arglist;
rtx target;
{ {
rtx old, label, tmp, ret, ccv, insn, mem, value; rtx old, label, tmp, ret, ccv, insn, mem, value;
tree arg0, arg1; tree arg0, arg1;
...@@ -8231,12 +7944,8 @@ ia64_expand_op_and_fetch (binoptab, mode, arglist, target) ...@@ -8231,12 +7944,8 @@ ia64_expand_op_and_fetch (binoptab, mode, arglist, target)
*/ */
static rtx static rtx
ia64_expand_compare_and_swap (rmode, mode, boolp, arglist, target) ia64_expand_compare_and_swap (enum machine_mode rmode, enum machine_mode mode,
enum machine_mode rmode; int boolp, tree arglist, rtx target)
enum machine_mode mode;
int boolp;
tree arglist;
rtx target;
{ {
tree arg0, arg1, arg2; tree arg0, arg1, arg2;
rtx mem, old, new, ccv, tmp, insn; rtx mem, old, new, ccv, tmp, insn;
...@@ -8290,10 +7999,8 @@ ia64_expand_compare_and_swap (rmode, mode, boolp, arglist, target) ...@@ -8290,10 +7999,8 @@ ia64_expand_compare_and_swap (rmode, mode, boolp, arglist, target)
/* Expand lock_test_and_set. I.e. `xchgsz ret = [ptr], new'. */ /* Expand lock_test_and_set. I.e. `xchgsz ret = [ptr], new'. */
static rtx static rtx
ia64_expand_lock_test_and_set (mode, arglist, target) ia64_expand_lock_test_and_set (enum machine_mode mode, tree arglist,
enum machine_mode mode; rtx target)
tree arglist;
rtx target;
{ {
tree arg0, arg1; tree arg0, arg1;
rtx mem, new, ret, insn; rtx mem, new, ret, insn;
...@@ -8325,10 +8032,8 @@ ia64_expand_lock_test_and_set (mode, arglist, target) ...@@ -8325,10 +8032,8 @@ ia64_expand_lock_test_and_set (mode, arglist, target)
/* Expand lock_release. I.e. `stsz.rel [ptr] = r0'. */ /* Expand lock_release. I.e. `stsz.rel [ptr] = r0'. */
static rtx static rtx
ia64_expand_lock_release (mode, arglist, target) ia64_expand_lock_release (enum machine_mode mode, tree arglist,
enum machine_mode mode; rtx target ATTRIBUTE_UNUSED)
tree arglist;
rtx target ATTRIBUTE_UNUSED;
{ {
tree arg0; tree arg0;
rtx mem; rtx mem;
...@@ -8345,12 +8050,9 @@ ia64_expand_lock_release (mode, arglist, target) ...@@ -8345,12 +8050,9 @@ ia64_expand_lock_release (mode, arglist, target)
} }
rtx rtx
ia64_expand_builtin (exp, target, subtarget, mode, ignore) ia64_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
tree exp; enum machine_mode mode ATTRIBUTE_UNUSED,
rtx target; int ignore ATTRIBUTE_UNUSED)
rtx subtarget ATTRIBUTE_UNUSED;
enum machine_mode mode ATTRIBUTE_UNUSED;
int ignore ATTRIBUTE_UNUSED;
{ {
tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
unsigned int fcode = DECL_FUNCTION_CODE (fndecl); unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
...@@ -8509,9 +8211,7 @@ ia64_expand_builtin (exp, target, subtarget, mode, ignore) ...@@ -8509,9 +8211,7 @@ ia64_expand_builtin (exp, target, subtarget, mode, ignore)
most significant bits of the stack slot. */ most significant bits of the stack slot. */
enum direction enum direction
ia64_hpux_function_arg_padding (mode, type) ia64_hpux_function_arg_padding (enum machine_mode mode, tree type)
enum machine_mode mode;
tree type;
{ {
/* Exception to normal case for structures/unions/etc. */ /* Exception to normal case for structures/unions/etc. */
...@@ -8540,8 +8240,7 @@ struct extern_func_list ...@@ -8540,8 +8240,7 @@ struct extern_func_list
} *extern_func_head = 0; } *extern_func_head = 0;
static void static void
ia64_hpux_add_extern_decl (name) ia64_hpux_add_extern_decl (const char *name)
const char *name;
{ {
struct extern_func_list *p; struct extern_func_list *p;
...@@ -8555,7 +8254,7 @@ ia64_hpux_add_extern_decl (name) ...@@ -8555,7 +8254,7 @@ ia64_hpux_add_extern_decl (name)
/* Print out the list of used global functions. */ /* Print out the list of used global functions. */
static void static void
ia64_hpux_file_end () ia64_hpux_file_end (void)
{ {
while (extern_func_head) while (extern_func_head)
{ {
...@@ -8587,10 +8286,8 @@ ia64_hpux_file_end () ...@@ -8587,10 +8286,8 @@ ia64_hpux_file_end ()
special we do here is to honor small data. */ special we do here is to honor small data. */
static void static void
ia64_select_rtx_section (mode, x, align) ia64_select_rtx_section (enum machine_mode mode, rtx x,
enum machine_mode mode; unsigned HOST_WIDE_INT align)
rtx x;
unsigned HOST_WIDE_INT align;
{ {
if (GET_MODE_SIZE (mode) > 0 if (GET_MODE_SIZE (mode) > 0
&& GET_MODE_SIZE (mode) <= ia64_section_threshold) && GET_MODE_SIZE (mode) <= ia64_section_threshold)
...@@ -8603,27 +8300,20 @@ ia64_select_rtx_section (mode, x, align) ...@@ -8603,27 +8300,20 @@ ia64_select_rtx_section (mode, x, align)
Pretend flag_pic is always set. */ Pretend flag_pic is always set. */
static void static void
ia64_rwreloc_select_section (exp, reloc, align) ia64_rwreloc_select_section (tree exp, int reloc, unsigned HOST_WIDE_INT align)
tree exp;
int reloc;
unsigned HOST_WIDE_INT align;
{ {
default_elf_select_section_1 (exp, reloc, align, true); default_elf_select_section_1 (exp, reloc, align, true);
} }
static void static void
ia64_rwreloc_unique_section (decl, reloc) ia64_rwreloc_unique_section (tree decl, int reloc)
tree decl;
int reloc;
{ {
default_unique_section_1 (decl, reloc, true); default_unique_section_1 (decl, reloc, true);
} }
static void static void
ia64_rwreloc_select_rtx_section (mode, x, align) ia64_rwreloc_select_rtx_section (enum machine_mode mode, rtx x,
enum machine_mode mode; unsigned HOST_WIDE_INT align)
rtx x;
unsigned HOST_WIDE_INT align;
{ {
int save_pic = flag_pic; int save_pic = flag_pic;
flag_pic = 1; flag_pic = 1;
...@@ -8632,10 +8322,7 @@ ia64_rwreloc_select_rtx_section (mode, x, align) ...@@ -8632,10 +8322,7 @@ ia64_rwreloc_select_rtx_section (mode, x, align)
} }
static unsigned int static unsigned int
ia64_rwreloc_section_type_flags (decl, name, reloc) ia64_rwreloc_section_type_flags (tree decl, const char *name, int reloc)
tree decl;
const char *name;
int reloc;
{ {
return default_section_type_flags_1 (decl, name, reloc, true); return default_section_type_flags_1 (decl, name, reloc, true);
} }
...@@ -8648,12 +8335,9 @@ ia64_rwreloc_section_type_flags (decl, name, reloc) ...@@ -8648,12 +8335,9 @@ ia64_rwreloc_section_type_flags (decl, name, reloc)
*(*this + vcall_offset) should be added to THIS. */ *(*this + vcall_offset) should be added to THIS. */
static void static void
ia64_output_mi_thunk (file, thunk, delta, vcall_offset, function) ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
FILE *file; HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree thunk ATTRIBUTE_UNUSED; tree function)
HOST_WIDE_INT delta;
HOST_WIDE_INT vcall_offset;
tree function;
{ {
rtx this, insn, funexp; rtx this, insn, funexp;
......
...@@ -21,77 +21,81 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -21,77 +21,81 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Declare functions in s390.c. */ /* Declare functions in s390.c. */
extern void optimization_options PARAMS ((int, int)); extern void optimization_options (int, int);
extern void override_options PARAMS ((void)); extern void override_options (void);
extern int s390_arg_frame_offset PARAMS ((void)); extern int s390_arg_frame_offset (void);
extern void s390_load_got PARAMS ((int)); extern void s390_load_got (int);
extern void s390_emit_prologue PARAMS ((void)); extern void s390_emit_prologue (void);
extern void s390_emit_epilogue PARAMS ((void)); extern void s390_emit_epilogue (void);
extern void s390_function_profiler PARAMS ((FILE *, int)); extern void s390_function_profiler (FILE *, int);
#ifdef RTX_CODE #ifdef RTX_CODE
extern int s390_extra_constraint PARAMS ((rtx, int)); extern int s390_extra_constraint (rtx, int);
extern int const0_operand PARAMS ((rtx, enum machine_mode)); extern int const0_operand (rtx, enum machine_mode);
extern int consttable_operand PARAMS ((rtx, enum machine_mode)); extern int consttable_operand (rtx, enum machine_mode);
extern int larl_operand PARAMS ((rtx, enum machine_mode)); extern int larl_operand (rtx, enum machine_mode);
extern int s_operand PARAMS ((rtx, enum machine_mode)); extern int s_operand (rtx, enum machine_mode);
extern int s_imm_operand PARAMS ((rtx, enum machine_mode)); extern int s_imm_operand (rtx, enum machine_mode);
extern int bras_sym_operand PARAMS ((rtx, enum machine_mode)); extern int bras_sym_operand (rtx, enum machine_mode);
extern int load_multiple_operation PARAMS ((rtx, enum machine_mode)); extern int load_multiple_operation (rtx, enum machine_mode);
extern int store_multiple_operation PARAMS ((rtx, enum machine_mode)); extern int store_multiple_operation (rtx, enum machine_mode);
extern int s390_single_hi PARAMS ((rtx, enum machine_mode, int)); extern int s390_single_hi (rtx, enum machine_mode, int);
extern int s390_extract_hi PARAMS ((rtx, enum machine_mode, int)); extern int s390_extract_hi (rtx, enum machine_mode, int);
extern int s390_single_qi PARAMS ((rtx, enum machine_mode, int)); extern int s390_single_qi (rtx, enum machine_mode, int);
extern int s390_extract_qi PARAMS ((rtx, enum machine_mode, int)); extern int s390_extract_qi (rtx, enum machine_mode, int);
extern bool s390_split_ok_p PARAMS ((rtx, rtx, enum machine_mode, int)); extern bool s390_split_ok_p (rtx, rtx, enum machine_mode, int);
extern int tls_symbolic_operand PARAMS ((rtx)); extern int tls_symbolic_operand (rtx);
extern int s390_match_ccmode PARAMS ((rtx, enum machine_mode)); extern int s390_match_ccmode (rtx, enum machine_mode);
extern enum machine_mode s390_tm_ccmode PARAMS ((rtx, rtx, int)); extern enum machine_mode s390_tm_ccmode (rtx, rtx, int);
extern enum machine_mode s390_select_ccmode PARAMS ((enum rtx_code, rtx, rtx)); extern enum machine_mode s390_select_ccmode (enum rtx_code, rtx, rtx);
extern int symbolic_reference_mentioned_p PARAMS ((rtx)); extern int symbolic_reference_mentioned_p (rtx);
extern int tls_symbolic_reference_mentioned_p PARAMS ((rtx)); extern int tls_symbolic_reference_mentioned_p (rtx);
extern rtx s390_tls_get_offset PARAMS ((void)); extern rtx s390_tls_get_offset (void);
extern int legitimate_la_operand_p PARAMS ((rtx)); extern int legitimate_la_operand_p (rtx);
extern int preferred_la_operand_p PARAMS ((rtx)); extern int preferred_la_operand_p (rtx);
extern int legitimate_pic_operand_p PARAMS ((rtx)); extern int legitimate_pic_operand_p (rtx);
extern int legitimate_constant_p PARAMS ((rtx)); extern int legitimate_constant_p (rtx);
extern int legitimate_reload_constant_p PARAMS ((rtx)); extern int legitimate_reload_constant_p (rtx);
extern int legitimate_address_p PARAMS ((enum machine_mode, rtx, int)); extern int legitimate_address_p (enum machine_mode, rtx, int);
extern rtx legitimize_pic_address PARAMS ((rtx, rtx)); extern rtx legitimize_pic_address (rtx, rtx);
extern rtx legitimize_address PARAMS ((rtx, rtx, enum machine_mode)); extern rtx legitimize_address (rtx, rtx, enum machine_mode);
extern enum reg_class s390_preferred_reload_class PARAMS ((rtx, enum reg_class)); extern enum reg_class s390_preferred_reload_class (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_input_reload_class (enum reg_class,
extern enum reg_class s390_secondary_output_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx)); enum machine_mode,
extern int s390_plus_operand PARAMS ((rtx, enum machine_mode)); rtx);
extern void s390_expand_plus_operand PARAMS ((rtx, rtx, rtx)); extern enum reg_class s390_secondary_output_reload_class (enum reg_class,
extern void emit_symbolic_move PARAMS ((rtx *)); enum machine_mode,
extern void s390_load_address PARAMS ((rtx, rtx)); rtx);
extern void s390_expand_movstr PARAMS ((rtx, rtx, rtx)); extern int s390_plus_operand (rtx, enum machine_mode);
extern void s390_expand_clrstr PARAMS ((rtx, rtx)); extern void s390_expand_plus_operand (rtx, rtx, rtx);
extern void s390_expand_cmpmem PARAMS ((rtx, rtx, rtx, rtx)); extern void emit_symbolic_move (rtx *);
extern rtx s390_return_addr_rtx PARAMS ((int, 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 s390_output_symbolic_const (FILE *, rtx);
extern void print_operand_address PARAMS ((FILE *, rtx)); extern void print_operand_address (FILE *, rtx);
extern void print_operand PARAMS ((FILE *, rtx, int)); extern void print_operand (FILE *, rtx, int);
extern void s390_output_constant_pool PARAMS ((rtx, rtx)); extern void s390_output_constant_pool (rtx, rtx);
extern void s390_trampoline_template PARAMS ((FILE *)); extern void s390_trampoline_template (FILE *);
extern void s390_initialize_trampoline PARAMS ((rtx, rtx, rtx)); extern void s390_initialize_trampoline (rtx, rtx, rtx);
extern rtx s390_gen_rtx_const_DI PARAMS ((int, int)); extern rtx s390_gen_rtx_const_DI (int, int);
extern void s390_output_dwarf_dtprel PARAMS ((FILE*, int, rtx)); extern void s390_output_dwarf_dtprel (FILE*, int, rtx);
extern int s390_agen_dep_p PARAMS ((rtx, rtx)); extern int s390_agen_dep_p (rtx, rtx);
#endif /* RTX_CODE */ #endif /* RTX_CODE */
#ifdef TREE_CODE #ifdef TREE_CODE
extern int s390_function_arg_pass_by_reference PARAMS ((enum machine_mode, tree)); extern int s390_function_arg_pass_by_reference (enum machine_mode, tree);
extern void s390_function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern void s390_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
extern tree s390_build_va_list PARAMS ((void)); tree, int);
extern tree s390_build_va_list (void);
#ifdef RTX_CODE #ifdef RTX_CODE
extern rtx s390_function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern rtx s390_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
extern void s390_va_start PARAMS ((tree, rtx)); extern void s390_va_start (tree, rtx);
extern rtx s390_va_arg PARAMS ((tree, tree)); extern rtx s390_va_arg (tree, tree);
#endif /* RTX_CODE */ #endif /* RTX_CODE */
#endif /* TREE_CODE */ #endif /* TREE_CODE */
...@@ -54,29 +54,28 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -54,29 +54,28 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define SYMBOL_FLAG_ALIGN1 (SYMBOL_FLAG_MACH_DEP << 0) #define SYMBOL_FLAG_ALIGN1 (SYMBOL_FLAG_MACH_DEP << 0)
static bool s390_assemble_integer PARAMS ((rtx, unsigned int, int)); static bool s390_assemble_integer (rtx, unsigned int, int);
static void s390_select_rtx_section PARAMS ((enum machine_mode, rtx, static void s390_select_rtx_section (enum machine_mode, rtx,
unsigned HOST_WIDE_INT)); unsigned HOST_WIDE_INT);
static void s390_encode_section_info PARAMS ((tree, rtx, int)); static void s390_encode_section_info (tree, rtx, int);
static bool s390_cannot_force_const_mem PARAMS ((rtx)); static bool s390_cannot_force_const_mem (rtx);
static rtx s390_delegitimize_address PARAMS ((rtx)); static rtx s390_delegitimize_address (rtx);
static void s390_init_builtins PARAMS ((void)); static void s390_init_builtins (void);
static rtx s390_expand_builtin PARAMS ((tree, rtx, rtx, static rtx s390_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
enum machine_mode, int)); static void s390_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
static void s390_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree);
HOST_WIDE_INT, tree)); static enum attr_type s390_safe_attr_type (rtx);
static enum attr_type s390_safe_attr_type PARAMS ((rtx));
static int s390_adjust_cost (rtx, rtx, rtx, int);
static int s390_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int s390_adjust_priority (rtx, int);
static int s390_adjust_priority PARAMS ((rtx, int)); static int s390_issue_rate (void);
static int s390_issue_rate PARAMS ((void)); static int s390_use_dfa_pipeline_interface (void);
static int s390_use_dfa_pipeline_interface PARAMS ((void)); static int s390_first_cycle_multipass_dfa_lookahead (void);
static int s390_first_cycle_multipass_dfa_lookahead PARAMS ((void)); static int s390_sched_reorder2 (FILE *, int, rtx *, int *, int);
static int s390_sched_reorder2 PARAMS ((FILE *, int, rtx *, int *, int)); static bool s390_rtx_costs (rtx, int, int, int *);
static bool s390_rtx_costs PARAMS ((rtx, int, int, int *)); static int s390_address_cost (rtx);
static int s390_address_cost PARAMS ((rtx)); static void s390_reorg (void);
static void s390_reorg PARAMS ((void)); static bool s390_valid_pointer_mode (enum machine_mode);
static bool s390_valid_pointer_mode PARAMS ((enum machine_mode));
#undef TARGET_ASM_ALIGNED_HI_OP #undef TARGET_ASM_ALIGNED_HI_OP
#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t" #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
...@@ -202,35 +201,35 @@ struct machine_function GTY(()) ...@@ -202,35 +201,35 @@ struct machine_function GTY(())
const char *some_ld_name; const char *some_ld_name;
}; };
static int s390_match_ccmode_set PARAMS ((rtx, enum machine_mode)); static int s390_match_ccmode_set (rtx, enum machine_mode);
static int s390_branch_condition_mask PARAMS ((rtx)); static int s390_branch_condition_mask (rtx);
static const char *s390_branch_condition_mnemonic PARAMS ((rtx, int)); static const char *s390_branch_condition_mnemonic (rtx, int);
static int check_mode PARAMS ((rtx, enum machine_mode *)); static int check_mode (rtx, enum machine_mode *);
static int general_s_operand PARAMS ((rtx, enum machine_mode, int)); static int general_s_operand (rtx, enum machine_mode, int);
static int s390_short_displacement PARAMS ((rtx)); static int s390_short_displacement (rtx);
static int s390_decompose_address PARAMS ((rtx, struct s390_address *)); static int s390_decompose_address (rtx, struct s390_address *);
static rtx get_thread_pointer PARAMS ((void)); static rtx get_thread_pointer (void);
static rtx legitimize_tls_address PARAMS ((rtx, rtx)); static rtx legitimize_tls_address (rtx, rtx);
static const char *get_some_local_dynamic_name PARAMS ((void)); static const char *get_some_local_dynamic_name (void);
static int get_some_local_dynamic_name_1 PARAMS ((rtx *, void *)); static int get_some_local_dynamic_name_1 (rtx *, void *);
static int reg_used_in_mem_p PARAMS ((int, rtx)); static int reg_used_in_mem_p (int, rtx);
static int addr_generation_dependency_p PARAMS ((rtx, rtx)); static int addr_generation_dependency_p (rtx, rtx);
static int s390_split_branches PARAMS ((rtx, bool *)); static int s390_split_branches (rtx, bool *);
static void find_constant_pool_ref PARAMS ((rtx, rtx *)); static void find_constant_pool_ref (rtx, rtx *);
static void replace_constant_pool_ref PARAMS ((rtx *, rtx, rtx)); static void replace_constant_pool_ref (rtx *, rtx, rtx);
static rtx find_ltrel_base PARAMS ((rtx)); static rtx find_ltrel_base (rtx);
static void replace_ltrel_base PARAMS ((rtx *, rtx)); static void replace_ltrel_base (rtx *, rtx);
static void s390_optimize_prolog PARAMS ((int)); static void s390_optimize_prolog (int);
static bool s390_fixup_clobbered_return_reg PARAMS ((rtx)); static bool s390_fixup_clobbered_return_reg (rtx);
static int find_unused_clobbered_reg PARAMS ((void)); static int find_unused_clobbered_reg (void);
static void s390_frame_info PARAMS ((void)); static void s390_frame_info (void);
static rtx save_fpr PARAMS ((rtx, int, int)); static rtx save_fpr (rtx, int, int);
static rtx restore_fpr PARAMS ((rtx, int, int)); static rtx restore_fpr (rtx, int, int);
static rtx save_gprs PARAMS ((rtx, int, int, int)); static rtx save_gprs (rtx, int, int, int);
static rtx restore_gprs PARAMS ((rtx, int, int, int)); static rtx restore_gprs (rtx, int, int, int);
static int s390_function_arg_size PARAMS ((enum machine_mode, tree)); static int s390_function_arg_size (enum machine_mode, tree);
static bool s390_function_arg_float PARAMS ((enum machine_mode, tree)); static bool s390_function_arg_float (enum machine_mode, tree);
static struct machine_function * s390_init_machine_status PARAMS ((void)); static struct machine_function * s390_init_machine_status (void);
/* Check whether integer displacement is in range. */ /* Check whether integer displacement is in range. */
#define DISP_IN_RANGE(d) \ #define DISP_IN_RANGE(d) \
...@@ -242,9 +241,7 @@ static struct machine_function * s390_init_machine_status PARAMS ((void)); ...@@ -242,9 +241,7 @@ static struct machine_function * s390_init_machine_status PARAMS ((void));
CC mode is at least as constrained as REQ_MODE. */ CC mode is at least as constrained as REQ_MODE. */
static int static int
s390_match_ccmode_set (set, req_mode) s390_match_ccmode_set (rtx set, enum machine_mode req_mode)
rtx set;
enum machine_mode req_mode;
{ {
enum machine_mode set_mode; enum machine_mode set_mode;
...@@ -296,9 +293,7 @@ s390_match_ccmode_set (set, req_mode) ...@@ -296,9 +293,7 @@ s390_match_ccmode_set (set, req_mode)
If REQ_MODE is VOIDmode, always return false. */ If REQ_MODE is VOIDmode, always return false. */
int int
s390_match_ccmode (insn, req_mode) s390_match_ccmode (rtx insn, enum machine_mode req_mode)
rtx insn;
enum machine_mode req_mode;
{ {
int i; int i;
...@@ -329,10 +324,7 @@ s390_match_ccmode (insn, req_mode) ...@@ -329,10 +324,7 @@ s390_match_ccmode (insn, req_mode)
if the instruction cannot (TM). */ if the instruction cannot (TM). */
enum machine_mode enum machine_mode
s390_tm_ccmode (op1, op2, mixed) s390_tm_ccmode (rtx op1, rtx op2, int mixed)
rtx op1;
rtx op2;
int mixed;
{ {
int bit0, bit1; int bit0, bit1;
...@@ -365,10 +357,7 @@ s390_tm_ccmode (op1, op2, mixed) ...@@ -365,10 +357,7 @@ s390_tm_ccmode (op1, op2, mixed)
comparison. */ comparison. */
enum machine_mode enum machine_mode
s390_select_ccmode (code, op0, op1) s390_select_ccmode (enum rtx_code code, rtx op0, rtx op1)
enum rtx_code code;
rtx op0;
rtx op1;
{ {
switch (code) switch (code)
{ {
...@@ -462,8 +451,7 @@ s390_select_ccmode (code, op0, op1) ...@@ -462,8 +451,7 @@ s390_select_ccmode (code, op0, op1)
specified by CODE. */ specified by CODE. */
static int static int
s390_branch_condition_mask (code) s390_branch_condition_mask (rtx code)
rtx code;
{ {
const int CC0 = 1 << 3; const int CC0 = 1 << 3;
const int CC1 = 1 << 2; const int CC1 = 1 << 2;
...@@ -657,9 +645,7 @@ s390_branch_condition_mask (code) ...@@ -657,9 +645,7 @@ s390_branch_condition_mask (code)
for the corresponding inverted branch. */ for the corresponding inverted branch. */
static const char * static const char *
s390_branch_condition_mnemonic (code, inv) s390_branch_condition_mnemonic (rtx code, int inv)
rtx code;
int inv;
{ {
static const char *const mnemonic[16] = static const char *const mnemonic[16] =
{ {
...@@ -686,10 +672,7 @@ s390_branch_condition_mnemonic (code, inv) ...@@ -686,10 +672,7 @@ s390_branch_condition_mnemonic (code, inv)
equal to DEF, return zero. Otherwise, return -1. */ equal to DEF, return zero. Otherwise, return -1. */
int int
s390_single_hi (op, mode, def) s390_single_hi (rtx op, enum machine_mode mode, int def)
rtx op;
enum machine_mode mode;
int def;
{ {
if (GET_CODE (op) == CONST_INT) if (GET_CODE (op) == CONST_INT)
{ {
...@@ -751,10 +734,7 @@ s390_single_hi (op, mode, def) ...@@ -751,10 +734,7 @@ s390_single_hi (op, mode, def)
constant OP of mode MODE. */ constant OP of mode MODE. */
int int
s390_extract_hi (op, mode, part) s390_extract_hi (rtx op, enum machine_mode mode, int part)
rtx op;
enum machine_mode mode;
int part;
{ {
int n_parts = GET_MODE_SIZE (mode) / 2; int n_parts = GET_MODE_SIZE (mode) / 2;
if (part < 0 || part >= n_parts) if (part < 0 || part >= n_parts)
...@@ -789,10 +769,7 @@ s390_extract_hi (op, mode, part) ...@@ -789,10 +769,7 @@ s390_extract_hi (op, mode, part)
equal to DEF, return zero. Otherwise, return -1. */ equal to DEF, return zero. Otherwise, return -1. */
int int
s390_single_qi (op, mode, def) s390_single_qi (rtx op, enum machine_mode mode, int def)
rtx op;
enum machine_mode mode;
int def;
{ {
if (GET_CODE (op) == CONST_INT) if (GET_CODE (op) == CONST_INT)
{ {
...@@ -854,10 +831,7 @@ s390_single_qi (op, mode, def) ...@@ -854,10 +831,7 @@ s390_single_qi (op, mode, def)
constant OP of mode MODE. */ constant OP of mode MODE. */
int int
s390_extract_qi (op, mode, part) s390_extract_qi (rtx op, enum machine_mode mode, int part)
rtx op;
enum machine_mode mode;
int part;
{ {
int n_parts = GET_MODE_SIZE (mode); int n_parts = GET_MODE_SIZE (mode);
if (part < 0 || part >= n_parts) if (part < 0 || part >= n_parts)
...@@ -891,11 +865,7 @@ s390_extract_qi (op, mode, part) ...@@ -891,11 +865,7 @@ s390_extract_qi (op, mode, part)
moves, moving the subword FIRST_SUBWORD first. */ moves, moving the subword FIRST_SUBWORD first. */
bool bool
s390_split_ok_p (dst, src, mode, first_subword) s390_split_ok_p (rtx dst, rtx src, enum machine_mode mode, int first_subword)
rtx dst;
rtx src;
enum machine_mode mode;
int first_subword;
{ {
/* Floating point registers cannot be split. */ /* Floating point registers cannot be split. */
if (FP_REG_P (src) || FP_REG_P (dst)) if (FP_REG_P (src) || FP_REG_P (dst))
...@@ -932,9 +902,7 @@ s390_split_ok_p (dst, src, mode, first_subword) ...@@ -932,9 +902,7 @@ s390_split_ok_p (dst, src, mode, first_subword)
SIZE is nonzero if `-Os' is specified and zero otherwise. */ SIZE is nonzero if `-Os' is specified and zero otherwise. */
void void
optimization_options (level, size) optimization_options (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED)
int level ATTRIBUTE_UNUSED;
int size ATTRIBUTE_UNUSED;
{ {
/* ??? There are apparently still problems with -fcaller-saves. */ /* ??? There are apparently still problems with -fcaller-saves. */
flag_caller_saves = 0; flag_caller_saves = 0;
...@@ -945,7 +913,7 @@ optimization_options (level, size) ...@@ -945,7 +913,7 @@ optimization_options (level, size)
} }
void void
override_options () override_options (void)
{ {
int i; int i;
static struct pta static struct pta
...@@ -1038,8 +1006,7 @@ const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] = ...@@ -1038,8 +1006,7 @@ const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] =
/* Return attribute type of insn. */ /* Return attribute type of insn. */
static enum attr_type static enum attr_type
s390_safe_attr_type (insn) s390_safe_attr_type (rtx insn)
rtx insn;
{ {
if (recog_memoized (insn) >= 0) if (recog_memoized (insn) >= 0)
return get_attr_type (insn); return get_attr_type (insn);
...@@ -1052,9 +1019,7 @@ s390_safe_attr_type (insn) ...@@ -1052,9 +1019,7 @@ s390_safe_attr_type (insn)
MODE is the current operation mode. */ MODE is the current operation mode. */
int int
const0_operand (op, mode) const0_operand (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
return op == CONST0_RTX (mode); return op == CONST0_RTX (mode);
} }
...@@ -1064,9 +1029,7 @@ const0_operand (op, mode) ...@@ -1064,9 +1029,7 @@ const0_operand (op, mode)
MODE is the current operation mode. */ MODE is the current operation mode. */
int int
consttable_operand (op, mode) consttable_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return CONSTANT_P (op); return CONSTANT_P (op);
} }
...@@ -1075,9 +1038,7 @@ consttable_operand (op, mode) ...@@ -1075,9 +1038,7 @@ consttable_operand (op, mode)
If MODE is set to VOIDmode, set it to the mode of OP. */ If MODE is set to VOIDmode, set it to the mode of OP. */
static int static int
check_mode (op, mode) check_mode (register rtx op, enum machine_mode *mode)
register rtx op;
enum machine_mode *mode;
{ {
if (*mode == VOIDmode) if (*mode == VOIDmode)
*mode = GET_MODE (op); *mode = GET_MODE (op);
...@@ -1094,9 +1055,7 @@ check_mode (op, mode) ...@@ -1094,9 +1055,7 @@ check_mode (op, mode)
MODE is the current operation mode. */ MODE is the current operation mode. */
int int
larl_operand (op, mode) larl_operand (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
if (! check_mode (op, &mode)) if (! check_mode (op, &mode))
return 0; return 0;
...@@ -1158,10 +1117,8 @@ larl_operand (op, mode) ...@@ -1158,10 +1117,8 @@ larl_operand (op, mode)
be accepted or not. */ be accepted or not. */
static int static int
general_s_operand (op, mode, allow_immediate) general_s_operand (register rtx op, enum machine_mode mode,
register rtx op; int allow_immediate)
enum machine_mode mode;
int allow_immediate;
{ {
struct s390_address addr; struct s390_address addr;
...@@ -1216,9 +1173,7 @@ general_s_operand (op, mode, allow_immediate) ...@@ -1216,9 +1173,7 @@ general_s_operand (op, mode, allow_immediate)
MODE is the current operation mode. */ MODE is the current operation mode. */
int int
s_operand (op, mode) s_operand (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
return general_s_operand (op, mode, 0); return general_s_operand (op, mode, 0);
} }
...@@ -1230,9 +1185,7 @@ s_operand (op, mode) ...@@ -1230,9 +1185,7 @@ s_operand (op, mode)
MODE is the current operation mode. */ MODE is the current operation mode. */
int int
s_imm_operand (op, mode) s_imm_operand (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
return general_s_operand (op, mode, 1); return general_s_operand (op, mode, 1);
} }
...@@ -1240,8 +1193,7 @@ s_imm_operand (op, mode) ...@@ -1240,8 +1193,7 @@ s_imm_operand (op, mode)
/* Return true if DISP is a valid short displacement. */ /* Return true if DISP is a valid short displacement. */
static int static int
s390_short_displacement (disp) s390_short_displacement (rtx disp)
rtx disp;
{ {
/* No displacement is OK. */ /* No displacement is OK. */
if (!disp) if (!disp)
...@@ -1268,9 +1220,7 @@ s390_short_displacement (disp) ...@@ -1268,9 +1220,7 @@ s390_short_displacement (disp)
/* Return true if OP is a valid operand for a C constraint. */ /* Return true if OP is a valid operand for a C constraint. */
int int
s390_extra_constraint (op, c) s390_extra_constraint (rtx op, int c)
rtx op;
int c;
{ {
struct s390_address addr; struct s390_address addr;
...@@ -1361,10 +1311,7 @@ s390_extra_constraint (op, c) ...@@ -1361,10 +1311,7 @@ s390_extra_constraint (op, c)
scanned. In either case, *TOTAL contains the cost result. */ scanned. In either case, *TOTAL contains the cost result. */
static bool static bool
s390_rtx_costs (x, code, outer_code, total) s390_rtx_costs (rtx x, int code, int outer_code, int *total)
rtx x;
int code, outer_code;
int *total;
{ {
switch (code) switch (code)
{ {
...@@ -1432,8 +1379,7 @@ s390_rtx_costs (x, code, outer_code, total) ...@@ -1432,8 +1379,7 @@ s390_rtx_costs (x, code, outer_code, total)
/* Return the cost of an address rtx ADDR. */ /* Return the cost of an address rtx ADDR. */
static int static int
s390_address_cost (addr) s390_address_cost (rtx addr)
rtx addr;
{ {
struct s390_address ad; struct s390_address ad;
if (!s390_decompose_address (addr, &ad)) if (!s390_decompose_address (addr, &ad))
...@@ -1447,9 +1393,7 @@ s390_address_cost (addr) ...@@ -1447,9 +1393,7 @@ s390_address_cost (addr)
MODE is the current operation mode. */ MODE is the current operation mode. */
int int
bras_sym_operand (op, mode) bras_sym_operand (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
register enum rtx_code code = GET_CODE (op); register enum rtx_code code = GET_CODE (op);
...@@ -1469,8 +1413,7 @@ bras_sym_operand (op, mode) ...@@ -1469,8 +1413,7 @@ bras_sym_operand (op, mode)
otherwise return 0. */ otherwise return 0. */
int int
tls_symbolic_operand (op) tls_symbolic_operand (register rtx op)
register rtx op;
{ {
if (GET_CODE (op) != SYMBOL_REF) if (GET_CODE (op) != SYMBOL_REF)
return 0; return 0;
...@@ -1483,9 +1426,7 @@ tls_symbolic_operand (op) ...@@ -1483,9 +1426,7 @@ tls_symbolic_operand (op)
MODE is the current operation mode. */ MODE is the current operation mode. */
int int
load_multiple_operation (op, mode) load_multiple_operation (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
int count = XVECLEN (op, 0); int count = XVECLEN (op, 0);
unsigned int dest_regno; unsigned int dest_regno;
...@@ -1547,9 +1488,7 @@ load_multiple_operation (op, mode) ...@@ -1547,9 +1488,7 @@ load_multiple_operation (op, mode)
MODE is the current operation mode. */ MODE is the current operation mode. */
int int
store_multiple_operation (op, mode) store_multiple_operation (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
int count = XVECLEN (op, 0); int count = XVECLEN (op, 0);
unsigned int src_regno; unsigned int src_regno;
...@@ -1607,8 +1546,7 @@ store_multiple_operation (op, mode) ...@@ -1607,8 +1546,7 @@ store_multiple_operation (op, mode)
/* Return true if OP contains a symbol reference */ /* Return true if OP contains a symbol reference */
int int
symbolic_reference_mentioned_p (op) symbolic_reference_mentioned_p (rtx op)
rtx op;
{ {
register const char *fmt; register const char *fmt;
register int i; register int i;
...@@ -1638,8 +1576,7 @@ symbolic_reference_mentioned_p (op) ...@@ -1638,8 +1576,7 @@ symbolic_reference_mentioned_p (op)
/* Return true if OP contains a reference to a thread-local symbol. */ /* Return true if OP contains a reference to a thread-local symbol. */
int int
tls_symbolic_reference_mentioned_p (op) tls_symbolic_reference_mentioned_p (rtx op)
rtx op;
{ {
register const char *fmt; register const char *fmt;
register int i; register int i;
...@@ -1672,8 +1609,7 @@ tls_symbolic_reference_mentioned_p (op) ...@@ -1672,8 +1609,7 @@ tls_symbolic_reference_mentioned_p (op)
and that OP satisfies CONSTANT_P or is a CONST_DOUBLE. */ and that OP satisfies CONSTANT_P or is a CONST_DOUBLE. */
int int
legitimate_pic_operand_p (op) legitimate_pic_operand_p (register rtx op)
register rtx op;
{ {
/* Accept all non-symbolic constants. */ /* Accept all non-symbolic constants. */
if (!SYMBOLIC_CONST (op)) if (!SYMBOLIC_CONST (op))
...@@ -1688,8 +1624,7 @@ legitimate_pic_operand_p (op) ...@@ -1688,8 +1624,7 @@ legitimate_pic_operand_p (op)
It is given that OP satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that OP satisfies CONSTANT_P or is a CONST_DOUBLE. */
int int
legitimate_constant_p (op) legitimate_constant_p (register rtx op)
register rtx op;
{ {
/* Accept all non-symbolic constants. */ /* Accept all non-symbolic constants. */
if (!SYMBOLIC_CONST (op)) if (!SYMBOLIC_CONST (op))
...@@ -1721,8 +1656,7 @@ legitimate_constant_p (op) ...@@ -1721,8 +1656,7 @@ legitimate_constant_p (op)
not constant (TLS) or not known at final link time (PIC). */ not constant (TLS) or not known at final link time (PIC). */
static bool static bool
s390_cannot_force_const_mem (x) s390_cannot_force_const_mem (rtx x)
rtx x;
{ {
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
...@@ -1783,8 +1717,7 @@ s390_cannot_force_const_mem (x) ...@@ -1783,8 +1717,7 @@ s390_cannot_force_const_mem (x)
before it can be used as operand. */ before it can be used as operand. */
int int
legitimate_reload_constant_p (op) legitimate_reload_constant_p (register rtx op)
register rtx op;
{ {
/* Accept la(y) operands. */ /* Accept la(y) operands. */
if (GET_CODE (op) == CONST_INT if (GET_CODE (op) == CONST_INT
...@@ -1814,9 +1747,7 @@ legitimate_reload_constant_p (op) ...@@ -1814,9 +1747,7 @@ legitimate_reload_constant_p (op)
return the class of reg to actually use. */ return the class of reg to actually use. */
enum reg_class enum reg_class
s390_preferred_reload_class (op, class) s390_preferred_reload_class (rtx op, enum reg_class class)
rtx op;
enum reg_class class;
{ {
/* This can happen if a floating point constant is being /* This can happen if a floating point constant is being
reloaded into an integer register. Leave well alone. */ reloaded into an integer register. Leave well alone. */
...@@ -1863,10 +1794,8 @@ s390_preferred_reload_class (op, class) ...@@ -1863,10 +1794,8 @@ s390_preferred_reload_class (op, class)
is not a legitimate operand of the LOAD ADDRESS instruction. */ is not a legitimate operand of the LOAD ADDRESS instruction. */
enum reg_class enum reg_class
s390_secondary_input_reload_class (class, mode, in) s390_secondary_input_reload_class (enum reg_class class ATTRIBUTE_UNUSED,
enum reg_class class ATTRIBUTE_UNUSED; enum machine_mode mode, rtx in)
enum machine_mode mode;
rtx in;
{ {
if (s390_plus_operand (in, mode)) if (s390_plus_operand (in, mode))
return ADDR_REGS; return ADDR_REGS;
...@@ -1881,10 +1810,8 @@ s390_secondary_input_reload_class (class, mode, in) ...@@ -1881,10 +1810,8 @@ s390_secondary_input_reload_class (class, mode, in)
non-offsettable memory address. */ non-offsettable memory address. */
enum reg_class enum reg_class
s390_secondary_output_reload_class (class, mode, out) s390_secondary_output_reload_class (enum reg_class class,
enum reg_class class; enum machine_mode mode, rtx out)
enum machine_mode mode;
rtx out;
{ {
if ((TARGET_64BIT ? mode == TImode if ((TARGET_64BIT ? mode == TImode
: (mode == DImode || mode == DFmode)) : (mode == DImode || mode == DFmode))
...@@ -1903,9 +1830,7 @@ s390_secondary_output_reload_class (class, mode, out) ...@@ -1903,9 +1830,7 @@ s390_secondary_output_reload_class (class, mode, out)
MODE is the current operation mode. */ MODE is the current operation mode. */
int int
s390_plus_operand (op, mode) s390_plus_operand (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
if (!check_mode (op, &mode) || mode != Pmode) if (!check_mode (op, &mode) || mode != Pmode)
return FALSE; return FALSE;
...@@ -1924,10 +1849,8 @@ s390_plus_operand (op, mode) ...@@ -1924,10 +1849,8 @@ s390_plus_operand (op, mode)
SCRATCH may be used as scratch register. */ SCRATCH may be used as scratch register. */
void void
s390_expand_plus_operand (target, src, scratch) s390_expand_plus_operand (register rtx target, register rtx src,
register rtx target; register rtx scratch)
register rtx src;
register rtx scratch;
{ {
rtx sum1, sum2; rtx sum1, sum2;
struct s390_address ad; struct s390_address ad;
...@@ -1993,9 +1916,7 @@ s390_expand_plus_operand (target, src, scratch) ...@@ -1993,9 +1916,7 @@ s390_expand_plus_operand (target, src, scratch)
canonical form so that they will be recognized. */ canonical form so that they will be recognized. */
static int static int
s390_decompose_address (addr, out) s390_decompose_address (register rtx addr, struct s390_address *out)
register rtx addr;
struct s390_address *out;
{ {
rtx base = NULL_RTX; rtx base = NULL_RTX;
rtx indx = NULL_RTX; rtx indx = NULL_RTX;
...@@ -2232,10 +2153,8 @@ s390_decompose_address (addr, out) ...@@ -2232,10 +2153,8 @@ s390_decompose_address (addr, out)
STRICT specifies whether strict register checking applies. */ STRICT specifies whether strict register checking applies. */
int int
legitimate_address_p (mode, addr, strict) legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED; register rtx addr, int strict)
register rtx addr;
int strict;
{ {
struct s390_address ad; struct s390_address ad;
if (!s390_decompose_address (addr, &ad)) if (!s390_decompose_address (addr, &ad))
...@@ -2264,8 +2183,7 @@ legitimate_address_p (mode, addr, strict) ...@@ -2264,8 +2183,7 @@ legitimate_address_p (mode, addr, strict)
address, as LA performs only a 31-bit addition. */ address, as LA performs only a 31-bit addition. */
int int
legitimate_la_operand_p (op) legitimate_la_operand_p (register rtx op)
register rtx op;
{ {
struct s390_address addr; struct s390_address addr;
if (!s390_decompose_address (op, &addr)) if (!s390_decompose_address (op, &addr))
...@@ -2281,8 +2199,7 @@ legitimate_la_operand_p (op) ...@@ -2281,8 +2199,7 @@ legitimate_la_operand_p (op)
and we prefer to use LA over addition to compute it. */ and we prefer to use LA over addition to compute it. */
int int
preferred_la_operand_p (op) preferred_la_operand_p (register rtx op)
register rtx op;
{ {
struct s390_address addr; struct s390_address addr;
if (!s390_decompose_address (op, &addr)) if (!s390_decompose_address (op, &addr))
...@@ -2306,9 +2223,7 @@ preferred_la_operand_p (op) ...@@ -2306,9 +2223,7 @@ preferred_la_operand_p (op)
where legitimate_la_operand_p (SRC) returns false. */ where legitimate_la_operand_p (SRC) returns false. */
void void
s390_load_address (dst, src) s390_load_address (rtx dst, rtx src)
rtx dst;
rtx src;
{ {
if (TARGET_64BIT) if (TARGET_64BIT)
emit_move_insn (dst, src); emit_move_insn (dst, src);
...@@ -2335,9 +2250,7 @@ s390_load_address (dst, src) ...@@ -2335,9 +2250,7 @@ s390_load_address (dst, src)
reg also appears in the address. */ reg also appears in the address. */
rtx rtx
legitimize_pic_address (orig, reg) legitimize_pic_address (rtx orig, rtx reg)
rtx orig;
rtx reg;
{ {
rtx addr = orig; rtx addr = orig;
rtx new = orig; rtx new = orig;
...@@ -2550,7 +2463,7 @@ legitimize_pic_address (orig, reg) ...@@ -2550,7 +2463,7 @@ legitimize_pic_address (orig, reg)
addr = gen_rtx_PLUS (Pmode, addr, op1); addr = gen_rtx_PLUS (Pmode, addr, op1);
addr = gen_rtx_CONST (Pmode, addr); addr = gen_rtx_CONST (Pmode, addr);
addr = force_const_mem (Pmode, addr); addr = force_const_mem (Pmode, addr);
emit_move_insn (temp, addr); emit_move_insn (temp, addr);
new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp); new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
if (reg != 0) if (reg != 0)
...@@ -2605,7 +2518,7 @@ legitimize_pic_address (orig, reg) ...@@ -2605,7 +2518,7 @@ legitimize_pic_address (orig, reg)
/* Load the thread pointer into a register. */ /* Load the thread pointer into a register. */
static rtx static rtx
get_thread_pointer () get_thread_pointer (void)
{ {
rtx tp; rtx tp;
...@@ -2620,7 +2533,7 @@ get_thread_pointer () ...@@ -2620,7 +2533,7 @@ get_thread_pointer ()
static GTY(()) rtx s390_tls_symbol; static GTY(()) rtx s390_tls_symbol;
rtx rtx
s390_tls_get_offset () s390_tls_get_offset (void)
{ {
if (!s390_tls_symbol) if (!s390_tls_symbol)
s390_tls_symbol = gen_rtx_SYMBOL_REF (Pmode, "__tls_get_offset"); s390_tls_symbol = gen_rtx_SYMBOL_REF (Pmode, "__tls_get_offset");
...@@ -2632,9 +2545,7 @@ s390_tls_get_offset () ...@@ -2632,9 +2545,7 @@ s390_tls_get_offset ()
this (thread-local) address. REG may be used as temporary. */ this (thread-local) address. REG may be used as temporary. */
static rtx static rtx
legitimize_tls_address (addr, reg) legitimize_tls_address (rtx addr, rtx reg)
rtx addr;
rtx reg;
{ {
rtx new, tls_call, temp, base, r2, insn; rtx new, tls_call, temp, base, r2, insn;
...@@ -2823,8 +2734,7 @@ legitimize_tls_address (addr, reg) ...@@ -2823,8 +2734,7 @@ legitimize_tls_address (addr, reg)
/* Emit insns to move operands[1] into operands[0]. */ /* Emit insns to move operands[1] into operands[0]. */
void void
emit_symbolic_move (operands) emit_symbolic_move (rtx *operands)
rtx *operands;
{ {
rtx temp = no_new_pseudos ? operands[0] : gen_reg_rtx (Pmode); rtx temp = no_new_pseudos ? operands[0] : gen_reg_rtx (Pmode);
...@@ -2848,10 +2758,8 @@ emit_symbolic_move (operands) ...@@ -2848,10 +2758,8 @@ emit_symbolic_move (operands)
See comments by legitimize_pic_address for details. */ See comments by legitimize_pic_address for details. */
rtx rtx
legitimize_address (x, oldx, mode) legitimize_address (register rtx x, register rtx oldx ATTRIBUTE_UNUSED,
register rtx x; enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx oldx ATTRIBUTE_UNUSED;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
rtx constant_term = const0_rtx; rtx constant_term = const0_rtx;
...@@ -2933,14 +2841,11 @@ legitimize_address (x, oldx, mode) ...@@ -2933,14 +2841,11 @@ legitimize_address (x, oldx, mode)
/* Emit code to move LEN bytes from DST to SRC. */ /* Emit code to move LEN bytes from DST to SRC. */
void void
s390_expand_movstr (dst, src, len) s390_expand_movstr (rtx dst, rtx src, rtx len)
rtx dst;
rtx src;
rtx len;
{ {
rtx (*gen_short) PARAMS ((rtx, rtx, rtx)) = rtx (*gen_short) (rtx, rtx, rtx) =
TARGET_64BIT ? gen_movstr_short_64 : gen_movstr_short_31; TARGET_64BIT ? gen_movstr_short_64 : gen_movstr_short_31;
rtx (*gen_long) PARAMS ((rtx, rtx, rtx, rtx)) = rtx (*gen_long) (rtx, rtx, rtx, rtx) =
TARGET_64BIT ? gen_movstr_long_64 : gen_movstr_long_31; TARGET_64BIT ? gen_movstr_long_64 : gen_movstr_long_31;
...@@ -3030,13 +2935,11 @@ s390_expand_movstr (dst, src, len) ...@@ -3030,13 +2935,11 @@ s390_expand_movstr (dst, src, len)
/* Emit code to clear LEN bytes at DST. */ /* Emit code to clear LEN bytes at DST. */
void void
s390_expand_clrstr (dst, len) s390_expand_clrstr (rtx dst, rtx len)
rtx dst;
rtx len;
{ {
rtx (*gen_short) PARAMS ((rtx, rtx)) = rtx (*gen_short) (rtx, rtx) =
TARGET_64BIT ? gen_clrstr_short_64 : gen_clrstr_short_31; TARGET_64BIT ? gen_clrstr_short_64 : gen_clrstr_short_31;
rtx (*gen_long) PARAMS ((rtx, rtx, rtx)) = rtx (*gen_long) (rtx, rtx, rtx) =
TARGET_64BIT ? gen_clrstr_long_64 : gen_clrstr_long_31; TARGET_64BIT ? gen_clrstr_long_64 : gen_clrstr_long_31;
...@@ -3122,17 +3025,13 @@ s390_expand_clrstr (dst, len) ...@@ -3122,17 +3025,13 @@ s390_expand_clrstr (dst, len)
and return the result in TARGET. */ and return the result in TARGET. */
void void
s390_expand_cmpmem (target, op0, op1, len) s390_expand_cmpmem (rtx target, rtx op0, rtx op1, rtx len)
rtx target;
rtx op0;
rtx op1;
rtx len;
{ {
rtx (*gen_short) PARAMS ((rtx, rtx, rtx)) = rtx (*gen_short) (rtx, rtx, rtx) =
TARGET_64BIT ? gen_cmpmem_short_64 : gen_cmpmem_short_31; TARGET_64BIT ? gen_cmpmem_short_64 : gen_cmpmem_short_31;
rtx (*gen_long) PARAMS ((rtx, rtx, rtx, rtx)) = rtx (*gen_long) (rtx, rtx, rtx, rtx) =
TARGET_64BIT ? gen_cmpmem_long_64 : gen_cmpmem_long_31; TARGET_64BIT ? gen_cmpmem_long_64 : gen_cmpmem_long_31;
rtx (*gen_result) PARAMS ((rtx)) = rtx (*gen_result) (rtx) =
GET_MODE (target) == DImode ? gen_cmpint_di : gen_cmpint_si; GET_MODE (target) == DImode ? gen_cmpint_di : gen_cmpint_si;
op0 = protect_from_queue (op0, 0); op0 = protect_from_queue (op0, 0);
...@@ -3244,10 +3143,7 @@ s390_expand_cmpmem (target, op0, op1, len) ...@@ -3244,10 +3143,7 @@ s390_expand_cmpmem (target, op0, op1, len)
We need to emit DTP-relative relocations. */ We need to emit DTP-relative relocations. */
void void
s390_output_dwarf_dtprel (file, size, x) s390_output_dwarf_dtprel (FILE *file, int size, rtx x)
FILE *file;
int size;
rtx x;
{ {
switch (size) switch (size)
{ {
...@@ -3269,8 +3165,7 @@ s390_output_dwarf_dtprel (file, size, x) ...@@ -3269,8 +3165,7 @@ s390_output_dwarf_dtprel (file, size, x)
and turn them back into a direct symbol reference. */ and turn them back into a direct symbol reference. */
static rtx static rtx
s390_delegitimize_address (orig_x) s390_delegitimize_address (rtx orig_x)
rtx orig_x;
{ {
rtx x = orig_x, y; rtx x = orig_x, y;
...@@ -3306,7 +3201,7 @@ s390_delegitimize_address (orig_x) ...@@ -3306,7 +3201,7 @@ s390_delegitimize_address (orig_x)
so that we can print its name in local-dynamic base patterns. */ so that we can print its name in local-dynamic base patterns. */
static const char * static const char *
get_some_local_dynamic_name () get_some_local_dynamic_name (void)
{ {
rtx insn; rtx insn;
...@@ -3322,9 +3217,7 @@ get_some_local_dynamic_name () ...@@ -3322,9 +3217,7 @@ get_some_local_dynamic_name ()
} }
static int static int
get_some_local_dynamic_name_1 (px, data) get_some_local_dynamic_name_1 (rtx *px, void *data ATTRIBUTE_UNUSED)
rtx *px;
void *data ATTRIBUTE_UNUSED;
{ {
rtx x = *px; rtx x = *px;
...@@ -3348,9 +3241,7 @@ get_some_local_dynamic_name_1 (px, data) ...@@ -3348,9 +3241,7 @@ get_some_local_dynamic_name_1 (px, data)
stdio stream FILE. */ stdio stream FILE. */
void void
s390_output_symbolic_const (file, x) s390_output_symbolic_const (FILE *file, rtx x)
FILE *file;
rtx x;
{ {
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
...@@ -3388,7 +3279,7 @@ s390_output_symbolic_const (file, x) ...@@ -3388,7 +3279,7 @@ s390_output_symbolic_const (file, x)
s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
fprintf (file, "-"); fprintf (file, "-");
s390_output_symbolic_const (file, cfun->machine->literal_pool_label); s390_output_symbolic_const (file, cfun->machine->literal_pool_label);
break; break;
case UNSPEC_GOTENT: case UNSPEC_GOTENT:
s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
fprintf (file, "@GOTENT"); fprintf (file, "@GOTENT");
...@@ -3449,9 +3340,7 @@ s390_output_symbolic_const (file, x) ...@@ -3449,9 +3340,7 @@ s390_output_symbolic_const (file, x)
stdio stream FILE. */ stdio stream FILE. */
void void
print_operand_address (file, addr) print_operand_address (FILE *file, rtx addr)
FILE *file;
rtx addr;
{ {
struct s390_address ad; struct s390_address ad;
...@@ -3489,10 +3378,7 @@ print_operand_address (file, addr) ...@@ -3489,10 +3378,7 @@ print_operand_address (file, addr)
'h': print integer X as if it's a signed word. */ 'h': print integer X as if it's a signed word. */
void void
print_operand (file, x, code) print_operand (FILE *file, rtx x, int code)
FILE *file;
rtx x;
int code;
{ {
switch (code) switch (code)
{ {
...@@ -3629,10 +3515,7 @@ print_operand (file, x, code) ...@@ -3629,10 +3515,7 @@ print_operand (file, x, code)
handle values smaller than INT_MIN when printed in decimal. */ handle values smaller than INT_MIN when printed in decimal. */
static bool static bool
s390_assemble_integer (x, size, aligned_p) s390_assemble_integer (rtx x, unsigned int size, int aligned_p)
rtx x;
unsigned int size;
int aligned_p;
{ {
if (size == 8 && aligned_p if (size == 8 && aligned_p
&& GET_CODE (x) == CONST_INT && INTVAL (x) < INT_MIN) && GET_CODE (x) == CONST_INT && INTVAL (x) < INT_MIN)
...@@ -3648,9 +3531,7 @@ s390_assemble_integer (x, size, aligned_p) ...@@ -3648,9 +3531,7 @@ s390_assemble_integer (x, size, aligned_p)
a memory address in expression X. */ a memory address in expression X. */
static int static int
reg_used_in_mem_p (regno, x) reg_used_in_mem_p (int regno, rtx x)
int regno;
rtx x;
{ {
enum rtx_code code = GET_CODE (x); enum rtx_code code = GET_CODE (x);
int i, j; int i, j;
...@@ -3689,9 +3570,7 @@ reg_used_in_mem_p (regno, x) ...@@ -3689,9 +3570,7 @@ reg_used_in_mem_p (regno, x)
used by instruction INSN to address memory. */ used by instruction INSN to address memory. */
static int static int
addr_generation_dependency_p (dep_rtx, insn) addr_generation_dependency_p (rtx dep_rtx, rtx insn)
rtx dep_rtx;
rtx insn;
{ {
rtx target, pat; rtx target, pat;
...@@ -3734,9 +3613,7 @@ addr_generation_dependency_p (dep_rtx, insn) ...@@ -3734,9 +3613,7 @@ addr_generation_dependency_p (dep_rtx, insn)
/* Return 1, if dep_insn sets register used in insn in the agen unit. */ /* Return 1, if dep_insn sets register used in insn in the agen unit. */
int int
s390_agen_dep_p(dep_insn, insn) s390_agen_dep_p (rtx dep_insn, rtx insn)
rtx dep_insn;
rtx insn;
{ {
rtx dep_rtx = PATTERN (dep_insn); rtx dep_rtx = PATTERN (dep_insn);
int i; int i;
...@@ -3767,11 +3644,7 @@ s390_agen_dep_p(dep_insn, insn) ...@@ -3767,11 +3644,7 @@ s390_agen_dep_p(dep_insn, insn)
be used by introducing only a one cycle stall on the pipeline. */ be used by introducing only a one cycle stall on the pipeline. */
static int static int
s390_adjust_cost (insn, link, dep_insn, cost) s390_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
rtx insn;
rtx link;
rtx dep_insn;
int cost;
{ {
rtx dep_rtx; rtx dep_rtx;
int i; int i;
...@@ -3825,9 +3698,7 @@ s390_adjust_cost (insn, link, dep_insn, cost) ...@@ -3825,9 +3698,7 @@ s390_adjust_cost (insn, link, dep_insn, cost)
in order to use the bypass. */ in order to use the bypass. */
static int static int
s390_adjust_priority (insn, priority) s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
rtx insn ATTRIBUTE_UNUSED;
int priority;
{ {
if (! INSN_P (insn)) if (! INSN_P (insn))
return priority; return priority;
...@@ -3853,7 +3724,7 @@ s390_adjust_priority (insn, priority) ...@@ -3853,7 +3724,7 @@ s390_adjust_priority (insn, priority)
/* The number of instructions that can be issued per cycle. */ /* The number of instructions that can be issued per cycle. */
static int static int
s390_issue_rate () s390_issue_rate (void)
{ {
if (s390_tune == PROCESSOR_2084_Z990) if (s390_tune == PROCESSOR_2084_Z990)
return 3; return 3;
...@@ -3864,7 +3735,7 @@ s390_issue_rate () ...@@ -3864,7 +3735,7 @@ s390_issue_rate ()
insn scheduler. */ insn scheduler. */
static int static int
s390_use_dfa_pipeline_interface () s390_use_dfa_pipeline_interface (void)
{ {
if (s390_tune == PROCESSOR_2064_Z900 if (s390_tune == PROCESSOR_2064_Z900
|| s390_tune == PROCESSOR_2084_Z990) || s390_tune == PROCESSOR_2084_Z990)
...@@ -3874,7 +3745,7 @@ s390_use_dfa_pipeline_interface () ...@@ -3874,7 +3745,7 @@ s390_use_dfa_pipeline_interface ()
} }
static int static int
s390_first_cycle_multipass_dfa_lookahead () s390_first_cycle_multipass_dfa_lookahead (void)
{ {
return s390_use_dfa_pipeline_interface () ? 4 : 0; return s390_use_dfa_pipeline_interface () ? 4 : 0;
} }
...@@ -3883,12 +3754,11 @@ s390_first_cycle_multipass_dfa_lookahead () ...@@ -3883,12 +3754,11 @@ s390_first_cycle_multipass_dfa_lookahead ()
Triggers default sort algorithm to better slot instructions. */ Triggers default sort algorithm to better slot instructions. */
static int static int
s390_sched_reorder2 (dump, sched_verbose, ready, pn_ready, clock_var) s390_sched_reorder2 (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED,
int sched_verbose ATTRIBUTE_UNUSED; rtx *ready ATTRIBUTE_UNUSED,
rtx *ready ATTRIBUTE_UNUSED; int *pn_ready ATTRIBUTE_UNUSED,
int *pn_ready ATTRIBUTE_UNUSED; int clock_var ATTRIBUTE_UNUSED)
int clock_var ATTRIBUTE_UNUSED;
{ {
return s390_issue_rate(); return s390_issue_rate();
} }
...@@ -3902,9 +3772,7 @@ s390_sched_reorder2 (dump, sched_verbose, ready, pn_ready, clock_var) ...@@ -3902,9 +3772,7 @@ s390_sched_reorder2 (dump, sched_verbose, ready, pn_ready, clock_var)
done, TEMP_USED is set to true. */ done, TEMP_USED is set to true. */
static int static int
s390_split_branches (temp_reg, temp_used) s390_split_branches (rtx temp_reg, bool *temp_used)
rtx temp_reg;
bool *temp_used;
{ {
int new_literal = 0; int new_literal = 0;
rtx insn, pat, tmp, target; rtx insn, pat, tmp, target;
...@@ -3996,9 +3864,7 @@ s390_split_branches (temp_reg, temp_used) ...@@ -3996,9 +3864,7 @@ s390_split_branches (temp_reg, temp_used)
by the caller before calling this routine. */ by the caller before calling this routine. */
static void static void
find_constant_pool_ref (x, ref) find_constant_pool_ref (rtx x, rtx *ref)
rtx x;
rtx *ref;
{ {
int i, j; int i, j;
const char *fmt; const char *fmt;
...@@ -4036,10 +3902,7 @@ find_constant_pool_ref (x, ref) ...@@ -4036,10 +3902,7 @@ find_constant_pool_ref (x, ref)
in X by the address ADDR. Fix up MEMs as required. */ in X by the address ADDR. Fix up MEMs as required. */
static void static void
replace_constant_pool_ref (x, ref, addr) replace_constant_pool_ref (rtx *x, rtx ref, rtx addr)
rtx *x;
rtx ref;
rtx addr;
{ {
int i, j; int i, j;
const char *fmt; const char *fmt;
...@@ -4110,8 +3973,7 @@ replace_constant_pool_ref (x, ref, addr) ...@@ -4110,8 +3973,7 @@ replace_constant_pool_ref (x, ref, addr)
Return its constant pool symbol if found, NULL_RTX otherwise. */ Return its constant pool symbol if found, NULL_RTX otherwise. */
static rtx static rtx
find_ltrel_base (x) find_ltrel_base (rtx x)
rtx x;
{ {
int i, j; int i, j;
const char *fmt; const char *fmt;
...@@ -4146,9 +4008,7 @@ find_ltrel_base (x) ...@@ -4146,9 +4008,7 @@ find_ltrel_base (x)
/* Replace any occurrence of UNSPEC_LTREL_BASE in X with BASE. */ /* Replace any occurrence of UNSPEC_LTREL_BASE in X with BASE. */
static void static void
replace_ltrel_base (x, base) replace_ltrel_base (rtx *x, rtx base)
rtx *x;
rtx base;
{ {
int i, j; int i, j;
const char *fmt; const char *fmt;
...@@ -4191,11 +4051,7 @@ enum machine_mode constant_modes[NR_C_MODES] = ...@@ -4191,11 +4051,7 @@ enum machine_mode constant_modes[NR_C_MODES] =
rtx (*gen_consttable[NR_C_MODES])(rtx) = rtx (*gen_consttable[NR_C_MODES])(rtx) =
{ {
gen_consttable_ti, gen_consttable_ti, gen_consttable_df, gen_consttable_di, gen_consttable_sf, gen_consttable_si, gen_consttable_hi, gen_consttable_qi
gen_consttable_df, gen_consttable_di,
gen_consttable_sf, gen_consttable_si,
gen_consttable_hi,
gen_consttable_qi
}; };
struct constant struct constant
...@@ -4217,26 +4073,24 @@ struct constant_pool ...@@ -4217,26 +4073,24 @@ struct constant_pool
int size; int size;
}; };
static struct constant_pool * s390_chunkify_start PARAMS ((void)); static struct constant_pool * s390_chunkify_start (void);
static void s390_chunkify_finish PARAMS ((struct constant_pool *)); static void s390_chunkify_finish (struct constant_pool *);
static void s390_chunkify_cancel PARAMS ((struct constant_pool *)); static void s390_chunkify_cancel (struct constant_pool *);
static struct constant_pool *s390_start_pool PARAMS ((struct constant_pool **, rtx)); static struct constant_pool *s390_start_pool (struct constant_pool **, rtx);
static void s390_end_pool PARAMS ((struct constant_pool *, rtx)); static void s390_end_pool (struct constant_pool *, rtx);
static void s390_add_pool_insn PARAMS ((struct constant_pool *, rtx)); static void s390_add_pool_insn (struct constant_pool *, rtx);
static struct constant_pool *s390_find_pool PARAMS ((struct constant_pool *, rtx)); static struct constant_pool *s390_find_pool (struct constant_pool *, rtx);
static void s390_add_constant PARAMS ((struct constant_pool *, rtx, enum machine_mode)); static void s390_add_constant (struct constant_pool *, rtx, enum machine_mode);
static rtx s390_find_constant PARAMS ((struct constant_pool *, rtx, enum machine_mode)); static rtx s390_find_constant (struct constant_pool *, rtx, enum machine_mode);
static rtx s390_dump_pool PARAMS ((struct constant_pool *)); static rtx s390_dump_pool (struct constant_pool *);
static void s390_free_pool PARAMS ((struct constant_pool *)); static void s390_free_pool (struct constant_pool *);
/* Create new constant pool covering instructions starting at INSN /* Create new constant pool covering instructions starting at INSN
and chain it to the end of POOL_LIST. */ and chain it to the end of POOL_LIST. */
static struct constant_pool * static struct constant_pool *
s390_start_pool (pool_list, insn) s390_start_pool (struct constant_pool **pool_list, rtx insn)
struct constant_pool **pool_list;
rtx insn;
{ {
struct constant_pool *pool, **prev; struct constant_pool *pool, **prev;
int i; int i;
...@@ -4263,9 +4117,7 @@ s390_start_pool (pool_list, insn) ...@@ -4263,9 +4117,7 @@ s390_start_pool (pool_list, insn)
placeholder insn representing the pool. */ placeholder insn representing the pool. */
static void static void
s390_end_pool (pool, insn) s390_end_pool (struct constant_pool *pool, rtx insn)
struct constant_pool *pool;
rtx insn;
{ {
rtx pool_size = GEN_INT (pool->size + 8 /* alignment slop */); rtx pool_size = GEN_INT (pool->size + 8 /* alignment slop */);
...@@ -4279,9 +4131,7 @@ s390_end_pool (pool, insn) ...@@ -4279,9 +4131,7 @@ s390_end_pool (pool, insn)
/* Add INSN to the list of insns covered by POOL. */ /* Add INSN to the list of insns covered by POOL. */
static void static void
s390_add_pool_insn (pool, insn) s390_add_pool_insn (struct constant_pool *pool, rtx insn)
struct constant_pool *pool;
rtx insn;
{ {
bitmap_set_bit (pool->insns, INSN_UID (insn)); bitmap_set_bit (pool->insns, INSN_UID (insn));
} }
...@@ -4289,9 +4139,7 @@ s390_add_pool_insn (pool, insn) ...@@ -4289,9 +4139,7 @@ s390_add_pool_insn (pool, insn)
/* Return pool out of POOL_LIST that covers INSN. */ /* Return pool out of POOL_LIST that covers INSN. */
static struct constant_pool * static struct constant_pool *
s390_find_pool (pool_list, insn) s390_find_pool (struct constant_pool *pool_list, rtx insn)
struct constant_pool *pool_list;
rtx insn;
{ {
struct constant_pool *pool; struct constant_pool *pool;
...@@ -4305,10 +4153,7 @@ s390_find_pool (pool_list, insn) ...@@ -4305,10 +4153,7 @@ s390_find_pool (pool_list, insn)
/* Add constant VAL of mode MODE to the constant pool POOL. */ /* Add constant VAL of mode MODE to the constant pool POOL. */
static void static void
s390_add_constant (pool, val, mode) s390_add_constant (struct constant_pool *pool, rtx val, enum machine_mode mode)
struct constant_pool *pool;
rtx val;
enum machine_mode mode;
{ {
struct constant *c; struct constant *c;
int i; int i;
...@@ -4339,10 +4184,8 @@ s390_add_constant (pool, val, mode) ...@@ -4339,10 +4184,8 @@ s390_add_constant (pool, val, mode)
the pool to the location of the new constant. */ the pool to the location of the new constant. */
static rtx static rtx
s390_find_constant (pool, val, mode) s390_find_constant (struct constant_pool *pool, rtx val,
struct constant_pool *pool; enum machine_mode mode)
rtx val;
enum machine_mode mode;
{ {
struct constant *c; struct constant *c;
rtx offset; rtx offset;
...@@ -4370,8 +4213,7 @@ s390_find_constant (pool, val, mode) ...@@ -4370,8 +4213,7 @@ s390_find_constant (pool, val, mode)
/* Dump out the constants in POOL. */ /* Dump out the constants in POOL. */
static rtx static rtx
s390_dump_pool (pool) s390_dump_pool (struct constant_pool *pool)
struct constant_pool *pool;
{ {
struct constant *c; struct constant *c;
rtx insn; rtx insn;
...@@ -4401,7 +4243,7 @@ s390_dump_pool (pool) ...@@ -4401,7 +4243,7 @@ s390_dump_pool (pool)
&& XVECLEN (XEXP (value, 0), 0) == 1) && XVECLEN (XEXP (value, 0), 0) == 1)
{ {
value = gen_rtx_MINUS (Pmode, XVECEXP (XEXP (value, 0), 0, 0), value = gen_rtx_MINUS (Pmode, XVECEXP (XEXP (value, 0), 0, 0),
gen_rtx_LABEL_REF (VOIDmode, pool->label)); gen_rtx_LABEL_REF (VOIDmode, pool->label));
value = gen_rtx_CONST (VOIDmode, value); value = gen_rtx_CONST (VOIDmode, value);
} }
...@@ -4431,8 +4273,7 @@ s390_dump_pool (pool) ...@@ -4431,8 +4273,7 @@ s390_dump_pool (pool)
/* Free all memory used by POOL. */ /* Free all memory used by POOL. */
static void static void
s390_free_pool (pool) s390_free_pool (struct constant_pool *pool)
struct constant_pool *pool;
{ {
int i; int i;
...@@ -4468,7 +4309,7 @@ s390_chunkify_start (void) ...@@ -4468,7 +4309,7 @@ s390_chunkify_start (void)
rtx pending_ltrel = NULL_RTX; rtx pending_ltrel = NULL_RTX;
rtx insn; rtx insn;
rtx (*gen_reload_base) PARAMS ((rtx, rtx)) = rtx (*gen_reload_base) (rtx, rtx) =
TARGET_64BIT? gen_reload_base_64 : gen_reload_base_31; TARGET_64BIT? gen_reload_base_64 : gen_reload_base_31;
...@@ -4551,7 +4392,7 @@ s390_chunkify_start (void) ...@@ -4551,7 +4392,7 @@ s390_chunkify_start (void)
else else
{ {
int chunk_size = INSN_ADDRESSES (INSN_UID (insn)) int chunk_size = INSN_ADDRESSES (INSN_UID (insn))
- INSN_ADDRESSES (INSN_UID (curr_pool->first_insn)) - INSN_ADDRESSES (INSN_UID (curr_pool->first_insn))
+ extra_size; + extra_size;
/* We will later have to insert base register reload insns. /* We will later have to insert base register reload insns.
...@@ -4590,7 +4431,7 @@ s390_chunkify_start (void) ...@@ -4590,7 +4431,7 @@ s390_chunkify_start (void)
if (pending_ltrel) if (pending_ltrel)
continue; continue;
label = gen_label_rtx (); label = gen_label_rtx ();
jump = emit_jump_insn_after (gen_jump (label), insn); jump = emit_jump_insn_after (gen_jump (label), insn);
barrier = emit_barrier_after (jump); barrier = emit_barrier_after (jump);
insn = emit_label_after (label, barrier); insn = emit_label_after (label, barrier);
...@@ -4728,8 +4569,7 @@ s390_chunkify_start (void) ...@@ -4728,8 +4569,7 @@ s390_chunkify_start (void)
all changes to the current function as required. */ all changes to the current function as required. */
static void static void
s390_chunkify_finish (pool_list) s390_chunkify_finish (struct constant_pool *pool_list)
struct constant_pool *pool_list;
{ {
rtx base_reg = gen_rtx_REG (Pmode, BASE_REGISTER); rtx base_reg = gen_rtx_REG (Pmode, BASE_REGISTER);
struct constant_pool *curr_pool = NULL; struct constant_pool *curr_pool = NULL;
...@@ -4782,8 +4622,7 @@ s390_chunkify_finish (pool_list) ...@@ -4782,8 +4622,7 @@ s390_chunkify_finish (pool_list)
to the current function that were done by s390_chunkify_start. */ to the current function that were done by s390_chunkify_start. */
static void static void
s390_chunkify_cancel (pool_list) s390_chunkify_cancel (struct constant_pool *pool_list)
struct constant_pool *pool_list;
{ {
struct constant_pool *curr_pool = NULL; struct constant_pool *curr_pool = NULL;
rtx insn; rtx insn;
...@@ -4849,9 +4688,7 @@ int s390_nr_constants; ...@@ -4849,9 +4688,7 @@ int s390_nr_constants;
/* Output main constant pool to stdio stream FILE. */ /* Output main constant pool to stdio stream FILE. */
void void
s390_output_constant_pool (start_label, end_label) s390_output_constant_pool (rtx start_label, rtx end_label)
rtx start_label;
rtx end_label;
{ {
if (TARGET_64BIT) if (TARGET_64BIT)
{ {
...@@ -4887,8 +4724,7 @@ s390_output_constant_pool (start_label, end_label) ...@@ -4887,8 +4724,7 @@ s390_output_constant_pool (start_label, end_label)
machine dependent reorg. */ machine dependent reorg. */
static void static void
s390_optimize_prolog (temp_regno) s390_optimize_prolog (int temp_regno)
int temp_regno;
{ {
int save_first, save_last, restore_first, restore_last; int save_first, save_last, restore_first, restore_last;
int i, j; int i, j;
...@@ -5039,8 +4875,7 @@ s390_optimize_prolog (temp_regno) ...@@ -5039,8 +4875,7 @@ s390_optimize_prolog (temp_regno)
Return true if any such insn was found. */ Return true if any such insn was found. */
static bool static bool
s390_fixup_clobbered_return_reg (return_reg) s390_fixup_clobbered_return_reg (rtx return_reg)
rtx return_reg;
{ {
bool replacement_done = 0; bool replacement_done = 0;
rtx insn; rtx insn;
...@@ -5092,7 +4927,7 @@ s390_fixup_clobbered_return_reg (return_reg) ...@@ -5092,7 +4927,7 @@ s390_fixup_clobbered_return_reg (return_reg)
/* Perform machine-dependent processing. */ /* Perform machine-dependent processing. */
static void static void
s390_reorg () s390_reorg (void)
{ {
bool fixed_up_clobbered_return_reg = 0; bool fixed_up_clobbered_return_reg = 0;
rtx temp_reg = gen_rtx_REG (Pmode, RETURN_REGNUM); rtx temp_reg = gen_rtx_REG (Pmode, RETURN_REGNUM);
...@@ -5182,9 +5017,7 @@ s390_reorg () ...@@ -5182,9 +5017,7 @@ s390_reorg ()
frame pointer of that frame. */ frame pointer of that frame. */
rtx rtx
s390_return_addr_rtx (count, frame) s390_return_addr_rtx (int count, rtx frame)
int count;
rtx frame;
{ {
rtx addr; rtx addr;
...@@ -5207,7 +5040,7 @@ s390_return_addr_rtx (count, frame) ...@@ -5207,7 +5040,7 @@ s390_return_addr_rtx (count, frame)
or for holding the return address before epilogue. */ or for holding the return address before epilogue. */
static int static int
find_unused_clobbered_reg () find_unused_clobbered_reg (void)
{ {
int i; int i;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
...@@ -5219,7 +5052,7 @@ find_unused_clobbered_reg () ...@@ -5219,7 +5052,7 @@ find_unused_clobbered_reg ()
/* Fill FRAME with info about frame of current function. */ /* Fill FRAME with info about frame of current function. */
static void static void
s390_frame_info () s390_frame_info (void)
{ {
char gprs_ever_live[16]; char gprs_ever_live[16];
int i, j; int i, j;
...@@ -5288,7 +5121,7 @@ s390_frame_info () ...@@ -5288,7 +5121,7 @@ s390_frame_info ()
initially after prologue. */ initially after prologue. */
int int
s390_arg_frame_offset () s390_arg_frame_offset (void)
{ {
HOST_WIDE_INT fsize = get_frame_size (); HOST_WIDE_INT fsize = get_frame_size ();
int save_fprs_p, i; int save_fprs_p, i;
...@@ -5319,10 +5152,7 @@ s390_arg_frame_offset () ...@@ -5319,10 +5152,7 @@ s390_arg_frame_offset ()
to register BASE. Return generated insn. */ to register BASE. Return generated insn. */
static rtx static rtx
save_fpr (base, offset, regnum) save_fpr (rtx base, int offset, int regnum)
rtx base;
int offset;
int regnum;
{ {
rtx addr; rtx addr;
addr = gen_rtx_MEM (DFmode, plus_constant (base, offset)); addr = gen_rtx_MEM (DFmode, plus_constant (base, offset));
...@@ -5335,10 +5165,7 @@ save_fpr (base, offset, regnum) ...@@ -5335,10 +5165,7 @@ save_fpr (base, offset, regnum)
to register BASE. Return generated insn. */ to register BASE. Return generated insn. */
static rtx static rtx
restore_fpr (base, offset, regnum) restore_fpr (rtx base, int offset, int regnum)
rtx base;
int offset;
int regnum;
{ {
rtx addr; rtx addr;
addr = gen_rtx_MEM (DFmode, plus_constant (base, offset)); addr = gen_rtx_MEM (DFmode, plus_constant (base, offset));
...@@ -5352,11 +5179,7 @@ restore_fpr (base, offset, regnum) ...@@ -5352,11 +5179,7 @@ restore_fpr (base, offset, regnum)
relative to register BASE. */ relative to register BASE. */
static rtx static rtx
save_gprs (base, offset, first, last) save_gprs (rtx base, int offset, int first, int last)
rtx base;
int offset;
int first;
int last;
{ {
rtx addr, insn, note; rtx addr, insn, note;
int i; int i;
...@@ -5432,11 +5255,7 @@ save_gprs (base, offset, first, last) ...@@ -5432,11 +5255,7 @@ save_gprs (base, offset, first, last)
relative to register BASE. */ relative to register BASE. */
static rtx static rtx
restore_gprs (base, offset, first, last) restore_gprs (rtx base, int offset, int first, int last)
rtx base;
int offset;
int first;
int last;
{ {
rtx addr, insn; rtx addr, insn;
...@@ -5466,8 +5285,7 @@ restore_gprs (base, offset, first, last) ...@@ -5466,8 +5285,7 @@ restore_gprs (base, offset, first, last)
static GTY(()) rtx got_symbol; static GTY(()) rtx got_symbol;
void void
s390_load_got (maybe_dead) s390_load_got (int maybe_dead)
int maybe_dead;
{ {
if (!got_symbol) if (!got_symbol)
{ {
...@@ -5510,7 +5328,7 @@ s390_load_got (maybe_dead) ...@@ -5510,7 +5328,7 @@ s390_load_got (maybe_dead)
/* Expand the prologue into a bunch of separate insns. */ /* Expand the prologue into a bunch of separate insns. */
void void
s390_emit_prologue () s390_emit_prologue (void)
{ {
rtx insn, addr; rtx insn, addr;
rtx temp_reg; rtx temp_reg;
...@@ -5546,7 +5364,7 @@ s390_emit_prologue () ...@@ -5546,7 +5364,7 @@ s390_emit_prologue ()
if (TARGET_64BIT) if (TARGET_64BIT)
insn = emit_insn (gen_literal_pool_64 (gen_rtx_REG (Pmode, BASE_REGISTER), insn = emit_insn (gen_literal_pool_64 (gen_rtx_REG (Pmode, BASE_REGISTER),
pool_start_label, pool_end_label)); pool_start_label, pool_end_label));
else else
insn = emit_insn (gen_literal_pool_31 (gen_rtx_REG (Pmode, BASE_REGISTER), insn = emit_insn (gen_literal_pool_31 (gen_rtx_REG (Pmode, BASE_REGISTER),
pool_start_label, pool_end_label)); pool_start_label, pool_end_label));
...@@ -5605,7 +5423,7 @@ s390_emit_prologue () ...@@ -5605,7 +5423,7 @@ s390_emit_prologue ()
{ {
insn = gen_rtx_SET (VOIDmode, stack_pointer_rtx, insn = gen_rtx_SET (VOIDmode, stack_pointer_rtx,
gen_rtx_PLUS (Pmode, stack_pointer_rtx, gen_rtx_PLUS (Pmode, stack_pointer_rtx,
frame_off)); frame_off));
insn = emit_insn (insn); insn = emit_insn (insn);
} }
else else
...@@ -5706,7 +5524,7 @@ s390_emit_prologue () ...@@ -5706,7 +5524,7 @@ s390_emit_prologue ()
/* Expand the epilogue into a bunch of separate insns. */ /* Expand the epilogue into a bunch of separate insns. */
void void
s390_emit_epilogue () s390_emit_epilogue (void)
{ {
rtx frame_pointer, return_reg; rtx frame_pointer, return_reg;
int area_bottom, area_top, offset = 0; int area_bottom, area_top, offset = 0;
...@@ -5917,9 +5735,7 @@ s390_emit_epilogue () ...@@ -5917,9 +5735,7 @@ s390_emit_epilogue ()
MODE must be specified. */ MODE must be specified. */
static int static int
s390_function_arg_size (mode, type) s390_function_arg_size (enum machine_mode mode, tree type)
enum machine_mode mode;
tree type;
{ {
if (type) if (type)
return int_size_in_bytes (type); return int_size_in_bytes (type);
...@@ -5936,9 +5752,7 @@ s390_function_arg_size (mode, type) ...@@ -5936,9 +5752,7 @@ s390_function_arg_size (mode, type)
is to be passed in a floating-point register, if available. */ is to be passed in a floating-point register, if available. */
static bool static bool
s390_function_arg_float (mode, type) s390_function_arg_float (enum machine_mode mode, tree type)
enum machine_mode mode;
tree type;
{ {
/* Soft-float changes the ABI: no floating-point registers are used. */ /* Soft-float changes the ABI: no floating-point registers are used. */
if (TARGET_SOFT_FLOAT) if (TARGET_SOFT_FLOAT)
...@@ -5981,9 +5795,7 @@ s390_function_arg_float (mode, type) ...@@ -5981,9 +5795,7 @@ s390_function_arg_float (mode, type)
reference. */ reference. */
int int
s390_function_arg_pass_by_reference (mode, type) s390_function_arg_pass_by_reference (enum machine_mode mode, tree type)
enum machine_mode mode;
tree type;
{ {
int size = s390_function_arg_size (mode, type); int size = s390_function_arg_size (mode, type);
...@@ -6008,11 +5820,8 @@ s390_function_arg_pass_by_reference (mode, type) ...@@ -6008,11 +5820,8 @@ s390_function_arg_pass_by_reference (mode, type)
matching an ellipsis). */ matching an ellipsis). */
void void
s390_function_arg_advance (cum, mode, type, named) s390_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
CUMULATIVE_ARGS *cum; tree type, int named ATTRIBUTE_UNUSED)
enum machine_mode mode;
tree type;
int named ATTRIBUTE_UNUSED;
{ {
if (s390_function_arg_pass_by_reference (mode, type)) if (s390_function_arg_pass_by_reference (mode, type))
{ {
...@@ -6049,11 +5858,8 @@ s390_function_arg_advance (cum, mode, type, named) ...@@ -6049,11 +5858,8 @@ s390_function_arg_advance (cum, mode, type, named)
are pushed to the stack. */ are pushed to the stack. */
rtx rtx
s390_function_arg (cum, mode, type, named) s390_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
CUMULATIVE_ARGS *cum; int named ATTRIBUTE_UNUSED)
enum machine_mode mode;
tree type;
int named ATTRIBUTE_UNUSED;
{ {
if (s390_function_arg_pass_by_reference (mode, type)) if (s390_function_arg_pass_by_reference (mode, type))
return 0; return 0;
...@@ -6101,7 +5907,7 @@ s390_function_arg (cum, mode, type, named) ...@@ -6101,7 +5907,7 @@ s390_function_arg (cum, mode, type, named)
area if the function uses variable arguments. */ area if the function uses variable arguments. */
tree tree
s390_build_va_list () s390_build_va_list (void)
{ {
tree f_gpr, f_fpr, f_ovf, f_sav, record, type_decl; tree f_gpr, f_fpr, f_ovf, f_sav, record, type_decl;
...@@ -6151,9 +5957,7 @@ s390_build_va_list () ...@@ -6151,9 +5957,7 @@ s390_build_va_list ()
(relative to the virtual arg pointer). */ (relative to the virtual arg pointer). */
void void
s390_va_start (valist, nextarg) s390_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
tree valist;
rtx nextarg ATTRIBUTE_UNUSED;
{ {
HOST_WIDE_INT n_gpr, n_fpr; HOST_WIDE_INT n_gpr, n_fpr;
int off; int off;
...@@ -6233,9 +6037,7 @@ s390_va_start (valist, nextarg) ...@@ -6233,9 +6037,7 @@ s390_va_start (valist, nextarg)
} */ } */
rtx rtx
s390_va_arg (valist, type) s390_va_arg (tree valist, tree type)
tree valist;
tree type;
{ {
tree f_gpr, f_fpr, f_ovf, f_sav; tree f_gpr, f_fpr, f_ovf, f_sav;
tree gpr, fpr, ovf, sav, reg, t, u; tree gpr, fpr, ovf, sav, reg, t, u;
...@@ -6412,7 +6214,7 @@ static unsigned int const code_for_builtin_31[S390_BUILTIN_max] = { ...@@ -6412,7 +6214,7 @@ static unsigned int const code_for_builtin_31[S390_BUILTIN_max] = {
}; };
static void static void
s390_init_builtins () s390_init_builtins (void)
{ {
tree ftype; tree ftype;
...@@ -6434,12 +6236,9 @@ s390_init_builtins () ...@@ -6434,12 +6236,9 @@ s390_init_builtins ()
IGNORE is nonzero if the value is to be ignored. */ IGNORE is nonzero if the value is to be ignored. */
static rtx static rtx
s390_expand_builtin (exp, target, subtarget, mode, ignore) s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
tree exp; enum machine_mode mode ATTRIBUTE_UNUSED,
rtx target; int ignore ATTRIBUTE_UNUSED)
rtx subtarget ATTRIBUTE_UNUSED;
enum machine_mode mode ATTRIBUTE_UNUSED;
int ignore ATTRIBUTE_UNUSED;
{ {
#define MAX_ARGS 2 #define MAX_ARGS 2
...@@ -6526,8 +6325,7 @@ s390_expand_builtin (exp, target, subtarget, mode, ignore) ...@@ -6526,8 +6325,7 @@ s390_expand_builtin (exp, target, subtarget, mode, ignore)
gpr 0 is used to hold the static chain. */ gpr 0 is used to hold the static chain. */
void void
s390_trampoline_template (file) s390_trampoline_template (FILE *file)
FILE *file;
{ {
if (TARGET_64BIT) if (TARGET_64BIT)
{ {
...@@ -6554,10 +6352,7 @@ s390_trampoline_template (file) ...@@ -6554,10 +6352,7 @@ s390_trampoline_template (file)
CXT is an RTX for the static chain value for the function. */ CXT is an RTX for the static chain value for the function. */
void void
s390_initialize_trampoline (addr, fnaddr, cxt) s390_initialize_trampoline (rtx addr, rtx fnaddr, rtx cxt)
rtx addr;
rtx fnaddr;
rtx cxt;
{ {
emit_move_insn (gen_rtx emit_move_insn (gen_rtx
(MEM, Pmode, (MEM, Pmode,
...@@ -6573,9 +6368,7 @@ s390_initialize_trampoline (addr, fnaddr, cxt) ...@@ -6573,9 +6368,7 @@ s390_initialize_trampoline (addr, fnaddr, cxt)
LOW and HIGH, independent of the host word size. */ LOW and HIGH, independent of the host word size. */
rtx rtx
s390_gen_rtx_const_DI (high, low) s390_gen_rtx_const_DI (int high, int low)
int high;
int low;
{ {
#if HOST_BITS_PER_WIDE_INT >= 64 #if HOST_BITS_PER_WIDE_INT >= 64
HOST_WIDE_INT val; HOST_WIDE_INT val;
...@@ -6597,9 +6390,7 @@ s390_gen_rtx_const_DI (high, low) ...@@ -6597,9 +6390,7 @@ s390_gen_rtx_const_DI (high, low)
for profiling a function entry. */ for profiling a function entry. */
void void
s390_function_profiler (file, labelno) s390_function_profiler (FILE *file, int labelno)
FILE *file;
int labelno;
{ {
rtx op[7]; rtx op[7];
...@@ -6667,10 +6458,9 @@ s390_function_profiler (file, labelno) ...@@ -6667,10 +6458,9 @@ s390_function_profiler (file, labelno)
constants go in the function section; in 64-bit mode in .rodata. */ constants go in the function section; in 64-bit mode in .rodata. */
static void static void
s390_select_rtx_section (mode, x, align) s390_select_rtx_section (enum machine_mode mode ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED; rtx x ATTRIBUTE_UNUSED,
rtx x ATTRIBUTE_UNUSED; unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
{ {
if (TARGET_64BIT) if (TARGET_64BIT)
readonly_data_section (); readonly_data_section ();
...@@ -6682,10 +6472,7 @@ s390_select_rtx_section (mode, x, align) ...@@ -6682,10 +6472,7 @@ s390_select_rtx_section (mode, x, align)
into its SYMBOL_REF_FLAGS. */ into its SYMBOL_REF_FLAGS. */
static void static void
s390_encode_section_info (decl, rtl, first) s390_encode_section_info (tree decl, rtx rtl, int first)
tree decl;
rtx rtl;
int first;
{ {
default_encode_section_info (decl, rtl, first); default_encode_section_info (decl, rtl, first);
...@@ -6703,12 +6490,9 @@ s390_encode_section_info (decl, rtl, first) ...@@ -6703,12 +6490,9 @@ s390_encode_section_info (decl, rtl, first)
relative to the resulting this pointer. */ relative to the resulting this pointer. */
static void static void
s390_output_mi_thunk (file, thunk, delta, vcall_offset, function) s390_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
FILE *file; HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree thunk ATTRIBUTE_UNUSED; tree function)
HOST_WIDE_INT delta;
HOST_WIDE_INT vcall_offset;
tree function;
{ {
rtx op[10]; rtx op[10];
int nonlocal = 0; int nonlocal = 0;
...@@ -6945,8 +6729,7 @@ s390_output_mi_thunk (file, thunk, delta, vcall_offset, function) ...@@ -6945,8 +6729,7 @@ s390_output_mi_thunk (file, thunk, delta, vcall_offset, function)
} }
bool bool
s390_valid_pointer_mode (mode) s390_valid_pointer_mode (enum machine_mode mode)
enum machine_mode mode;
{ {
return (mode == SImode || (TARGET_64BIT && mode == DImode)); return (mode == SImode || (TARGET_64BIT && mode == DImode));
} }
...@@ -6954,7 +6737,7 @@ s390_valid_pointer_mode (mode) ...@@ -6954,7 +6737,7 @@ s390_valid_pointer_mode (mode)
/* How to allocate a 'struct machine_function'. */ /* How to allocate a 'struct machine_function'. */
static struct machine_function * static struct machine_function *
s390_init_machine_status () s390_init_machine_status (void)
{ {
return ggc_alloc_cleared (sizeof (struct machine_function)); return ggc_alloc_cleared (sizeof (struct machine_function));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment