Commit 37d7333e by Jeff Law

pa.h (target_switches): Add "-mtrailing-colon"

	* pa.h (target_switches): Add "-mtrailing-colon"
	(ASM_OUTPUT_LABEL): If TARGET_TRAILING_COLON then emit
	a colon after the label.
	(ASM_OUTPUT_INTERNAL_LABEL): Likewise.
	(ASM_OUTPUT_COMMON): Likewise.
	(ASM_OUTPUT_LOCAL): Likewise.

From-SVN: r3154
parent 957f7fb8
...@@ -74,6 +74,11 @@ extern int target_flags; ...@@ -74,6 +74,11 @@ extern int target_flags;
#define TARGET_DISABLE_INDEXING (target_flags & 32) #define TARGET_DISABLE_INDEXING (target_flags & 32)
/* Force a colon to be tacked onto the end of local and global
labels. An option because the HP assembler croaks on them. */
#define TARGET_TRAILING_COLON (target_flags & 64)
/* Macro to define tables used to set the flags. /* Macro to define tables used to set the flags.
This is a list in braces of pairs in braces, This is a list in braces of pairs in braces,
each pair being { "NAME", VALUE } each pair being { "NAME", VALUE }
...@@ -91,6 +96,7 @@ extern int target_flags; ...@@ -91,6 +96,7 @@ extern int target_flags;
{"no-shared-libs", -8},\ {"no-shared-libs", -8},\
{"long-calls", 16}, \ {"long-calls", 16}, \
{"disable-indexing", 32},\ {"disable-indexing", 32},\
{"trailing-colon", 64},\
{ "", TARGET_DEFAULT}} { "", TARGET_DEFAULT}}
#ifndef TARGET_DEFAULT #ifndef TARGET_DEFAULT
...@@ -1542,7 +1548,10 @@ bss_section () \ ...@@ -1542,7 +1548,10 @@ bss_section () \
such as the label on a static function or variable NAME. */ such as the label on a static function or variable NAME. */
#define ASM_OUTPUT_LABEL(FILE, NAME) \ #define ASM_OUTPUT_LABEL(FILE, NAME) \
do { assemble_name (FILE, NAME); fputc ('\n', FILE); } while (0) do { assemble_name (FILE, NAME); \
if (TARGET_TRAILING_COLON) \
fputc (':', FILE); \
fputc ('\n', FILE); } while (0)
/* This is how to output a command to make the user-level label named NAME /* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */ defined for reference from other files. */
...@@ -1596,7 +1605,11 @@ bss_section () \ ...@@ -1596,7 +1605,11 @@ bss_section () \
PREFIX is the class of label and NUM is the number within the class. */ PREFIX is the class of label and NUM is the number within the class. */
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
fprintf (FILE, "%s$%04d\n", PREFIX, NUM) {fprintf (FILE, "%s$%04d", PREFIX, NUM); \
if (TARGET_TRAILING_COLON) \
fputs (":\n", FILE); \
else \
fputs (":\n", FILE);}
/* This is how to store into the string LABEL /* This is how to store into the string LABEL
the symbol_ref name of an internal numbered label where the symbol_ref name of an internal numbered label where
...@@ -1697,19 +1710,23 @@ bss_section () \ ...@@ -1697,19 +1710,23 @@ bss_section () \
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
( bss_section (), \ { bss_section (); \
assemble_name ((FILE), (NAME)), \ assemble_name ((FILE), (NAME)); \
fputs ("\t.comm ", (FILE)), \ if (TARGET_TRAILING_COLON) \
fprintf ((FILE), "%d\n", (ROUNDED))) fputc (':', (FILE)); \
fputs ("\t.comm ", (FILE)); \
fprintf ((FILE), "%d\n", (ROUNDED));}
/* This says how to output an assembler line /* This says how to output an assembler line
to define a local common symbol. */ to define a local common symbol. */
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
( bss_section (), \ { bss_section (); \
fprintf ((FILE), "\t.align %d\n", (SIZE) <= 4 ? 4 : 8), \ fprintf ((FILE), "\t.align %d\n", (SIZE) <= 4 ? 4 : 8); \
assemble_name ((FILE), (NAME)), \ assemble_name ((FILE), (NAME)); \
fprintf ((FILE), "\n\t.block %d\n", (ROUNDED))) if (TARGET_TRAILING_COLON) \
fputc (':', (FILE)); \
fprintf ((FILE), "\n\t.block %d\n", (ROUNDED));}
/* Store in OUTPUT a string (made with alloca) containing /* Store in OUTPUT a string (made with alloca) containing
an assembler-name for a local static variable named NAME. an assembler-name for a local static variable named NAME.
......
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