This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFA] ia64/sysv4.h ASM_OUTPUT_LABELREF
- To: wilson at redhat dot com
- Subject: [RFA] ia64/sysv4.h ASM_OUTPUT_LABELREF
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- Date: 06 Jul 2001 10:59:26 +0100
- Cc: gcc-patches at gcc dot gnu dot org
Hi Jim,
The ia64 port currently fails to build newlib/libc/stdlib/ctype.c
because it appends a # character to the end of an expression,
instead of to the label inside the expression. The patch below
fixes this problem.
May I apply this patch please ?
Cheers
Nick
2001-07-06 Nick Clifton <nickc@cambridge.redhat.com>
* config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Append # to end
of the label inside NAME as opposed to just the end of NAME.
Index: gcc/config/ia64/sysv4.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/sysv4.h,v
retrieving revision 1.10
diff -p -r1.10 sysv4.h
*** sysv4.h 2001/04/16 18:30:41 1.10
--- sysv4.h 2001/07/06 09:53:38
*************** do { \
*** 54,71 ****
/* The # tells the Intel assembler that this is not a register name.
However, we can't emit the # in a label definition, so we set a variable
! in ASM_OUTPUT_LABEL to control whether we want the postfix here or not. */
#undef ASM_OUTPUT_LABELREF
! #define ASM_OUTPUT_LABELREF(STREAM, NAME) \
! do \
! { \
! const char *real_name; \
! STRIP_NAME_ENCODING (real_name, NAME); \
! asm_fprintf (STREAM, "%U%s%s", real_name, \
! (ia64_asm_output_label ? "" : "#")); \
! } \
! while (0)
/* Intel assembler requires both flags and type if declaring a non-predefined
section. */
--- 54,88 ----
/* The # tells the Intel assembler that this is not a register name.
However, we can't emit the # in a label definition, so we set a variable
! in ASM_OUTPUT_LABEL to control whether we want the postfix here or not.
! We append the # to the label name, but since NAME can be an expression
! we have to scan it for a non-label character and insert the # there. */
#undef ASM_OUTPUT_LABELREF
! #define ASM_OUTPUT_LABELREF(STREAM, NAME) \
! do \
! { \
! const char * real_name; \
! const char * name_end; \
! \
! STRIP_NAME_ENCODING (real_name, NAME); \
! name_end = strchr (real_name, '+'); \
! \
! if (name_end) \
! * name_end = 0; \
! \
! asm_fprintf (STREAM, "%U%s", real_name); \
! \
! if (ia64_asm_output_label) \
! asm_fprintf (STREAM, "#"); \
! \
! if (name_end) \
! { \
! * name_end = '+'; \
! asm_fprintf (STREAM, name_end); \
! } \
! } \
! while (0)
/* Intel assembler requires both flags and type if declaring a non-predefined
section. */