Patchwork [alpha] : Some further configure cleanups

login
register
mail settings
Submitter Uros Bizjak
Date March 22, 2012, 12:49 p.m.
Message ID <CAFULd4Z5zMik_R4e0oGoeXH_P_kgzfAC20mcvDGh=YML1V_KQQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/148236/
State New
Headers show

Comments

Uros Bizjak - March 22, 2012, 12:49 p.m.
Hello!

This patch moves a couple of #defines from alpha/alpha.h to
alpha/vms.h to use generic defines from elfos.h.

2012-03-22  Uros Bizjak  <ubizjak@gmail.com>

	* config/alpha/alpha.h (ASM_OUTPUT_ALIGN): Move to elf.h
	(ASM_OUTPUT_SKIP): Move to vms.h
	(ASM_OUTPUT_LOCAL): Ditto.
	(ASM_OUTPUT_COMMON): Remove.
	* config/alpha/elf.h (ASM_OUTPUT_DEF_FROM_DECLS): Use ASM_OUTPUT_DEF.
	* config/alpha/vms.h (ASM_OUTPUT_ALIGN): Do not undefine before define.

Tested on alphaev68-pc-linux-gnu.

Tristan, since the patch touches alpha/vms.h, is this OK from VMS POV?

Uros.
Tristan Gingold - March 22, 2012, 1:06 p.m.
On Mar 22, 2012, at 1:49 PM, Uros Bizjak wrote:

> Hello!
> 
> This patch moves a couple of #defines from alpha/alpha.h to
> alpha/vms.h to use generic defines from elfos.h.
> 
> 2012-03-22  Uros Bizjak  <ubizjak@gmail.com>
> 
> 	* config/alpha/alpha.h (ASM_OUTPUT_ALIGN): Move to elf.h
> 	(ASM_OUTPUT_SKIP): Move to vms.h
> 	(ASM_OUTPUT_LOCAL): Ditto.
> 	(ASM_OUTPUT_COMMON): Remove.
> 	* config/alpha/elf.h (ASM_OUTPUT_DEF_FROM_DECLS): Use ASM_OUTPUT_DEF.
> 	* config/alpha/vms.h (ASM_OUTPUT_ALIGN): Do not undefine before define.
> 
> Tested on alphaev68-pc-linux-gnu.
> 
> Tristan, since the patch touches alpha/vms.h, is this OK from VMS POV?

Yes, it is.

Tristan.

> 
> Uros.
> <a.diff.txt>
Richard Henderson - March 22, 2012, 3:48 p.m.
On 03/22/12 05:49, Uros Bizjak wrote:
> 2012-03-22  Uros Bizjak  <ubizjak@gmail.com>
> 
> 	* config/alpha/alpha.h (ASM_OUTPUT_ALIGN): Move to elf.h
> 	(ASM_OUTPUT_SKIP): Move to vms.h
> 	(ASM_OUTPUT_LOCAL): Ditto.
> 	(ASM_OUTPUT_COMMON): Remove.
> 	* config/alpha/elf.h (ASM_OUTPUT_DEF_FROM_DECLS): Use ASM_OUTPUT_DEF.
> 	* config/alpha/vms.h (ASM_OUTPUT_ALIGN): Do not undefine before define.

Ok.


r~

Patch

Index: config/alpha/vms.h
===================================================================
--- config/alpha/vms.h	(revision 185677)
+++ config/alpha/vms.h	(working copy)
@@ -217,10 +217,22 @@ 
    that says to advance the location counter
    to a multiple of 2**LOG bytes.  */
 
-#undef ASM_OUTPUT_ALIGN
 #define ASM_OUTPUT_ALIGN(FILE,LOG)	\
     fprintf (FILE, "\t.align %d\n", LOG);
 
+/* This is how to advance the location counter by SIZE bytes.  */
+
+#define ASM_OUTPUT_SKIP(FILE,SIZE)  \
+  fprintf (FILE, "\t.space "HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))
+
+/* This says how to output an assembler line
+   to define a global common symbol.  */
+
+#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED)	\
+( fputs ("\t.lcomm ", (FILE)),				\
+  assemble_name ((FILE), (NAME)),			\
+  fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE)))
+
 /* Switch into a generic section.  */
 #define TARGET_ASM_NAMED_SECTION vms_asm_named_section
 
Index: config/alpha/elf.h
===================================================================
--- config/alpha/elf.h	(revision 185677)
+++ config/alpha/elf.h	(working copy)
@@ -27,9 +27,17 @@ 
 
 /* Do not output a .file directive at the beginning of the input file.  */
  
-#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
+#undef  TARGET_ASM_FILE_START_FILE_DIRECTIVE
 #define TARGET_ASM_FILE_START_FILE_DIRECTIVE false
 
+/* This is how to output an assembler line
+   that says to advance the location counter
+   to a multiple of 2**LOG bytes.  */
+
+#define ASM_OUTPUT_ALIGN(FILE,LOG)		\
+  if ((LOG) != 0)				\
+    fprintf (FILE, "\t.align %d\n", LOG);
+
 /* This says how to output assembler code to declare an
    uninitialized internal linkage data object.  Under SVR4,
    the linker seems to want the alignment of data objects
@@ -105,10 +113,7 @@ 
 	assemble_name (FILE, name);				\
 	fputs ("..ng\n", FILE);					\
       }								\
-    assemble_name(FILE, alias);					\
-    fputs(" = ", FILE);						\
-    assemble_name(FILE, name);					\
-    fputc('\n', FILE);						\
+    ASM_OUTPUT_DEF (FILE, alias, name);				\
   } while (0)
 
 /* Provide a STARTFILE_SPEC appropriate for ELF.  Here we add the
Index: config/alpha/alpha.h
===================================================================
--- config/alpha/alpha.h	(revision 185677)
+++ config/alpha/alpha.h	(working copy)
@@ -1036,36 +1036,6 @@ 
 
 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
   fprintf (FILE, "\t.gprel32 $L%d\n", (VALUE))
-
-/* This is how to output an assembler line
-   that says to advance the location counter
-   to a multiple of 2**LOG bytes.  */
-
-#define ASM_OUTPUT_ALIGN(FILE,LOG)	\
-  if ((LOG) != 0)			\
-    fprintf (FILE, "\t.align %d\n", LOG);
-
-/* This is how to advance the location counter by SIZE bytes.  */
-
-#undef ASM_OUTPUT_SKIP
-#define ASM_OUTPUT_SKIP(FILE,SIZE)  \
-  fprintf (FILE, "\t.space "HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))
-
-/* This says how to output an assembler line
-   to define a global common symbol.  */
-
-#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \
-( fputs ("\t.comm ", (FILE)),			\
-  assemble_name ((FILE), (NAME)),		\
-  fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE)))
-
-/* This says how to output an assembler line
-   to define a local common symbol.  */
-
-#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED)	\
-( fputs ("\t.lcomm ", (FILE)),				\
-  assemble_name ((FILE), (NAME)),			\
-  fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE)))
 
 
 /* Print operand X (an rtx) in assembler syntax to file FILE.