system.h (STRIP_NAME_ENCODING): Poison it.

* system.h (STRIP_NAME_ENCODING): Poison it.
	* output.h (STRIP_NAME_ENCODING): Remove.
	(default_strip_name_encoding): Declare.
	* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
	* target.h (strip_name_encoding): New.
	* varasm.c (default_strip_name_encoding): New.

	* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
	config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
	config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
	config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
	config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
	config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
	config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
	config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
	config/v850/v850.h: Use the hook, not the macro.

	* config/darwin-protos.h, config/darwin.c, config/darwin.h,
	config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
	config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
	config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
	config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
	config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
	config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
	config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
	config/v850/v850.c, config/v850/v850.h:
	Move STRIP_NAME_ENCODING to out-of-line function and add
	TARGET_STRIP_NAME_ENCODING.

	* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
	config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
	with TARGET_STRIP_NAME_ENCODING referencing existing function;
	make function static.

	* xcoffout.c: Include target.h
	* Makefile.in (xcoffout.o): Update.

	* config/avr/avr.c (avr_encode_section_info): Correct prototype.
	* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
	* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
	reloc argument unused.
	* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.

	* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
	STRIP_NAME_ENCODING docs.

From-SVN: r53615
This commit is contained in:
Richard Henderson 2002-05-19 00:55:48 -07:00 committed by Richard Henderson
parent ae6ac996cc
commit 772c526579
54 changed files with 430 additions and 404 deletions

View File

@ -1,3 +1,51 @@
2002-05-19 Richard Henderson <rth@redhat.com>
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
2002-05-19 Andreas Jaeger <aj@suse.de>
* gengenrtl.c: Add prototype for excluded_rtx.

View File

@ -1440,7 +1440,7 @@ dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) flags.h $(RTL_H) $(TREE_H) \
vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
output.h vmsdbg.h debug.h langhooks.h
xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) xcoffout.h \
flags.h toplev.h output.h dbxout.h $(GGC_H)
flags.h toplev.h output.h dbxout.h $(GGC_H) $(TARGET_H)
emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
function.h $(REGS_H) insn-config.h $(RECOG_H) real.h $(GGC_H) \
$(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h toplev.h \

View File

@ -119,6 +119,8 @@ static bool alpha_in_small_data_p
PARAMS ((tree));
static void alpha_encode_section_info
PARAMS ((tree, int));
static const char *alpha_strip_name_encoding
PARAMS ((const char *));
static int some_small_symbolic_operand_1
PARAMS ((rtx *, void *));
static int split_small_symbolic_operand_1
@ -212,6 +214,8 @@ static void vms_asm_out_destructor PARAMS ((rtx, int));
#define TARGET_IN_SMALL_DATA_P alpha_in_small_data_p
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO alpha_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING alpha_strip_name_encoding
#if TARGET_ABI_UNICOSMK
static void unicosmk_asm_named_section PARAMS ((const char *, unsigned int));
@ -1708,6 +1712,19 @@ alpha_encode_section_info (decl, first)
}
}
/* Undo the effects of the above. */
static const char *
alpha_strip_name_encoding (str)
const char *str;
{
if (str[0] == '@')
str += 2;
if (str[0] == '*')
str++;
return str;
}
/* legitimate_address_p recognizes an RTL expression that is a valid
memory address for an instruction. The MODE argument is the
machine mode for the MEM expression that wants to use this address.
@ -8599,7 +8616,7 @@ unicosmk_unique_section (decl, reloc)
abort ();
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
STRIP_NAME_ENCODING (name, name);
name = alpha_strip_name_encoding (name);
len = strlen (name);
if (TREE_CODE (decl) == FUNCTION_DECL)
@ -8830,8 +8847,7 @@ unicosmk_ssib_name ()
x = XEXP (x, 0);
if (GET_CODE (x) != SYMBOL_REF)
abort ();
fnname = XSTR (x, 0);
STRIP_NAME_ENCODING (fnname, fnname);
fnname = alpha_strip_name_encoding (XSTR (x, 0));
len = strlen (fnname);
if (len + SSIB_PREFIX_LEN > 255)
@ -9006,7 +9022,7 @@ unicosmk_output_externs (file)
/* We have to strip the encoding and possibly remove user_label_prefix
from the identifier in order to handle -fleading-underscore and
explicit asm names correctly (cf. gcc.dg/asm-names-1.c). */
STRIP_NAME_ENCODING (real_name, p->name);
real_name = alpha_strip_name_encoding (p->name);
if (len && p->name[0] == '*'
&& !memcmp (real_name, user_label_prefix, len))
real_name += len;

View File

@ -1724,15 +1724,6 @@ do { \
#define DATA_SECTION_ASM_OP "\t.data"
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
do { \
(VAR) = (SYMBOL_NAME); \
if ((VAR)[0] == '@') \
(VAR) += 2; \
if ((VAR)[0] == '*') \
(VAR)++; \
} while (0)
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number (see above). */

View File

@ -180,6 +180,9 @@ static void arm_encode_section_info PARAMS ((tree, int));
#define TARGET_ENCODE_SECTION_INFO arm_encode_section_info
#endif
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING arm_strip_name_encoding
struct gcc_target targetm = TARGET_INITIALIZER;
/* Obstack for minipool constant handling. */

View File

@ -1848,12 +1848,6 @@ typedef struct
case '*': return 1; \
SUBTARGET_NAME_ENCODING_LENGTHS
/* This has to be handled by a function because more than part of the
ARM backend uses function name prefixes to encode attributes. */
#undef STRIP_NAME_ENCODING
#define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \
(VAR) = arm_strip_name_encoding (SYMBOL_NAME)
/* This is how to output a reference to a user-level label named NAME.
`assemble_name' uses this. */
#undef ASM_OUTPUT_LABELREF

View File

@ -257,8 +257,7 @@ arm_pe_unique_section (decl, reloc)
const char * prefix;
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
/* Strip off any encoding in fnname. */
STRIP_NAME_ENCODING (name, name);
name = arm_strip_name_encoding (name);
/* The object is put in, for example, section .text$foo.
The linker will then ultimately place them in .text

View File

@ -65,7 +65,7 @@ static bool avr_assemble_integer PARAMS ((rtx, unsigned int, int));
static void avr_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static void avr_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
static void avr_unique_section PARAMS ((tree, int));
extern void avr_encode_section_info PARAMS ((tree, int));
static void avr_encode_section_info PARAMS ((tree, int));
/* Allocate registers from r25 to r8 for parameters for function calls */
#define FIRST_CUM_REG 26
@ -4517,9 +4517,9 @@ avr_unique_section (decl, reloc)
int len;
const char *name, *prefix;
char *string;
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
/* Strip off any encoding in name. */
STRIP_NAME_ENCODING (name, name);
name = (* targetm.strip_name_encoding) (name);
if (TREE_CODE (decl) == FUNCTION_DECL)
{
@ -4770,7 +4770,7 @@ avr_encode_section_info (decl, first)
DECL_SECTION_NAME (decl) = build_string (strlen (dsec), dsec);
TREE_READONLY (decl) = 1;
}
}
}
/* Outputs to the stdio stream FILE some
appropriate text to go at the start of an assembler file. */

View File

@ -1742,12 +1742,6 @@ progmem_section (void) \
This macro is irrelevant if there is no separate readonly data
section. */
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
(VAR) = (SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*' || (SYMBOL_NAME)[0] == '@');
/* `STRIP_NAME_ENCODING (VAR, SYM_NAME)'
Decode SYM_NAME and store the real name part in VAR, sans the
characters that encode section info. */
#define ASM_FILE_START(STREAM) asm_file_start (STREAM)
/* A C expression which outputs to the stdio stream STREAM some
appropriate text to go at the start of an assembler file.

View File

@ -2591,7 +2591,7 @@ cris_asm_output_mi_thunk (stream, thunkdecl, delta, funcdecl)
{
const char *name = XSTR (XEXP (DECL_RTL (funcdecl), 0), 0);
STRIP_NAME_ENCODING (name, name);
name = (* targetm.strip_name_encoding) (name);
fprintf (stream, "add.d ");
assemble_name (stream, name);
fprintf (stream, "%s,$pc\n", CRIS_PLT_PCOFFSET_SUFFIX);
@ -2889,7 +2889,7 @@ restart:
const char *origstr = XSTR (x, 0);
const char *str;
STRIP_NAME_ENCODING (str, origstr);
str = (* targetm.strip_name_encoding) (origstr);
if (is_plt)
{

View File

@ -59,6 +59,7 @@ extern void machopic_define_name PARAMS ((const char*));
extern int machopic_name_defined_p PARAMS ((const char*));
extern int machopic_ident_defined_p PARAMS ((tree));
extern void darwin_encode_section_info PARAMS ((tree, int));
extern const char *darwin_strip_name_encoding PARAMS ((const char *));
#endif /* TREE_CODE */

View File

@ -278,7 +278,7 @@ machopic_non_lazy_ptr_name (name)
return IDENTIFIER_POINTER (TREE_PURPOSE (temp));
}
STRIP_NAME_ENCODING (name, name);
name = darwin_strip_name_encoding (name);
/* Try again, but comparing names this time. */
for (temp = machopic_non_lazy_pointers;
@ -288,7 +288,7 @@ machopic_non_lazy_ptr_name (name)
if (TREE_VALUE (temp))
{
temp_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
STRIP_NAME_ENCODING (temp_name, temp_name);
temp_name = darwin_strip_name_encoding (temp_name);
if (strcmp (name, temp_name) == 0)
return IDENTIFIER_POINTER (TREE_PURPOSE (temp));
}
@ -360,7 +360,7 @@ machopic_stub_name (name)
return IDENTIFIER_POINTER (TREE_PURPOSE (temp));
}
STRIP_NAME_ENCODING (name, name);
name = darwin_strip_name_encoding (name);
{
char *buffer;
@ -414,7 +414,8 @@ machopic_validate_stub_or_non_lazy_ptr (name, validate_stub)
TREE_USED (temp) = 1;
if (TREE_CODE (TREE_VALUE (temp)) == IDENTIFIER_NODE)
TREE_SYMBOL_REFERENCED (TREE_VALUE (temp)) = 1;
STRIP_NAME_ENCODING (real_name, IDENTIFIER_POINTER (TREE_VALUE (temp)));
real_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
real_name = darwin_strip_name_encoding (real_name);
id2 = maybe_get_identifier (real_name);
if (id2)
TREE_SYMBOL_REFERENCED (id2) = 1;
@ -846,7 +847,7 @@ machopic_finish (asm_out_file)
if (sym_name[0] == '!' && sym_name[1] == 'T')
continue;
STRIP_NAME_ENCODING (sym_name, sym_name);
sym_name = darwin_strip_name_encoding (sym_name);
sym = alloca (strlen (sym_name) + 2);
if (sym_name[0] == '*' || sym_name[0] == '&')
@ -1015,6 +1016,15 @@ darwin_encode_section_info (decl, first)
update_stubs (XSTR (sym_ref, 0));
}
/* Undo the effects of the above. */
const char *
darwin_strip_name_encoding (str)
const char *str;
{
return str[0] == '!' ? str + 4 : str;
}
/* Scan the list of non-lazy pointers and update any recorded names whose
stripped name matches the argument. */
@ -1025,7 +1035,7 @@ update_non_lazy_ptrs (name)
const char *name1, *name2;
tree temp;
STRIP_NAME_ENCODING (name1, name);
name1 = darwin_strip_name_encoding (name);
for (temp = machopic_non_lazy_pointers;
temp != NULL_TREE;
@ -1035,7 +1045,7 @@ update_non_lazy_ptrs (name)
if (*sym_name == '!')
{
STRIP_NAME_ENCODING (name2, sym_name);
name2 = darwin_strip_name_encoding (sym_name);
if (strcmp (name1, name2) == 0)
{
IDENTIFIER_POINTER (TREE_VALUE (temp)) = name;
@ -1089,7 +1099,7 @@ update_stubs (name)
const char *name1, *name2;
tree temp;
STRIP_NAME_ENCODING (name1, name);
name1 = darwin_strip_name_encoding (name);
for (temp = machopic_stubs;
temp != NULL_TREE;
@ -1099,7 +1109,7 @@ update_stubs (name)
if (*sym_name == '!')
{
STRIP_NAME_ENCODING (name2, sym_name);
name2 = darwin_strip_name_encoding (sym_name);
if (strcmp (name1, name2) == 0)
{
IDENTIFIER_POINTER (TREE_VALUE (temp)) = name;

View File

@ -235,28 +235,28 @@ do { text_section (); \
Make Objective-C internal symbols local. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
do { \
STRIP_NAME_ENCODING (NAME, NAME); \
if (NAME[0] == '&' || NAME[0] == '*') \
{ \
int len = strlen (NAME); \
if (len > 6 && !strcmp ("$stub", NAME + len - 5)) \
machopic_validate_stub_or_non_lazy_ptr (NAME, 1); \
else if (len > 7 && !strcmp ("$stub\"", NAME + len - 6)) \
machopic_validate_stub_or_non_lazy_ptr (NAME, 1); \
else if (len > 14 && !strcmp ("$non_lazy_ptr", NAME + len - 13)) \
machopic_validate_stub_or_non_lazy_ptr (NAME, 0); \
fputs (&NAME[1], FILE); \
} \
else if (NAME[0] == '+' || NAME[0] == '-') \
fprintf (FILE, "\"%s\"", NAME); \
else if (!strncmp (NAME, "_OBJC_", 6)) \
fprintf (FILE, "L%s", NAME); \
else if (!strncmp (NAME, ".objc_class_name_", 17)) \
fprintf (FILE, "%s", NAME); \
else \
fprintf (FILE, "_%s", NAME); \
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
do { \
const char *xname = darwin_strip_name_encoding (NAME); \
if (xname[0] == '&' || xname[0] == '*') \
{ \
int len = strlen (xname); \
if (len > 6 && !strcmp ("$stub", xname + len - 5)) \
machopic_validate_stub_or_non_lazy_ptr (xname, 1); \
else if (len > 7 && !strcmp ("$stub\"", xname + len - 6)) \
machopic_validate_stub_or_non_lazy_ptr (xname, 1); \
else if (len > 14 && !strcmp ("$non_lazy_ptr", xname + len - 13)) \
machopic_validate_stub_or_non_lazy_ptr (xname, 0); \
fputs (&xname[1], FILE); \
} \
else if (xname[0] == '+' || xname[0] == '-') \
fprintf (FILE, "\"%s\"", xname); \
else if (!strncmp (xname, "_OBJC_", 6)) \
fprintf (FILE, "L%s", xname); \
else if (!strncmp (xname, ".objc_class_name_", 17)) \
fprintf (FILE, "%s", xname); \
else \
fprintf (FILE, "_%s", xname); \
} while (0)
#undef ALIGN_ASM_OP
@ -553,9 +553,7 @@ enum machopic_addr_class {
#define MACHOPIC_PURE (flag_pic == 2)
#define TARGET_ENCODE_SECTION_INFO darwin_encode_section_info
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
((VAR) = ((SYMBOL_NAME[0] == '!') ? (SYMBOL_NAME) + 4 : (SYMBOL_NAME)))
#define TARGET_STRIP_NAME_ENCODING darwin_strip_name_encoding
#define GEN_BINDER_NAME_FOR_STUB(BUF,STUB,STUB_LENGTH) \
do { \
@ -591,12 +589,11 @@ enum machopic_addr_class {
#define GEN_LAZY_PTR_NAME_FOR_SYMBOL(BUF,SYMBOL,SYMBOL_LENGTH) \
do { \
const char *symbol_ = (SYMBOL); \
const char *symbol_ = darwin_strip_name_encoding (SYMBOL); \
char *buffer_ = (BUF); \
STRIP_NAME_ENCODING (symbol_, symbol_); \
if (symbol_[0] == '"') \
{ \
strcpy (buffer_, "\"L"); \
strcpy (buffer_, "\"L"); \
strcpy (buffer_ + 2, symbol_ + 1); \
strcpy (buffer_ + (SYMBOL_LENGTH), "$lazy_ptr\""); \
} \

View File

@ -66,6 +66,7 @@ static void h8300_asm_named_section PARAMS ((const char *, unsigned int));
#endif
static void h8300_encode_label PARAMS ((tree));
static void h8300_encode_section_info PARAMS ((tree, int));
static const char *h8300_strip_name_encoding PARAMS ((const char *));
/* CPU_TYPE, says what cpu we're compiling for. */
int cpu_type;
@ -115,6 +116,8 @@ const char *h8_push_op, *h8_pop_op, *h8_mov_op;
#define TARGET_ASM_FUNCTION_EPILOGUE h8300_output_function_epilogue
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO h8300_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING h8300_strip_name_encoding
struct gcc_target targetm = TARGET_INITIALIZER;
@ -3477,6 +3480,15 @@ h8300_encode_section_info (decl, first)
}
}
/* Undo the effects of the above. */
static const char *
h8300_strip_name_encoding (str)
const char *str;
{
return str + (*str == '*' || *str == '@' || *str == '&');
}
const char *
output_simode_bld (bild, operands)
int bild;

View File

@ -1096,13 +1096,6 @@ struct cum_arg
#define TINY_DATA_NAME_P(NAME) (*(NAME) == '&')
/* Store the user-specified part of SYMBOL_NAME in VAR.
This is sort of inverse to targetm.encode_section_info. */
#define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \
(VAR) = (SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*' \
|| (SYMBOL_NAME)[0] == '@' \
|| (SYMBOL_NAME)[0] == '&');
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number (see above). */

View File

@ -255,45 +255,16 @@ do { \
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. */
extern void i386_pe_encode_section_info PARAMS ((TREE, int));
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info
/* Utility used only in this file. */
#define I386_PE_STRIP_ENCODING(SYM_NAME) \
((SYM_NAME) + ((SYM_NAME)[0] == '@' \
? ((SYM_NAME)[3] == '*' ? 4 : 3) : 0) \
+ ((SYM_NAME)[0] == '*' ? 1 : 0))
/* This macro gets just the user-specified name
out of the string in a SYMBOL_REF. Discard
trailing @[NUM] encoded by targetm.encode_section_info. */
#undef STRIP_NAME_ENCODING
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
do { \
const char *_p; \
const char *_name = I386_PE_STRIP_ENCODING (SYMBOL_NAME); \
for (_p = _name; *_p && *_p != '@'; ++_p) \
; \
if (*_p == '@') \
{ \
int _len = _p - _name; \
char *_new_name = (char *) alloca (_len + 1); \
strncpy (_new_name, _name, _len); \
_new_name[_len] = '\0'; \
(VAR) = _new_name; \
} \
else \
(VAR) = _name; \
} while (0)
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING i386_pe_strip_name_encoding_full
/* Output a reference to a label. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(STREAM, NAME) \
fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, \
I386_PE_STRIP_ENCODING (NAME)) \
i386_pe_strip_name_encoding (NAME)) \
/* Output a common block. */
#undef ASM_OUTPUT_COMMON

View File

@ -299,40 +299,13 @@ while (0)
/* Define this macro if references to a symbol must be treated
differently depending on something about the variable or
function named by the symbol (such as what section it is in).
Apply stddef, handle (as yet unimplemented) pic.
stddef renaming does NOT apply to Alpha. */
const char *gen_stdcall_suffix PARAMS ((tree));
void i386_interix_encode_section_info PARAMS ((tree, int));
function named by the symbol (such as what section it is in). */
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO i386_interix_encode_section_info
#define TARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING i386_pe_strip_name_encoding_full
/* This macro gets just the user-specified name
out of the string in a SYMBOL_REF. Discard
trailing @[NUM] encoded by targetm.encode_section_info. */
#undef STRIP_NAME_ENCODING
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
do { \
const char *_p; \
const char *_name = SYMBOL_NAME; \
for (_p = _name; *_p && *_p != '@'; ++_p) \
; \
if (*_p == '@') \
{ \
int _len = _p - _name; \
char *_new_name = (char *) alloca (_len + 1); \
strncpy (_new_name, _name, _len); \
_new_name[_len] = '\0'; \
(VAR) = _new_name; \
} \
else \
(VAR) = _name; \
} while (0)
#if 0
/* Turn this back on when the linker is updated to handle grouped
.data$ sections correctly. See corresponding note in i386/interix.c.

View File

@ -199,3 +199,8 @@ extern unsigned int i386_pe_section_type_flags PARAMS ((tree, const char *,
extern void i386_pe_asm_named_section PARAMS ((const char *, unsigned int));
extern void x86_output_mi_thunk PARAMS ((FILE *, int, tree));
#endif
/* In winnt.c */
extern void i386_pe_encode_section_info PARAMS ((tree, int));
extern const char *i386_pe_strip_name_encoding PARAMS ((const char *));
extern const char *i386_pe_strip_name_encoding_full PARAMS ((const char *));

View File

@ -102,8 +102,7 @@ i386_pe_unique_section (decl, reloc)
char *string,*prefix;
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
/* Strip off any encoding in fnname. */
STRIP_NAME_ENCODING (name, name);
name = (* targetm.strip_name_encoding) (name);
/* The object is put in, for example, section .text$foo.
The linker will then ultimately place them in .text

View File

@ -104,30 +104,8 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO i386_pe_encode_section_info
/* This macro gets just the user-specified name
out of the string in a SYMBOL_REF. Discard
trailing @[NUM] encoded by targetm.encode_section_info.
Do we need the stripping of leading '*'? */
#undef STRIP_NAME_ENCODING
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
do { \
const char *_p; \
const char *const _name = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*'));\
for (_p = _name; *_p && *_p != '@'; ++_p) \
; \
if (*_p == '@') \
{ \
int _len = _p - _name; \
char *_new_name = (char *) alloca (_len + 1); \
strncpy (_new_name, _name, _len); \
_new_name[_len] = '\0'; \
(VAR) = _new_name; \
} \
else \
(VAR) = _name; \
} while (0)
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING i386_pe_strip_name_encoding_full
/* Emit code to check the stack when allocating more that 4000
bytes in one go. */

View File

@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */
#include "tm_p.h"
#include "toplev.h"
#include "hashtab.h"
#include "ggc.h"
/* i386/PE specific attribute support.
@ -422,6 +423,35 @@ i386_pe_encode_section_info (decl, first)
}
}
/* Strip only the leading encoding, leaving the stdcall suffix. */
const char *
i386_pe_strip_name_encoding (str)
const char *str;
{
if (*str == '@')
str += 3;
if (*str == '*')
str += 1;
return str;
}
/* Also strip the stdcall suffix. */
const char *
i386_pe_strip_name_encoding_full (str)
const char *str;
{
const char *p;
const char *name = i386_pe_strip_name_encoding (str);
p = strchr (name, '@');
if (p)
return ggc_alloc_string (name, p - name);
return name;
}
void
i386_pe_unique_section (decl, reloc)
tree decl;
@ -432,8 +462,7 @@ i386_pe_unique_section (decl, reloc)
char *string;
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
/* Strip off any encoding in fnname. */
STRIP_NAME_ENCODING (name, name);
name = i386_pe_strip_name_encoding_full (name);
/* The object is put in, for example, section .text$foo.
The linker will then ultimately place them in .text
@ -663,7 +692,7 @@ i386_pe_asm_file_end (file)
for (q = export_head; q != NULL; q = q->next)
{
fprintf (file, "\t.ascii \" -export:%s%s\"\n",
I386_PE_STRIP_ENCODING (q->name),
i386_pe_strip_name_encoding (q->name),
(q->is_data) ? ",data" : "");
}
}

View File

@ -127,6 +127,7 @@ static void emit_all_insn_group_barriers PARAMS ((FILE *, rtx));
static void emit_predicate_relation_info PARAMS ((void));
static bool ia64_in_small_data_p PARAMS ((tree));
static void ia64_encode_section_info PARAMS ((tree, int));
static const char *ia64_strip_name_encoding PARAMS ((const char *));
static void process_epilogue PARAMS ((void));
static int process_set PARAMS ((FILE *, rtx));
@ -211,6 +212,8 @@ static const struct attribute_spec ia64_attribute_table[] =
#define TARGET_IN_SMALL_DATA_P ia64_in_small_data_p
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO ia64_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING ia64_strip_name_encoding
#undef TARGET_SCHED_ADJUST_COST
#define TARGET_SCHED_ADJUST_COST ia64_adjust_cost
@ -6981,6 +6984,17 @@ ia64_encode_section_info (decl, first)
else if (symbol_str[0] == SDATA_NAME_FLAG_CHAR)
XSTR (symbol, 0) = ggc_strdup (symbol_str + 1);
}
static const char *
ia64_strip_name_encoding (str)
const char *str;
{
if (str[0] == SDATA_NAME_FLAG_CHAR)
str++;
if (str[0] == '*')
str++;
return str;
}
/* Output assembly directives for prologue regions. */

View File

@ -1777,18 +1777,6 @@ do { \
#define SDATA_NAME_FLAG_CHAR '@'
#define IA64_DEFAULT_GVALUE 8
/* Decode SYM_NAME and store the real name part in VAR, sans the characters
that encode section info. */
#define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \
do { \
(VAR) = (SYMBOL_NAME); \
if ((VAR)[0] == SDATA_NAME_FLAG_CHAR) \
(VAR)++; \
if ((VAR)[0] == '*') \
(VAR)++; \
} while (0)
/* Position Independent Code. */

View File

@ -76,7 +76,7 @@ static int m32r_issue_rate PARAMS ((void));
static void m32r_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT));
static void m32r_encode_section_info PARAMS ((tree, int));
static const char *m32r_strip_name_encoding PARAMS ((const char *));
/* Initialize the GCC target structure. */
#undef TARGET_ATTRIBUTE_TABLE
@ -107,6 +107,8 @@ static void m32r_encode_section_info PARAMS ((tree, int));
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING m32r_strip_name_encoding
struct gcc_target targetm = TARGET_INITIALIZER;
@ -486,6 +488,17 @@ m32r_encode_section_info (decl, first)
}
}
/* Undo the effects of the above. */
static const char *
m32r_strip_name_encoding (str)
const char *str;
{
str += ENCODED_NAME_P (str);
str += *str == '*';
return str;
}
/* Do anything needed before RTL is emitted for each function. */
void

View File

@ -1611,15 +1611,6 @@ sbss_section () \
/*|| SMALL_NAME_P (SYMBOL_NAME)*/ \
|| MEDIUM_NAME_P (SYMBOL_NAME) \
|| LARGE_NAME_P (SYMBOL_NAME))
/* Decode SYM_NAME and store the real name part in VAR, sans
the characters that encode section info. */
/* Note that we have to handle symbols like "%*start". */
#define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \
do { \
(VAR) = (SYMBOL_NAME) + ENCODED_NAME_P (SYMBOL_NAME); \
(VAR) += *(VAR) == '*'; \
} while (0)
/* PIC */
@ -1707,14 +1698,8 @@ do { \
/* This is how to output a reference to a user-level label named NAME.
`assemble_name' uses this. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
do \
{ \
const char * real_name; \
STRIP_NAME_ENCODING (real_name, (NAME)); \
asm_fprintf (FILE, "%U%s", real_name); \
} \
while (0)
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
asm_fprintf (FILE, "%U%s", (*targetm.strip_name_encoding) (NAME))
/* If -Os, don't force line number labels to begin at the beginning of
the word; we still want the assembler to try to put things in parallel,

View File

@ -67,7 +67,7 @@ exports_section () \
{ \
exports_section (); \
fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \
MCORE_STRIP_NAME_ENCODING (NAME)); \
(* targetm.strip_name_encoding) (NAME)); \
} \
while (0);

View File

@ -69,7 +69,7 @@ drectve_section () \
{ \
drectve_section (); \
fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \
MCORE_STRIP_NAME_ENCODING (NAME)); \
(* targetm.strip_name_encoding) (NAME)); \
} \
while (0);

View File

@ -139,6 +139,7 @@ static void mcore_asm_named_section PARAMS ((const char *,
#endif
static void mcore_unique_section PARAMS ((tree, int));
static void mcore_encode_section_info PARAMS ((tree, int));
static const char *mcore_strip_name_encoding PARAMS ((const char *));
/* Initialize the GCC target structure. */
#ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES
@ -159,6 +160,8 @@ static void mcore_encode_section_info PARAMS ((tree, int));
#define TARGET_ASM_UNIQUE_SECTION mcore_unique_section
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO mcore_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING mcore_strip_name_encoding
struct gcc_target targetm = TARGET_INITIALIZER;
@ -3467,6 +3470,15 @@ mcore_encode_section_info (decl, first)
}
}
/* Undo the effects of the above. */
static const char *
mcore_strip_name_encoding (str)
const char *str;
{
return str + (str[0] == '@' ? 3 : 0);
}
/* MCore specific attribute support.
dllexport - for exporting a function/variable that will live in a dll
dllimport - for importing a function/variable from a dll
@ -3535,7 +3547,7 @@ mcore_unique_section (decl, reloc)
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
/* Strip off any encoding in name. */
STRIP_NAME_ENCODING (name, name);
name = (* targetm.strip_name_encoding) (name);
/* The object is put in, for example, section .text$foo.
The linker will then ultimately place them in .text

View File

@ -1119,8 +1119,8 @@ switch_to_section (section, decl) \
/* Output a reference to a label. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(STREAM, NAME) \
fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, MCORE_STRIP_NAME_ENCODING (NAME))
fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, \
(* targetm.strip_name_encoding) (NAME))
/* This is how to output an assembler line
that says to advance the location counter
@ -1133,16 +1133,6 @@ switch_to_section (section, decl) \
#define ASM_DECLARE_RESULT(FILE, RESULT)
#endif
/* Strip export encoding from a function name. */
#define MCORE_STRIP_NAME_ENCODING(SYM_NAME) \
((SYM_NAME) + ((SYM_NAME)[0] == '@' ? 3 : 0))
/* Strip any text from SYM_NAME added by targetm.encode_section_info
and store the result in VAR. */
#undef STRIP_NAME_ENCODING
#define STRIP_NAME_ENCODING(VAR, SYM_NAME) \
(VAR) = MCORE_STRIP_NAME_ENCODING (SYM_NAME)
#define MULTIPLE_SYMBOL_SPACES 1
#define SUPPORTS_ONE_ONLY 1

View File

@ -10285,8 +10285,8 @@ mips_unique_section (decl, reloc)
};
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
name = (* targetm.strip_name_encoding) (name);
size = int_size_in_bytes (TREE_TYPE (decl));
STRIP_NAME_ENCODING (name, name);
/* Determine the base section we are interested in:
0=text, 1=rodata, 2=data, 3=sdata, [4=bss]. */

View File

@ -33,7 +33,6 @@ extern int mmix_register_move_cost
PARAMS ((enum machine_mode, enum reg_class, enum reg_class));
extern const char *mmix_text_section_asm_op PARAMS ((void));
extern const char *mmix_data_section_asm_op PARAMS ((void));
extern const char *mmix_strip_name_encoding PARAMS ((const char *));
extern void mmix_asm_file_start PARAMS ((FILE *));
extern void mmix_asm_file_end PARAMS ((FILE *));
extern void mmix_asm_output_source_filename PARAMS ((FILE *, const char *));

View File

@ -99,6 +99,7 @@ static void mmix_output_octa PARAMS ((FILE *, HOST_WIDEST_INT, int));
static bool mmix_assemble_integer PARAMS ((rtx, unsigned int, int));
static void mmix_init_machine_status PARAMS ((struct function *));
static void mmix_encode_section_info PARAMS ((tree, int));
static const char *mmix_strip_name_encoding PARAMS ((const char *));
extern void mmix_target_asm_function_prologue
PARAMS ((FILE *, HOST_WIDE_INT));
@ -130,6 +131,8 @@ extern void mmix_target_asm_function_epilogue
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO mmix_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING mmix_strip_name_encoding
struct gcc_target targetm = TARGET_INITIALIZER;
@ -1768,9 +1771,7 @@ mmix_encode_section_info (decl, first)
}
}
/* STRIP_NAME_ENCODING. */
const char *
static const char *
mmix_strip_name_encoding (name)
const char *name;
{

View File

@ -907,9 +907,6 @@ typedef struct { int regs; int lib; int now_varargs; } CUMULATIVE_ARGS;
#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata"
#define STRIP_NAME_ENCODING(VAR, SYM_NAME) \
(VAR) = mmix_strip_name_encoding (SYM_NAME)
/* Node: PIC */
/* (empty) */

View File

@ -830,12 +830,8 @@ struct cum_arg { int nbytes; };
`assemble_name' uses this. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
do { \
const char* real_name; \
STRIP_NAME_ENCODING (real_name, (NAME)); \
fprintf (FILE, "_%s", real_name); \
} while (0)
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
fprintf (FILE, "_%s", (*targetm.strip_name_encoding) (NAME))
/* Store in OUTPUT a string (made with alloca) containing
an assembler-name for a local static variable named NAME.

View File

@ -911,12 +911,8 @@ struct cum_arg {int nbytes; };
`assemble_name' uses this. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
do { \
const char* real_name; \
STRIP_NAME_ENCODING (real_name, (NAME)); \
fprintf (FILE, "_%s", real_name); \
} while (0)
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
fprintf (FILE, "_%s", (*targetm.strip_name_encoding) (NAME))
/* Store in OUTPUT a string (made with alloca) containing
an assembler-name for a local static variable named NAME.

View File

@ -117,6 +117,7 @@ static int pa_issue_rate PARAMS ((void));
static void pa_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT))
ATTRIBUTE_UNUSED;
static void pa_encode_section_info PARAMS ((tree, int));
static const char *pa_strip_name_encoding PARAMS ((const char *));
/* Save the operands last given to a compare for use when we
generate a scc or bcc insn. */
@ -188,6 +189,8 @@ int n_deferred_plabels = 0;
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO pa_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING pa_strip_name_encoding
struct gcc_target targetm = TARGET_INITIALIZER;
@ -6285,7 +6288,7 @@ output_call (insn, call_dest, sibcall)
/* Gross. We have just implicitly taken the address of this
function, mark it as such. */
STRIP_NAME_ENCODING (real_name, name);
real_name = (*targetm.strip_name_encoding) (name);
TREE_SYMBOL_REFERENCED (get_identifier (real_name)) = 1;
}
@ -6460,6 +6463,15 @@ pa_encode_section_info (decl, first)
}
}
/* This is sort of inverse to pa_encode_section_info. */
static const char *
pa_strip_name_encoding (str)
const char *str;
{
return str + (*str == '*' || *str == '@');
}
int
function_label_operand (op, mode)
rtx op;

View File

@ -864,79 +864,80 @@ struct hppa_args {int words, nargs_prototype, indirect; };
extern struct rtx_def *hppa_compare_op0, *hppa_compare_op1;
extern enum cmp_type hppa_branch_type;
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
{ const char *target_name = XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0); \
static unsigned int current_thunk_number; \
char label[16]; \
char *lab; \
ASM_GENERATE_INTERNAL_LABEL (label, "LTHN", current_thunk_number); \
STRIP_NAME_ENCODING (lab, label); \
STRIP_NAME_ENCODING (target_name, target_name); \
/* FIXME: total_code_bytes is not handled correctly in files with \
mi thunks. */ \
pa_output_function_prologue (FILE, 0); \
if (VAL_14_BITS_P (DELTA)) \
{ \
if (! TARGET_64BIT && ! TARGET_PORTABLE_RUNTIME && flag_pic) \
{ \
fprintf (FILE, "\taddil LT%%%s,%%r19\n", lab); \
fprintf (FILE, "\tldw RT%%%s(%%r1),%%r22\n", lab); \
fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \
fprintf (FILE, "\tbb,>=,n %%r22,30,.+16\n"); \
fprintf (FILE, "\tdepi 0,31,2,%%r22\n"); \
fprintf (FILE, "\tldw 4(%%sr0,%%r22),%%r19\n"); \
fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
do { \
const char *target_name = XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0); \
static unsigned int current_thunk_number; \
char label[16]; \
char *lab; \
ASM_GENERATE_INTERNAL_LABEL (label, "LTHN", current_thunk_number); \
lab = (*targetm.strip_name_encoding) (label); \
target_name = (*targetm.strip_name_encoding) (target_name); \
/* FIXME: total_code_bytes is not handled correctly in files with \
mi thunks. */ \
pa_output_function_prologue (FILE, 0); \
if (VAL_14_BITS_P (DELTA)) \
{ \
if (! TARGET_64BIT && ! TARGET_PORTABLE_RUNTIME && flag_pic) \
{ \
fprintf (FILE, "\taddil LT%%%s,%%r19\n", lab); \
fprintf (FILE, "\tldw RT%%%s(%%r1),%%r22\n", lab); \
fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \
fprintf (FILE, "\tbb,>=,n %%r22,30,.+16\n"); \
fprintf (FILE, "\tdepi 0,31,2,%%r22\n"); \
fprintf (FILE, "\tldw 4(%%sr0,%%r22),%%r19\n"); \
fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \
fprintf (FILE, "\tldsid (%%sr0,%%r22),%%r1\n\tmtsp %%r1,%%sr0\n"); \
fprintf (FILE, "\tbe 0(%%sr0,%%r22)\n\tldo "); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, "(%%r26),%%r26\n"); \
} \
else \
{ \
fprintf (FILE, "\tb %s\n\tldo ", target_name); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, "(%%r26),%%r26\n"); \
} \
} \
else \
{ \
if (! TARGET_64BIT && ! TARGET_PORTABLE_RUNTIME && flag_pic) \
{ \
fprintf (FILE, "\taddil L%%"); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, ",%%r26\n\tldo R%%"); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, "(%%r1),%%r26\n"); \
fprintf (FILE, "\taddil LT%%%s,%%r19\n", lab); \
fprintf (FILE, "\tldw RT%%%s(%%r1),%%r22\n", lab); \
fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \
fprintf (FILE, "\tbb,>=,n %%r22,30,.+16\n"); \
fprintf (FILE, "\tdepi 0,31,2,%%r22\n"); \
fprintf (FILE, "\tldw 4(%%sr0,%%r22),%%r19\n"); \
fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \
fprintf (FILE, "\tbe 0(%%sr0,%%r22)\n\tldo "); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, "(%%r26),%%r26\n"); \
} \
else \
{ \
fprintf (FILE, "\tb %s\n\tldo ", target_name); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, "(%%r26),%%r26\n"); \
} \
} \
else \
{ \
if (! TARGET_64BIT && ! TARGET_PORTABLE_RUNTIME && flag_pic) \
{ \
fprintf (FILE, "\taddil L%%"); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, ",%%r26\n\tldo R%%"); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, "(%%r1),%%r26\n"); \
fprintf (FILE, "\taddil LT%%%s,%%r19\n", lab); \
fprintf (FILE, "\tldw RT%%%s(%%r1),%%r22\n", lab); \
fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \
fprintf (FILE, "\tbb,>=,n %%r22,30,.+16\n"); \
fprintf (FILE, "\tdepi 0,31,2,%%r22\n"); \
fprintf (FILE, "\tldw 4(%%sr0,%%r22),%%r19\n"); \
fprintf (FILE, "\tldw 0(%%sr0,%%r22),%%r22\n"); \
fprintf (FILE, "\tldsid (%%sr0,%%r22),%%r1\n\tmtsp %%r1,%%sr0\n"); \
fprintf (FILE, "\tbe,n 0(%%sr0,%%r22)\n"); \
} \
else \
{ \
fprintf (FILE, "\taddil L%%"); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, ",%%r26\n\tb %s\n\tldo R%%", target_name); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, "(%%r1),%%r26\n"); \
} \
} \
fprintf (FILE, "\t.EXIT\n\t.PROCEND\n"); \
if (! TARGET_64BIT && ! TARGET_PORTABLE_RUNTIME && flag_pic) \
{ \
data_section (); \
fprintf (FILE, "\t.align 4\n"); \
ASM_OUTPUT_INTERNAL_LABEL (FILE, "LTHN", current_thunk_number); \
fprintf (FILE, "\t.word P%%%s\n", target_name); \
function_section (THUNK_FNDECL); \
} \
current_thunk_number++; \
}
fprintf (FILE, "\tbe,n 0(%%sr0,%%r22)\n"); \
} \
else \
{ \
fprintf (FILE, "\taddil L%%"); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, ",%%r26\n\tb %s\n\tldo R%%", target_name); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, DELTA); \
fprintf (FILE, "(%%r1),%%r26\n"); \
} \
} \
fprintf (FILE, "\t.EXIT\n\t.PROCEND\n"); \
if (! TARGET_64BIT && ! TARGET_PORTABLE_RUNTIME && flag_pic) \
{ \
data_section (); \
fprintf (FILE, "\t.align 4\n"); \
ASM_OUTPUT_INTERNAL_LABEL (FILE, "LTHN", current_thunk_number); \
fprintf (FILE, "\t.word P%%%s\n", target_name); \
function_section (THUNK_FNDECL); \
} \
current_thunk_number++; \
} while (0)
/* On HPPA, we emit profiling code as rtl via PROFILE_HOOK rather than
as assembly via FUNCTION_PROFILER. Just output a local label.
@ -1522,13 +1523,6 @@ do { \
#define FUNCTION_NAME_P(NAME) (*(NAME) == '@')
/* Store the user-specified part of SYMBOL_NAME in VAR.
This is sort of inverse to targetm.encode_section_info. */
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
(VAR) = ((SYMBOL_NAME) \
+ (*(SYMBOL_NAME) == '*' || *(SYMBOL_NAME) == '@'))
/* Specify the machine mode that this machine uses
for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE (TARGET_BIG_SWITCH ? TImode : DImode)

View File

@ -131,8 +131,7 @@ do { \
that the section name will have a "." prefix. */
#define ASM_OUTPUT_FUNCTION_PREFIX(FILE, NAME) \
{ \
const char *name; \
STRIP_NAME_ENCODING (name, NAME); \
const char *name = (*targetm.strip_name_encoding) (NAME); \
if (TARGET_GAS && in_section == in_text) \
fputs ("\t.NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY\n", FILE); \
else if (TARGET_GAS) \
@ -335,7 +334,7 @@ readonly_data () \
if (!function_label_operand (RTL, VOIDmode)) \
hppa_encode_label (RTL); \
\
STRIP_NAME_ENCODING (name, XSTR ((RTL), 0)); \
name = (*targetm.strip_name_encoding) (XSTR ((RTL), 0)); \
id = maybe_get_identifier (name); \
if (! id || ! TREE_SYMBOL_REFERENCED (id)) \
{ \

View File

@ -169,6 +169,7 @@ static void rs6000_elf_unique_section PARAMS ((tree, int));
static void rs6000_elf_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT));
static void rs6000_elf_encode_section_info PARAMS ((tree, int));
static const char *rs6000_elf_strip_name_encoding PARAMS ((const char *));
#endif
#ifdef OBJECT_FORMAT_COFF
static void xcoff_asm_named_section PARAMS ((const char *, unsigned int));
@ -177,6 +178,7 @@ static void rs6000_xcoff_select_section PARAMS ((tree, int,
static void rs6000_xcoff_unique_section PARAMS ((tree, int));
static void rs6000_xcoff_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT));
static const char * rs6000_xcoff_strip_name_encoding PARAMS ((const char *));
#endif
static void rs6000_xcoff_encode_section_info PARAMS ((tree, int))
ATTRIBUTE_UNUSED;
@ -10385,7 +10387,7 @@ output_toc (file, x, labelno, mode)
else
abort ();
STRIP_NAME_ENCODING (real_name, name);
real_name = (*targetm.strip_name_encoding) (name);
if (TARGET_MINIMAL_TOC)
fputs (TARGET_32BIT ? "\t.long " : DOUBLE_INT_ASM_OP, file);
else
@ -10557,7 +10559,7 @@ output_profile_hook (labelno)
rtx fun;
ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno);
STRIP_NAME_ENCODING (label_name, ggc_strdup (buf));
label_name = (*targetm.strip_name_encoding) (ggc_strdup (buf));
fun = gen_rtx_SYMBOL_REF (Pmode, label_name);
emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 1,
@ -11075,7 +11077,8 @@ rs6000_elf_unique_section (decl, reloc)
}
}
STRIP_NAME_ENCODING (name, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
name = (*targetm.strip_name_encoding) (name);
prefix = prefixes[sec][DECL_ONE_ONLY (decl)];
len = strlen (name) + strlen (prefix);
string = alloca (len + 1);
@ -11167,6 +11170,15 @@ rs6000_elf_encode_section_info (decl, first)
}
}
static const char *
rs6000_elf_strip_name_encoding (str)
const char *str;
{
while (*str == '*' || *str == '@')
str++;
return str;
}
#endif /* USING_ELFOS_H */
@ -11432,7 +11444,7 @@ machopic_output_stub (file, symb, stub)
static int label = 0;
/* Lose our funky encoding stuff so it doesn't contaminate the stub. */
STRIP_NAME_ENCODING (symb, symb);
symb = (*targetm.strip_name_encoding) (symb);
label += 1;
@ -11671,7 +11683,7 @@ rs6000_xcoff_select_section (exp, reloc, align)
static void
rs6000_xcoff_unique_section (decl, reloc)
tree decl;
int reloc;
int reloc ATTRIBUTE_UNUSED;
{
const char *name;
char *string;
@ -11704,6 +11716,23 @@ rs6000_xcoff_select_rtx_section (mode, x, align)
else
read_only_private_data_section ();
}
/* Remove any trailing [DS] or the like from the symbol name. */
static const char *
rs6000_xcoff_strip_name_encoding (name)
const char *name;
{
size_t len;
if (*name == '*')
name++;
len = strlen (name);
if (name[len - 1] == ']')
return ggc_alloc_string (name, len - 4);
else
return name;
}
#endif /* OBJECT_FORMAT_COFF */
/* Note that this is also used for ELF64. */

View File

@ -625,7 +625,7 @@ extern int rs6000_pic_labelno;
{ \
const char *desc_name, *orig_name; \
\
STRIP_NAME_ENCODING (orig_name, NAME); \
orig_name = (*targetm.strip_name_encoding) (NAME); \
desc_name = orig_name; \
while (*desc_name == '.') \
desc_name++; \
@ -776,25 +776,14 @@ extern int fixuplabelno;
/* Historically we have also supported stabs debugging. */
#define DBX_DEBUGGING_INFO
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO rs6000_elf_encode_section_info
#define TARGET_STRIP_NAME_ENCODING rs6000_elf_strip_name_encoding
/* The ELF version doesn't encode [DS] or whatever at the end of symbols. */
#define RS6000_OUTPUT_BASENAME(FILE, NAME) \
assemble_name (FILE, NAME)
/* This macro gets just the user-specified name
out of the string in a SYMBOL_REF. Discard
a leading * or @. */
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
do { \
const char *_name = SYMBOL_NAME; \
while (*_name == '*' || *_name == '@') \
_name++; \
(VAR) = _name; \
} while (0)
/* This is how to output a reference to a user-level label named NAME.
`assemble_name' uses this. */

View File

@ -163,6 +163,7 @@ toc_section () \
#define TARGET_ASM_SELECT_RTX_SECTION rs6000_xcoff_select_rtx_section
#define TARGET_ENCODE_SECTION_INFO rs6000_xcoff_encode_section_info
#define TARGET_STRIP_NAME_ENCODING rs6000_xcoff_strip_name_encoding
/* FP save and restore routines. */
#define SAVE_FP_PREFIX "._savef"
@ -183,13 +184,8 @@ toc_section () \
/* This outputs NAME to FILE up to the first null or '['. */
#define RS6000_OUTPUT_BASENAME(FILE, NAME) \
{ \
const char *_p; \
\
STRIP_NAME_ENCODING (_p, (NAME)); \
assemble_name ((FILE), _p); \
}
#define RS6000_OUTPUT_BASENAME(FILE, NAME) \
assemble_name ((FILE), (*targetm.strip_name_encoding) (NAME))
/* This is how to output the definition of a user-level label named NAME,
such as the label on a static function or variable NAME. */
@ -204,28 +200,6 @@ toc_section () \
do { fputs ("\t.globl ", FILE); \
RS6000_OUTPUT_BASENAME (FILE, NAME); putc ('\n', FILE);} while (0)
/* Remove any trailing [DS] or the like from the symbol name. */
#define STRIP_NAME_ENCODING(VAR,NAME) \
do \
{ \
const char *_name = (NAME); \
size_t _len; \
if (*_name == '*') \
_name++; \
_len = strlen (_name); \
if (_name[_len - 1] != ']') \
(VAR) = _name; \
else \
{ \
char *_new_name = (char *) alloca (_len + 1); \
strcpy (_new_name, _name); \
_new_name[_len - 4] = '\0'; \
(VAR) = _new_name; \
} \
} \
while (0)
/* Output at beginning of assembler file.
Initialize the section names for the RS/6000 at this point.

View File

@ -204,6 +204,7 @@ static bool sh_cannot_modify_jumps_p PARAMS ((void));
static bool sh_ms_bitfield_layout_p PARAMS ((tree));
static void sh_encode_section_info PARAMS ((tree, int));
static const char *sh_strip_name_encoding PARAMS ((const char *));
/* Initialize the GCC target structure. */
#undef TARGET_ATTRIBUTE_TABLE
@ -242,6 +243,11 @@ static void sh_encode_section_info PARAMS ((tree, int));
#undef TARGET_MS_BITFIELD_LAYOUT_P
#define TARGET_MS_BITFIELD_LAYOUT_P sh_ms_bitfield_layout_p
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO sh_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING sh_strip_name_encoding
struct gcc_target targetm = TARGET_INITIALIZER;
/* Print the operand address in x to the stream. */
@ -6820,3 +6826,14 @@ sh_encode_section_info (decl, first)
if (TARGET_SH5 && first && TREE_CODE (decl) != FUNCTION_DECL)
XEXP (rtl, 0) = gen_datalabel_ref (symbol);
}
/* Undo the effects of the above. */
static const char *
sh_strip_name_encoding (str)
const char *str;
{
STRIP_DATALABEL_ENCODING (str, str);
str += *str == '*';
return str;
}

View File

@ -2681,9 +2681,6 @@ while (0)
#define STRIP_DATALABEL_ENCODING(VAR, SYM_NAME) \
(VAR) = (SYM_NAME) + (DATALABEL_SYMNAME_P (SYM_NAME) \
? strlen (SH_DATALABEL_ENCODING) : 0)
#define STRIP_NAME_ENCODING(VAR, SYM_NAME) \
STRIP_DATALABEL_ENCODING((VAR), (SYM_NAME)), \
(VAR) += (*(VAR) == '*')
/* We can't directly access anything that contains a symbol,
nor can we indirect via the constant pool. */

View File

@ -2489,10 +2489,6 @@ do { \
This macro is irrelevant if there is no separate readonly data section. */
#define JUMP_TABLES_IN_TEXT_SECTION 1
/* Decode SYM_NAME and store the real name part in VAR, sans the characters
that encode section info. */
/* #define STRIP_NAME_ENCODING(VAR, SYM_NAME) */
/* Position Independent Code. */

View File

@ -61,6 +61,7 @@ static void v850_insert_attributes PARAMS ((tree, tree *));
static void v850_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT));
static void v850_encode_data_area PARAMS ((tree));
static void v850_encode_section_info PARAMS ((tree, int));
static const char *v850_strip_name_encoding PARAMS ((const char *));
/* True if the current function has anonymous arguments. */
int current_function_anonymous_args;
@ -104,6 +105,8 @@ static int v850_interrupt_p = FALSE;
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO v850_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING v850_strip_name_encoding
struct gcc_target targetm = TARGET_INITIALIZER;
@ -2218,6 +2221,13 @@ v850_encode_section_info (decl, first)
v850_encode_data_area (decl);
}
static const char *
v850_strip_name_encoding (str)
const char *str;
{
return str + (ENCODED_NAME_P (str) || *str == '*');
}
/* Return true if the given RTX is a register which can be restored
by a function epilogue. */
int

View File

@ -1194,13 +1194,8 @@ zbss_section () \
`assemble_name' uses this. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
do { \
const char* real_name; \
STRIP_NAME_ENCODING (real_name, (NAME)); \
asm_fprintf (FILE, "%U%s", real_name); \
} while (0)
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
asm_fprintf (FILE, "%U%s", (*targetm.strip_name_encoding) (NAME))
/* Store in OUTPUT a string (made with alloca) containing
an assembler-name for a local static variable named NAME.
@ -1427,9 +1422,6 @@ extern union tree_node * GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_K
|| TDA_NAME_P (SYMBOL_NAME) \
|| SDA_NAME_P (SYMBOL_NAME))
#define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \
(VAR) = (SYMBOL_NAME) + (ENCODED_NAME_P (SYMBOL_NAME) || *(SYMBOL_NAME) == '*')
/* Define this if you have defined special-purpose predicates in the
file `MACHINE.c'. This macro is called within an initializer of an
array of structures. The first field in the structure is the name

View File

@ -4781,8 +4781,8 @@ The best way to modify the name string is by adding text to the
beginning, with suitable punctuation to prevent any ambiguity. Allocate
the new name in @code{saveable_obstack}. You will have to modify
@code{ASM_OUTPUT_LABELREF} to remove and decode the added text and
output the name accordingly, and define @code{STRIP_NAME_ENCODING} to
access the original name string.
output the name accordingly, and define @code{TARGET_STRIP_NAME_ENCODING}
to access the original name string.
You can check the information stored here into the @code{symbol_ref} in
the definitions of the macros @code{GO_IF_LEGITIMATE_ADDRESS} and
@ -5765,12 +5765,6 @@ section, along with the assembler instructions. Otherwise, the
readonly data section is used.
This macro is irrelevant if there is no separate readonly data section.
@findex STRIP_NAME_ENCODING
@item STRIP_NAME_ENCODING (@var{var}, @var{sym_name})
Decode @var{sym_name} and store the real name part in @var{var}, sans
the characters that encode section info. Define this macro if
@code{TARGET_ENCODE_SECTION_INFO} alters the symbol's name string.
@end table
@deftypefn {Target Hook} void TARGET_ASM_SELECT_SECTION (tree @var{exp}, int @var{reloc}, unsigned HOST_WIDE_INT @var{align})
@ -5838,6 +5832,12 @@ modified name string in the @code{symbol_ref} (if one bit is not
enough information).
@end deftypefn
@deftypefn {Target Hook} const char *TARGET_STRIP_NAME_ENCODING (const char *name)
Decode @var{name} and return the real name part, sans
the characters that @code{TARGET_ENCODE_SECTION_INFO}
may have added.
@end deftypefn
@node PIC
@section Position Independent Code
@cindex position independent code

View File

@ -739,7 +739,7 @@ dw2_force_const_mem (x)
if (GET_CODE (x) != SYMBOL_REF)
abort ();
STRIP_NAME_ENCODING (str, XSTR (x, 0));
str = (* targetm.strip_name_encoding) (XSTR (x, 0));
node = splay_tree_lookup (indirect_pool, (splay_tree_key) str);
if (node)
decl = (tree) node->value;

View File

@ -482,14 +482,6 @@ extern rtx this_is_asm_operands;
/* User label prefix in effect for this compilation. */
extern const char *user_label_prefix;
/* This macro gets just the user-specified name
out of the string in a SYMBOL_REF. On most machines,
we discard the * if any and that's all. */
#ifndef STRIP_NAME_ENCODING
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
(VAR) = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*'))
#endif
/* Default target function prologue and epilogue assembler output. */
extern void default_function_pro_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
@ -552,6 +544,8 @@ extern void default_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT));
extern void default_elf_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT));
extern const char *default_strip_name_encoding PARAMS ((const char *));
/* Emit data for vtable gc for GNU binutils. */
extern void assemble_vtable_entry PARAMS ((struct rtx_def *, HOST_WIDE_INT));
extern void assemble_vtable_inherit PARAMS ((struct rtx_def *,

View File

@ -596,7 +596,7 @@ typedef char _Bool;
MD_INIT_BUILTINS MD_EXPAND_BUILTIN ASM_OUTPUT_CONSTRUCTOR \
ASM_OUTPUT_DESTRUCTOR SIGNED_CHAR_SPEC MAX_CHAR_TYPE_SIZE \
WCHAR_UNSIGNED UNIQUE_SECTION SELECT_SECTION SELECT_RTX_SECTION \
ENCODE_SECTION_INFO
ENCODE_SECTION_INFO STRIP_NAME_ENCODING
/* And other obsolete target macros, or macros that used to be in target
headers and were not used, and may be obsolete or may never have

View File

@ -205,6 +205,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TARGET_SECTION_TYPE_FLAGS default_section_type_flags
#endif
#ifndef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING default_strip_name_encoding
#endif
/* In hook.c. */
#define TARGET_CANNOT_MODIFY_JUMPS_P hook_void_bool_false
#define TARGET_IN_SMALL_DATA_P hook_tree_bool_false
@ -233,7 +237,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
TARGET_HAVE_CTORS_DTORS, \
TARGET_CANNOT_MODIFY_JUMPS_P, \
TARGET_IN_SMALL_DATA_P, \
TARGET_ENCODE_SECTION_INFO \
TARGET_ENCODE_SECTION_INFO, \
TARGET_STRIP_NAME_ENCODING \
}
#include "hooks.h"

View File

@ -247,6 +247,9 @@ struct gcc_target
/* Do something target-specific to record properties of the DECL into
the associated SYMBOL_REF. */
void (* encode_section_info) PARAMS ((tree, int));
/* Undo the effects of encode_section_info on the symbol string. */
const char * (* strip_name_encoding) PARAMS ((const char *));
};
extern struct gcc_target targetm;

View File

@ -1207,7 +1207,7 @@ assemble_start_function (decl, fnname)
const char *p;
char *name;
STRIP_NAME_ENCODING (p, fnname);
p = (* targetm.strip_name_encoding) (fnname);
name = permalloc (strlen (p) + 1);
strcpy (name, p);
@ -1527,7 +1527,7 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
const char *p;
char *xname;
STRIP_NAME_ENCODING (p, name);
p = (* targetm.strip_name_encoding) (name);
xname = permalloc (strlen (p) + 1);
strcpy (xname, p);
first_global_object_name = xname;
@ -1786,7 +1786,7 @@ assemble_name (file, name)
const char *real_name;
tree id;
STRIP_NAME_ENCODING (real_name, name);
real_name = (* targetm.strip_name_encoding) (name);
id = maybe_get_identifier (real_name);
if (id)
@ -5477,7 +5477,7 @@ default_unique_section (decl, reloc)
plen = strlen (prefix);
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
STRIP_NAME_ENCODING (name, name);
name = (* targetm.strip_name_encoding) (name);
nlen = strlen (name);
string = alloca (nlen + plen + 1);
@ -5535,3 +5535,13 @@ default_elf_select_rtx_section (mode, x, align)
mergeable_constant_section (mode, align, 0);
}
/* By default, we do nothing for encode_section_info, so we need not
do anything but discard the '*' marker. */
const char *
default_strip_name_encoding (str)
const char *str;
{
return str + (*str == '*');
}

View File

@ -32,6 +32,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "toplev.h"
#include "output.h"
#include "ggc.h"
#include "target.h"
#ifdef XCOFF_DEBUGGING_INFO