Patchwork Poison SMALL_REGISTER_CLASSES

login
register
mail settings
Submitter Steven Bosscher
Date Feb. 15, 2012, 6:54 p.m.
Message ID <CABu31nODerC62wX04UeaGF8VNhabE2L8=OTvD4Dn_GL1e58cdw@mail.gmail.com>
Download mbox | patch
Permalink /patch/141389/
State New
Headers show

Comments

Steven Bosscher - Feb. 15, 2012, 6:54 p.m.
On Wed, Feb 15, 2012 at 7:36 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hello,
>
> While going through some old patches of mine, I noticed this:
>
> config/rl78/rl78.h:#define SMALL_REGISTER_CLASSES               1
> config/rx/rx.h:#define SMALL_REGISTER_CLASSES           0
>
> Can't possibly work, that target macro was replaced with a hook.
>
> Attached patch OK for trunk?

And this will be needed to make those ports do what was intended:

	* config/rl78/rl78.h: Replace SMALL_REGISTER_CLASSES with hook.
	* config/rx/rx.h: Remove SMALL_REGISTER_CLASSES.
DJ Delorie - Feb. 15, 2012, 6:59 p.m.
I would classify these as "obvious" but please make sure they go in
before the poison patch ;-)

> And this will be needed to make those ports do what was intended:
> 
> 	* config/rl78/rl78.h: Replace SMALL_REGISTER_CLASSES with hook.
> 	* config/rx/rx.h: Remove SMALL_REGISTER_CLASSES.
> 
> Index: config/rl78/rl78.h
> ===================================================================
> --- config/rl78/rl78.h	(revision 184217)
> +++ config/rl78/rl78.h	(working copy)
> @@ -258,7 +258,7 @@ enum reg_class
>    { 0xff7fffff, 0x0000001f }	/* All registers.  */		\
>  }
> 
> -#define SMALL_REGISTER_CLASSES 		1
> +#define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
>  #define N_REG_CLASSES			(int) LIM_REG_CLASSES
>  #define CLASS_MAX_NREGS(CLASS, MODE)    ((GET_MODE_SIZE (MODE) \
>  					  + UNITS_PER_WORD - 1) \
Steven Bosscher - Feb. 15, 2012, 7:09 p.m.
On Wed, Feb 15, 2012 at 7:59 PM, DJ Delorie <dj@redhat.com> wrote:
>
> I would classify these as "obvious" but please make sure they go in
> before the poison patch ;-)
>
>> And this will be needed to make those ports do what was intended:
>>
>>       * config/rl78/rl78.h: Replace SMALL_REGISTER_CLASSES with hook.
>>       * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES.

I wasn't sure if these are obvious, because I already removed the
definition from rx.h before, see ChangeLog-2010. Maybe someone put it
back intentionally.

Ciao!
Steven
Mike Stump - Feb. 15, 2012, 10:16 p.m.
On Feb 15, 2012, at 11:09 AM, Steven Bosscher wrote:
> On Wed, Feb 15, 2012 at 7:59 PM, DJ Delorie <dj@redhat.com> wrote:
>> 
>> I would classify these as "obvious" but please make sure they go in
>> before the poison patch ;-)
>> 
>>> And this will be needed to make those ports do what was intended:
>>> 
>>>       * config/rl78/rl78.h: Replace SMALL_REGISTER_CLASSES with hook.
>>>       * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES.
> 
> I wasn't sure if these are obvious, because I already removed the
> definition from rx.h before, see ChangeLog-2010. Maybe someone put it
> back intentionally.

Nick did it (intentionally) with:

+2010-06-21  Nick Clifton  <nickc@redhat.com>
+
+       * config/rx/rx.h (PTRDIFF_TYPE): Define.
+       (SMALL_REGISTER_CLASS): Define (to zero).
+       (PRINT_OPERAND): Delete.
+       (PRINT_OPERAND_ADDRESS): Delete.
+       * config/rx/rx-protos.h (rx_print_operand): Delete prototype.
+       (rx_print_operand_address): Delete prototype.
+       * config/rx/rx.c (rx_print_operand): Make static.
+       Allow %H and %L to handle CONST_DOUBLEs.
+       (rx_print_operand_address): Make static.
+       (rx_gen_move_template): Rename local variable 'template' to
+       out_template.
+       (rx_function_arg): Do not pass unknown sized objects in
+       registers.
+       (TARGET_PRINT_OPERAND): Define.
+       (TARGET_PRINT_OPERAND_ADDRESS): Define.
Nick Clifton - Feb. 16, 2012, 4:23 p.m.
Hi Mike, Hi Steve,

>>>>        * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES.
>>
>> I wasn't sure if these are obvious, because I already removed the
>> definition from rx.h before, see ChangeLog-2010. Maybe someone put it
>> back intentionally.
>
> Nick did it (intentionally) with:

Sorry about that - sanfu - please consider the RX remove 
SMALL_REGISTER_CLASS (re)patch as obvious/approved.

Cheers
   Nick

Patch

Index: config/rl78/rl78.h
===================================================================
--- config/rl78/rl78.h	(revision 184217)
+++ config/rl78/rl78.h	(working copy)
@@ -258,7 +258,7 @@  enum reg_class
   { 0xff7fffff, 0x0000001f }	/* All registers.  */		\
 }

-#define SMALL_REGISTER_CLASSES 		1
+#define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
 #define N_REG_CLASSES			(int) LIM_REG_CLASSES
 #define CLASS_MAX_NREGS(CLASS, MODE)    ((GET_MODE_SIZE (MODE) \
 					  + UNITS_PER_WORD - 1) \
Index: config/rx/rx.h
===================================================================
--- config/rx/rx.h	(revision 184217)
+++ config/rx/rx.h	(working copy)
@@ -185,7 +185,6 @@  enum reg_class
   { 0x0000ffff }	/* All registers.  */		\
 }

-#define SMALL_REGISTER_CLASSES 		0
 #define N_REG_CLASSES			(int) LIM_REG_CLASSES
 #define CLASS_MAX_NREGS(CLASS, MODE)    ((GET_MODE_SIZE (MODE) \
 					  + UNITS_PER_WORD - 1) \