This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed, MMIX: ASM_OUTPUT_INTERNAL_LABEL


The "Lfoo:" syntax works, but "Lfoo IS @" provides better
compatibility with Knuth's mmixal assembler+linker, should
anyone try to assemble GCC-generated code with it (a goal of the
port, though only trivial compiled C is supported).  Local
labels regressed in this aspect with the introduction of (and
use of the default definition of) ASM_OUTPUT_INTERNAL_LABEL.

BTW, that doesn't seem like a proper hook; the macro would then
be local to tm.c, overriding a default definition for a
gcc_targetm member and supposedly named
TARGET_ASM_OUTPUT_INTERNAL_LABEL.  Was there a reason to
introduce a hook in the shape of a "real" macro, considering
that hooks are supposedly preferred?

No regressions, committed.

	* config/mmix/mmix.h (ASM_OUTPUT_INTERNAL_LABEL): Define.
	* config/mmix/mmix.c (mmix_asm_output_internal_label): New
	function.
	* config/mmix/mmix-protos.h (mmix_asm_output_internal_label):
	Prototype.

Index: mmix-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix-protos.h,v
retrieving revision 1.30
diff -p -c -r1.30 mmix-protos.h
*** mmix-protos.h	14 Jul 2004 06:24:20 -0000	1.30
--- mmix-protos.h	29 Dec 2004 11:28:30 -0000
*************** extern void mmix_output_quoted_string (F
*** 38,43 ****
--- 38,44 ----
  extern void mmix_asm_output_source_line  (FILE *, int);
  extern void mmix_asm_output_ascii (FILE *, const char *, int);
  extern void mmix_asm_output_label (FILE *, const char *);
+ extern void mmix_asm_output_internal_label (FILE *, const char *);
  extern void mmix_asm_weaken_label (FILE *, const char *);
  extern void mmix_asm_output_labelref (FILE *, const char *);
  extern void mmix_asm_output_def (FILE *, const char *, const char *);
Index: mmix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.c,v
retrieving revision 1.73
diff -p -c -r1.73 mmix.c
*** mmix.c	28 Dec 2004 23:19:12 -0000	1.73
--- mmix.c	29 Dec 2004 11:28:32 -0000
*************** mmix_asm_output_label (FILE *stream, con
*** 1369,1374 ****
--- 1369,1383 ----
    fprintf (stream, "\tIS @\n");
  }

+ /* ASM_OUTPUT_INTERNAL_LABEL.  */
+
+ void
+ mmix_asm_output_internal_label (FILE *stream, const char *name)
+ {
+   assemble_name_raw (stream, name);
+   fprintf (stream, "\tIS @\n");
+ }
+
  /* ASM_DECLARE_REGISTER_GLOBAL.  */

  void
Index: mmix.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.h,v
retrieving revision 1.70
diff -p -c -r1.70 mmix.h
*** mmix.h	13 Nov 2004 19:52:55 -0000	1.70
--- mmix.h	29 Dec 2004 11:28:32 -0000
*************** typedef struct { int regs; int lib; } CU
*** 900,905 ****
--- 901,909 ----
  #define ASM_OUTPUT_LABEL(STREAM, NAME) \
   mmix_asm_output_label (STREAM, NAME)

+ #define ASM_OUTPUT_INTERNAL_LABEL(STREAM, NAME) \
+  mmix_asm_output_internal_label (STREAM, NAME)
+
  #define ASM_DECLARE_REGISTER_GLOBAL(STREAM, DECL, REGNO, NAME) \
   mmix_asm_declare_register_global (STREAM, DECL, REGNO, NAME)

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]