Patchwork RFA: Fix target/44750

login
register
mail settings
Submitter Joern Rennecke
Date Nov. 4, 2010, 6:25 p.m.
Message ID <20101104142521.ez0mn1k80g4ococo-nzlynne@webmail.spamcop.net>
Download mbox | patch
Permalink /patch/70154/
State New
Headers show

Comments

Joern Rennecke - Nov. 4, 2010, 6:25 p.m.
This patch fixes the remaining issues for the --enable-werror-always build
of pdp11.
tested by building 'all-gcc' for i686-pc-linux-gnu X pdp11-elf
using gcc (GCC) 4.6.0 20101103 (experimental).
2010-11-04  Joern Rennecke  <amylaar@spamcop.net>

	PR target/44750
	* config/pdp11/pdp11.c: (pdp11_secondary_reload): Now static.
	(pdp11_preferred_reload_class): Rename class to rclass.
	(pdp11_preferred_output_reload_class): Likewise.
	* config/pdp11/t-pdp11 (dwarf2out.o): Add -Wno-error=type-limits to
	ALL_COMPILERFLAGS .
	(java/constants.o): Add -Wno-error to ALL_COMPILERFLAGS.
Paul Koning - Nov. 4, 2010, 8:34 p.m.
Ok -- thanks!

	paul

On Nov 4, 2010, at 2:25 PM, Joern Rennecke wrote:

> This patch fixes the remaining issues for the --enable-werror-always build
> of pdp11.
> tested by building 'all-gcc' for i686-pc-linux-gnu X pdp11-elf
> using gcc (GCC) 4.6.0 20101103 (experimental).
> 2010-11-04  Joern Rennecke  <amylaar@spamcop.net>
> 
> 	PR target/44750
> 	* config/pdp11/pdp11.c: (pdp11_secondary_reload): Now static.
> 	(pdp11_preferred_reload_class): Rename class to rclass.
> 	(pdp11_preferred_output_reload_class): Likewise.
> 	* config/pdp11/t-pdp11 (dwarf2out.o): Add -Wno-error=type-limits to
> 	ALL_COMPILERFLAGS .
> 	(java/constants.o): Add -Wno-error to ALL_COMPILERFLAGS.
> 
> Index: config/pdp11/pdp11.c
> ===================================================================
> --- config/pdp11/pdp11.c	(revision 166313)
> +++ config/pdp11/pdp11.c	(working copy)
> @@ -1630,18 +1630,18 @@ pdp11_cannot_change_mode_class (enum mac
> loading is easier into LOAD_FPU_REGS than FPU_REGS! */
> 
> static reg_class_t
> -pdp11_preferred_reload_class (rtx x, reg_class_t class)
> +pdp11_preferred_reload_class (rtx x, reg_class_t rclass)
> {
> -  if (class == FPU_REGS)
> +  if (rclass == FPU_REGS)
>     return LOAD_FPU_REGS;
> -  if (class == ALL_REGS)
> +  if (rclass == ALL_REGS)
>     {
>       if (FLOAT_MODE_P (GET_MODE (x)))
> 	return LOAD_FPU_REGS;
>       else
> 	return GENERAL_REGS;
>     }
> -  return class;
> +  return rclass;
> }
> 
> /* TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
> @@ -1654,18 +1654,18 @@ pdp11_preferred_reload_class (rtx x, reg
> loading is easier into LOAD_FPU_REGS than FPU_REGS! */
> 
> static reg_class_t
> -pdp11_preferred_output_reload_class (rtx x, reg_class_t class)
> +pdp11_preferred_output_reload_class (rtx x, reg_class_t rclass)
> {
> -  if (class == FPU_REGS)
> +  if (rclass == FPU_REGS)
>     return LOAD_FPU_REGS;
> -  if (class == ALL_REGS)
> +  if (rclass == ALL_REGS)
>     {
>       if (FLOAT_MODE_P (GET_MODE (x)))
> 	return LOAD_FPU_REGS;
>       else
> 	return GENERAL_REGS;
>     }
> -  return class;
> +  return rclass;
> }
> 
> 
> @@ -1674,7 +1674,7 @@ pdp11_preferred_output_reload_class (rtx
>    FPU registers AC4 and AC5 (class NO_LOAD_FPU_REGS) require an 
>    intermediate register (AC0-AC3: LOAD_FPU_REGS).  Everything else
>    can be loade/stored directly.  */
> -reg_class_t 
> +static reg_class_t 
> pdp11_secondary_reload (bool in_p ATTRIBUTE_UNUSED,
> 			rtx x,
> 			reg_class_t reload_class,
> Index: config/pdp11/t-pdp11
> ===================================================================
> --- config/pdp11/t-pdp11	(revision 166313)
> +++ config/pdp11/t-pdp11	(working copy)
> @@ -34,3 +34,13 @@ dp-bit.c: $(srcdir)/config/fp-bit.c
> 	cat $(srcdir)/config/fp-bit.c > dp-bit.c
> 
> MULTILIB_OPTIONS = msoft-float
> +
> +# Because the pdp11 POINTER_SIZE is only 16, in dwarf2out.c,
> +# DWARF_ARANGES_PAD_SIZE is 0, thus a loop in output_aranges that checks
> +# (i < (unsigned) DWARF_ARANGES_PAD_SIZE) elicits a warning that the
> +# comparison is always false.
> +dwarf2out.o: ALL_COMPILERFLAGS += -Wno-error=type-limits
> +
> +# Likewise, java/constants.c:build_constants_constructor has a negative shift
> +# count (in never-executed code) due to the small POINTER_SIZE.
> +java/constants.o: ALL_COMPILERFLAGS += -Wno-error
Paul Koning - Nov. 4, 2010, 10:39 p.m.
My apologies, I misread the patch.  I can only approve the pdp11 part of this.

	paul

On Nov 4, 2010, at 4:34 PM, Paul Koning wrote:

> Ok -- thanks!
> 
> 	paul
> 
> On Nov 4, 2010, at 2:25 PM, Joern Rennecke wrote:
> 
>> This patch fixes the remaining issues for the --enable-werror-always build
>> of pdp11.
>> tested by building 'all-gcc' for i686-pc-linux-gnu X pdp11-elf
>> using gcc (GCC) 4.6.0 20101103 (experimental).
>> 2010-11-04  Joern Rennecke  <amylaar@spamcop.net>
>> 
>> 	PR target/44750
>> 	* config/pdp11/pdp11.c: (pdp11_secondary_reload): Now static.
>> 	(pdp11_preferred_reload_class): Rename class to rclass.
>> 	(pdp11_preferred_output_reload_class): Likewise.
>> 	* config/pdp11/t-pdp11 (dwarf2out.o): Add -Wno-error=type-limits to
>> 	ALL_COMPILERFLAGS .
>> 	(java/constants.o): Add -Wno-error to ALL_COMPILERFLAGS.
>> 
>> Index: config/pdp11/pdp11.c
>> ===================================================================
>> --- config/pdp11/pdp11.c	(revision 166313)
>> +++ config/pdp11/pdp11.c	(working copy)
>> @@ -1630,18 +1630,18 @@ pdp11_cannot_change_mode_class (enum mac
>> loading is easier into LOAD_FPU_REGS than FPU_REGS! */
>> 
>> static reg_class_t
>> -pdp11_preferred_reload_class (rtx x, reg_class_t class)
>> +pdp11_preferred_reload_class (rtx x, reg_class_t rclass)
>> {
>> -  if (class == FPU_REGS)
>> +  if (rclass == FPU_REGS)
>>    return LOAD_FPU_REGS;
>> -  if (class == ALL_REGS)
>> +  if (rclass == ALL_REGS)
>>    {
>>      if (FLOAT_MODE_P (GET_MODE (x)))
>> 	return LOAD_FPU_REGS;
>>      else
>> 	return GENERAL_REGS;
>>    }
>> -  return class;
>> +  return rclass;
>> }
>> 
>> /* TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
>> @@ -1654,18 +1654,18 @@ pdp11_preferred_reload_class (rtx x, reg
>> loading is easier into LOAD_FPU_REGS than FPU_REGS! */
>> 
>> static reg_class_t
>> -pdp11_preferred_output_reload_class (rtx x, reg_class_t class)
>> +pdp11_preferred_output_reload_class (rtx x, reg_class_t rclass)
>> {
>> -  if (class == FPU_REGS)
>> +  if (rclass == FPU_REGS)
>>    return LOAD_FPU_REGS;
>> -  if (class == ALL_REGS)
>> +  if (rclass == ALL_REGS)
>>    {
>>      if (FLOAT_MODE_P (GET_MODE (x)))
>> 	return LOAD_FPU_REGS;
>>      else
>> 	return GENERAL_REGS;
>>    }
>> -  return class;
>> +  return rclass;
>> }
>> 
>> 
>> @@ -1674,7 +1674,7 @@ pdp11_preferred_output_reload_class (rtx
>>   FPU registers AC4 and AC5 (class NO_LOAD_FPU_REGS) require an 
>>   intermediate register (AC0-AC3: LOAD_FPU_REGS).  Everything else
>>   can be loade/stored directly.  */
>> -reg_class_t 
>> +static reg_class_t 
>> pdp11_secondary_reload (bool in_p ATTRIBUTE_UNUSED,
>> 			rtx x,
>> 			reg_class_t reload_class,
>> Index: config/pdp11/t-pdp11
>> ===================================================================
>> --- config/pdp11/t-pdp11	(revision 166313)
>> +++ config/pdp11/t-pdp11	(working copy)
>> @@ -34,3 +34,13 @@ dp-bit.c: $(srcdir)/config/fp-bit.c
>> 	cat $(srcdir)/config/fp-bit.c > dp-bit.c
>> 
>> MULTILIB_OPTIONS = msoft-float
>> +
>> +# Because the pdp11 POINTER_SIZE is only 16, in dwarf2out.c,
>> +# DWARF_ARANGES_PAD_SIZE is 0, thus a loop in output_aranges that checks
>> +# (i < (unsigned) DWARF_ARANGES_PAD_SIZE) elicits a warning that the
>> +# comparison is always false.
>> +dwarf2out.o: ALL_COMPILERFLAGS += -Wno-error=type-limits
>> +
>> +# Likewise, java/constants.c:build_constants_constructor has a negative shift
>> +# count (in never-executed code) due to the small POINTER_SIZE.
>> +java/constants.o: ALL_COMPILERFLAGS += -Wno-error
>

Patch

Index: config/pdp11/pdp11.c
===================================================================
--- config/pdp11/pdp11.c	(revision 166313)
+++ config/pdp11/pdp11.c	(working copy)
@@ -1630,18 +1630,18 @@  pdp11_cannot_change_mode_class (enum mac
 loading is easier into LOAD_FPU_REGS than FPU_REGS! */
 
 static reg_class_t
-pdp11_preferred_reload_class (rtx x, reg_class_t class)
+pdp11_preferred_reload_class (rtx x, reg_class_t rclass)
 {
-  if (class == FPU_REGS)
+  if (rclass == FPU_REGS)
     return LOAD_FPU_REGS;
-  if (class == ALL_REGS)
+  if (rclass == ALL_REGS)
     {
       if (FLOAT_MODE_P (GET_MODE (x)))
 	return LOAD_FPU_REGS;
       else
 	return GENERAL_REGS;
     }
-  return class;
+  return rclass;
 }
 
 /* TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
@@ -1654,18 +1654,18 @@  pdp11_preferred_reload_class (rtx x, reg
 loading is easier into LOAD_FPU_REGS than FPU_REGS! */
 
 static reg_class_t
-pdp11_preferred_output_reload_class (rtx x, reg_class_t class)
+pdp11_preferred_output_reload_class (rtx x, reg_class_t rclass)
 {
-  if (class == FPU_REGS)
+  if (rclass == FPU_REGS)
     return LOAD_FPU_REGS;
-  if (class == ALL_REGS)
+  if (rclass == ALL_REGS)
     {
       if (FLOAT_MODE_P (GET_MODE (x)))
 	return LOAD_FPU_REGS;
       else
 	return GENERAL_REGS;
     }
-  return class;
+  return rclass;
 }
 
 
@@ -1674,7 +1674,7 @@  pdp11_preferred_output_reload_class (rtx
    FPU registers AC4 and AC5 (class NO_LOAD_FPU_REGS) require an 
    intermediate register (AC0-AC3: LOAD_FPU_REGS).  Everything else
    can be loade/stored directly.  */
-reg_class_t 
+static reg_class_t 
 pdp11_secondary_reload (bool in_p ATTRIBUTE_UNUSED,
 			rtx x,
 			reg_class_t reload_class,
Index: config/pdp11/t-pdp11
===================================================================
--- config/pdp11/t-pdp11	(revision 166313)
+++ config/pdp11/t-pdp11	(working copy)
@@ -34,3 +34,13 @@  dp-bit.c: $(srcdir)/config/fp-bit.c
 	cat $(srcdir)/config/fp-bit.c > dp-bit.c
 
 MULTILIB_OPTIONS = msoft-float
+
+# Because the pdp11 POINTER_SIZE is only 16, in dwarf2out.c,
+# DWARF_ARANGES_PAD_SIZE is 0, thus a loop in output_aranges that checks
+# (i < (unsigned) DWARF_ARANGES_PAD_SIZE) elicits a warning that the
+# comparison is always false.
+dwarf2out.o: ALL_COMPILERFLAGS += -Wno-error=type-limits
+
+# Likewise, java/constants.c:build_constants_constructor has a negative shift
+# count (in never-executed code) due to the small POINTER_SIZE.
+java/constants.o: ALL_COMPILERFLAGS += -Wno-error