This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [mmix] hookize FUNCTION_ARG &co.


On Fri, 8 Oct 2010, Nathan Froyd wrote:

> The patch below hookizes FUNCTION_ARG and related macros for the mmix
> backend.  Nothing special here.

Depends on the value of special...

>
> Tested by inspection with cross to mmix-knuth-mmixware.  I plan to commit
> this under the obvious rule after waiting a week for comments/approval.

No, not obvious.

> 	* config/mmix/mmix-protos.h (mmix_function_arg): Delete.
> 	* config/mmix/mmix.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
> 	* config/mmix/mmix.c (mmix_function_arg): Rename to...
> 	(mmix_function_arg_1): ...this.  Make static.  Take a const_tree and
> 	bool arguments.
> 	(mmix_function_arg): New function.
> 	(mmix_function_incoming_arg): New function.
> 	(mmix_function_arg_advance): New function.
> 	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_INCOMING_ARG): Define.
> 	(TARGET_FUNCTION_ARG_ADVANCE): Define.

> --- a/gcc/config/mmix/mmix.c

> -/* INCOMING_REGNO and OUTGOING_REGNO worker function.
> -   Those two macros must only be applied to function argument
> -   registers.  FIXME: for their current use in gcc, it'd be better
> -   with an explicit specific additional FUNCTION_INCOMING_ARG_REGNO_P
> -   a'la FUNCTION_ARG / FUNCTION_INCOMING_ARG instead of forcing the
> -   target to commit to a fixed mapping and for any unspecified
> -   register use.  */
> +/* INCOMING_REGNO and OUTGOING_REGNO worker function.  Those two macros
> +   must only be applied to function argument registers.  FIXME: for
> +   their current use in gcc, it'd be better with an explicit specific
> +   additional FUNCTION_INCOMING_ARG_REGNO_P a'la TARGET_FUNCTION_ARG /
> +   TARGET_FUNCTION_INCOMING_ARG instead of forcing the target to commit
> +   to a fixed mapping and for any unspecified register use.  */

No thanks, no reformatting.  (If you actually changed something
here, it's hard to spot at a glance.)

Actually, in mmix.c I see mostly a bunch of spurious changes
(most of the macros were calling mostly-compatible functions),
so I'm going to say no.

Please, in mmix.c, just staticize the global functions and
s/int/bool/ where necessary to fit the hook prototypes, add
mmix_function_arg_advance and resubmit.  Thanks in advance.

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]