Patchwork RFA: Fix frv --enable-werror-always build

login
register
mail settings
Submitter Joern Rennecke
Date Nov. 10, 2010, 4:09 p.m.
Message ID <20101110110912.4ly2ooocdko0s408-nzlynne@webmail.spamcop.net>
Download mbox | patch
Permalink /patch/70645/
State New
Headers show

Comments

Joern Rennecke - Nov. 10, 2010, 4:09 p.m.
built on i686-pc-linux-gnu with gcc (GCC) 4.6.0 20101103 (experimental) .
2010-11-10  Joern Rennecke  <amylaar@spamcop.net>

	PR target/46415
	* config/mmix/mmix-protos.h (mmix_local_alignment): Update prototype.
	(mmix_dbx_register_number): Likewise.
	* config/mmix/mmix.c: Include df.h .
	(mmix_local_alignment): Change argument basic_align and return type
	to unsigned.
	(mmix_dbx_register_number): Change return type to unsigned.
	(mmix_expand_prologue): Use add_reg_note.
Hans-Peter Nilsson - Nov. 10, 2010, 4:39 p.m.
Typo in subject... frv != MMIX.

On Wed, 10 Nov 2010, Joern Rennecke wrote:

> built on i686-pc-linux-gnu with gcc (GCC) 4.6.0 20101103 (experimental) .

(patch not inlined, so I can't quote it as trivially as above.)

Please also change mmix_dbx_register_number to also take its
parameter as an unsigned, or there'd be an odd asymmetry.
(Alternatively, add a comment why that doesn't work.)

Ok with that change.  Thanks!

brgds, H-P

Patch

Index: config/mmix/mmix-protos.h
===================================================================
--- config/mmix/mmix-protos.h	(revision 166491)
+++ config/mmix/mmix-protos.h	(working copy)
@@ -48,12 +48,12 @@  extern void mmix_output_register_setting
 extern void mmix_conditional_register_usage (void);
 extern int mmix_opposite_regno (int, int);
 extern int mmix_local_regno (int);
-extern int mmix_dbx_register_number (int);
+extern unsigned mmix_dbx_register_number (int);
 extern int mmix_use_simple_return (void);
 extern void mmix_make_decl_one_only (tree);
 extern int mmix_data_alignment (tree, int);
 extern int mmix_constant_alignment (tree, int);
-extern int mmix_local_alignment (tree, int);
+extern unsigned mmix_local_alignment (tree, unsigned);
 extern void mmix_asm_output_pool_prologue (FILE *, const char *, tree, int);
 extern void mmix_asm_output_aligned_common (FILE *, const char *, int, int);
 extern void mmix_asm_output_aligned_local (FILE *, const char *, int, int);
Index: config/mmix/mmix.c
===================================================================
--- config/mmix/mmix.c	(revision 166491)
+++ config/mmix/mmix.c	(working copy)
@@ -45,6 +45,7 @@  the Free Software Foundation; either ver
 #include "integrate.h"
 #include "target.h"
 #include "target-def.h"
+#include "df.h"
 
 /* First some local helper definitions.  */
 #define MMIX_FIRST_GLOBAL_REGNUM 32
@@ -327,8 +328,8 @@  mmix_constant_alignment (tree constant A
 
 /* LOCAL_ALIGNMENT.  */
 
-int
-mmix_local_alignment (tree type ATTRIBUTE_UNUSED, int basic_align)
+unsigned
+mmix_local_alignment (tree type ATTRIBUTE_UNUSED, unsigned basic_align)
 {
   if (basic_align < 32)
     return 32;
@@ -1901,7 +1902,7 @@  mmix_asm_output_align (FILE *stream, int
 
 /* DBX_REGISTER_NUMBER.  */
 
-int
+unsigned
 mmix_dbx_register_number (int regno)
 {
   /* Adjust the register number to the one it will be output as, dammit.
@@ -2110,14 +2111,12 @@  mmix_expand_prologue (void)
 							 offset)),
 			     tmpreg);
       RTX_FRAME_RELATED_P (insn) = 1;
-      REG_NOTES (insn)
-	= gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
-			     gen_rtx_SET (VOIDmode,
-					  gen_rtx_MEM (DImode,
-						       plus_constant (stack_pointer_rtx,
-								      offset)),
-					  retreg),
-			     REG_NOTES (insn));
+      add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+		    gen_rtx_SET (VOIDmode,
+				 gen_rtx_MEM (DImode,
+					      plus_constant (stack_pointer_rtx,
+							     offset)),
+				 retreg));
 
       offset -= 8;
     }