tm.texi (TARGET_ASM_ASSEMBLE_VISIBILITY): Describe.
* doc/tm.texi (TARGET_ASM_ASSEMBLE_VISIBILITY): Describe. * target-def.h (TARGET_ASM_ASSEMBLE_VISIBILITY): Define. (TARGET_ASM_OUT): Add the above here. * target.h (struct gcc_target): Add "visibility" field. * varasm.c (maybe_assemble_visibility): Call targetm visibility func. * config/rs6000/rs6000.c (rs6000_assemble_visibility): New function. (TARGET_ASM_ASSEMBLE_VISIBILITY): Define. (rs6000_legitimize_reload_address, first_reg_to_save): Formatting. From-SVN: r56906
This commit is contained in:
parent
370ce32a02
commit
93638d7a89
6 changed files with 62 additions and 4 deletions
|
@ -1,3 +1,14 @@
|
|||
2002-09-07 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* doc/tm.texi (TARGET_ASM_ASSEMBLE_VISIBILITY): Describe.
|
||||
* target-def.h (TARGET_ASM_ASSEMBLE_VISIBILITY): Define.
|
||||
(TARGET_ASM_OUT): Add the above here.
|
||||
* target.h (struct gcc_target): Add "visibility" field.
|
||||
* varasm.c (maybe_assemble_visibility): Call targetm visibility func.
|
||||
* config/rs6000/rs6000.c (rs6000_assemble_visibility): New function.
|
||||
(TARGET_ASM_ASSEMBLE_VISIBILITY): Define.
|
||||
(rs6000_legitimize_reload_address, first_reg_to_save): Formatting.
|
||||
|
||||
2002-09-06 Ziemowit Laski <zlaski@apple.com>
|
||||
|
||||
* c-lang.c (objc_is_id): New stub.
|
||||
|
|
|
@ -186,6 +186,7 @@ static void toc_hash_mark_table PARAMS ((void *));
|
|||
static int constant_pool_expr_1 PARAMS ((rtx, int *, int *));
|
||||
static struct machine_function * rs6000_init_machine_status PARAMS ((void));
|
||||
static bool rs6000_assemble_integer PARAMS ((rtx, unsigned int, int));
|
||||
static void rs6000_assemble_visibility PARAMS ((tree, const char *));
|
||||
static int rs6000_ra_ever_killed PARAMS ((void));
|
||||
static tree rs6000_handle_longcall_attribute PARAMS ((tree *, tree, tree, int, bool *));
|
||||
const struct attribute_spec rs6000_attribute_table[];
|
||||
|
@ -344,6 +345,11 @@ static const char alt_reg_names[][8] =
|
|||
#undef TARGET_ASM_INTEGER
|
||||
#define TARGET_ASM_INTEGER rs6000_assemble_integer
|
||||
|
||||
#ifdef HAVE_GAS_HIDDEN
|
||||
#undef TARGET_ASM_ASSEMBLE_VISIBILITY
|
||||
#define TARGET_ASM_ASSEMBLE_VISIBILITY rs6000_assemble_visibility
|
||||
#endif
|
||||
|
||||
#undef TARGET_ASM_FUNCTION_PROLOGUE
|
||||
#define TARGET_ASM_FUNCTION_PROLOGUE rs6000_output_function_prologue
|
||||
#undef TARGET_ASM_FUNCTION_EPILOGUE
|
||||
|
@ -2249,7 +2255,7 @@ rs6000_legitimize_reload_address (x, mode, opnum, type, ind_levels, win)
|
|||
&& REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER
|
||||
&& REG_MODE_OK_FOR_BASE_P (XEXP (x, 0), mode)
|
||||
&& GET_CODE (XEXP (x, 1)) == CONST_INT
|
||||
&& !SPE_VECTOR_MODE (mode)
|
||||
&& !SPE_VECTOR_MODE (mode)
|
||||
&& !ALTIVEC_VECTOR_MODE (mode))
|
||||
{
|
||||
HOST_WIDE_INT val = INTVAL (XEXP (x, 1));
|
||||
|
@ -8152,6 +8158,31 @@ rs6000_assemble_integer (x, size, aligned_p)
|
|||
#endif /* RELOCATABLE_NEEDS_FIXUP */
|
||||
return default_assemble_integer (x, size, aligned_p);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GAS_HIDDEN
|
||||
/* Emit an assembler directive to set symbol visibility for DECL to
|
||||
VISIBILITY_TYPE. */
|
||||
|
||||
void
|
||||
rs6000_assemble_visibility (decl, visibility_type)
|
||||
tree decl;
|
||||
const char *visibility_type;
|
||||
{
|
||||
assemble_visibility (decl, visibility_type);
|
||||
|
||||
/* Functions need to have their entry point symbol visibility set as
|
||||
well as their descriptor symbol visibility. */
|
||||
if (DEFAULT_ABI == ABI_AIX && TREE_CODE (decl) == FUNCTION_DECL)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
name = ((* targetm.strip_name_encoding)
|
||||
(IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))));
|
||||
|
||||
fprintf (asm_out_file, "\t.%s\t.%s\n", visibility_type, name);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
enum rtx_code
|
||||
rs6000_reverse_condition (mode, code)
|
||||
|
@ -8787,8 +8818,9 @@ first_reg_to_save ()
|
|||
break;
|
||||
|
||||
#if TARGET_MACHO
|
||||
if (flag_pic && current_function_uses_pic_offset_table &&
|
||||
(first_reg > RS6000_PIC_OFFSET_TABLE_REGNUM))
|
||||
if (flag_pic
|
||||
&& current_function_uses_pic_offset_table
|
||||
&& first_reg > RS6000_PIC_OFFSET_TABLE_REGNUM)
|
||||
return RS6000_PIC_OFFSET_TABLE_REGNUM;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -6663,6 +6663,12 @@ you want to control one-only symbol support with a compiler flag, or if
|
|||
setting the @code{DECL_ONE_ONLY} flag is enough to mark a declaration to
|
||||
be emitted as one-only.
|
||||
|
||||
@deftypefn {Target Hook} void TARGET_ASM_ASSEMBLE_VISIBILITY (tree @var{decl}, const char *@var{visibility})
|
||||
This target hook is a function to output to @var{asm_out_file} some
|
||||
commands that will make the symbol(s) associated with @var{decl} have
|
||||
hidden, protected or internal visibility as specified by @var{visibility}.
|
||||
@end deftypefn
|
||||
|
||||
@findex ASM_OUTPUT_EXTERNAL
|
||||
@item ASM_OUTPUT_EXTERNAL (@var{stream}, @var{decl}, @var{name})
|
||||
A C statement (sans semicolon) to output to the stdio stream
|
||||
|
|
|
@ -58,6 +58,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define TARGET_ASM_GLOBALIZE_LABEL default_globalize_label
|
||||
#endif
|
||||
|
||||
#ifndef TARGET_ASM_ASSEMBLE_VISIBILITY
|
||||
#define TARGET_ASM_ASSEMBLE_VISIBILITY assemble_visibility
|
||||
#endif
|
||||
|
||||
#define TARGET_ASM_FUNCTION_PROLOGUE default_function_pro_epilogue
|
||||
#define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue
|
||||
#define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
|
||||
|
@ -149,6 +153,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
TARGET_ASM_UNALIGNED_INT_OP, \
|
||||
TARGET_ASM_INTEGER, \
|
||||
TARGET_ASM_GLOBALIZE_LABEL, \
|
||||
TARGET_ASM_ASSEMBLE_VISIBILITY, \
|
||||
TARGET_ASM_FUNCTION_PROLOGUE, \
|
||||
TARGET_ASM_FUNCTION_END_PROLOGUE, \
|
||||
TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, \
|
||||
|
|
|
@ -72,6 +72,10 @@ struct gcc_target
|
|||
/* Output code that will globalize a label. */
|
||||
void (* globalize_label) PARAMS ((FILE *, const char *));
|
||||
|
||||
/* Emit an assembler directive to set visibility for the symbol
|
||||
associated with the tree decl. */
|
||||
void (* visibility) PARAMS ((tree, const char *));
|
||||
|
||||
/* Output the assembler code for entry to a function. */
|
||||
void (* function_prologue) PARAMS ((FILE *, HOST_WIDE_INT));
|
||||
|
||||
|
|
|
@ -4624,7 +4624,7 @@ maybe_assemble_visibility (decl)
|
|||
{
|
||||
const char *type
|
||||
= TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (visibility)));
|
||||
assemble_visibility (decl, type);
|
||||
(* targetm.asm_out.visibility) (decl, type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue