diff mbox

Re[2]: [SPARC] Hookize PRINT_OPERAND, PRINT_OPERAND_ADDRESS and PRINT_OPERAND_PUNCT_VALID_P

Message ID 768470406.20110504213221@post.ru
State New
Headers show

Commit Message

Anatoly Sokolov May 4, 2011, 5:32 p.m. UTC
Hi.

> Richard Henderson <rth@redhat.com> writes:

>> On 04/27/2011 11:13 AM, Anatoly Sokolov wrote:
>>>         * config/sparc/sparc.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS,
>>>         PRINT_OPERAND_PUNCT_VALID_P): Remove.
>>>         * config/sparc/sparc-protos.h (print_operand): Remove declaration.
>>>         * config/sparc/sparc.c (TARGET_PRINT_OPERAND_PUNCT_VALID_P,
>>>         TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS): Define.
>>>         (print_operand): Rename to...
>>>         (sparc_print_operand): ...this. Make static. Adjust
>>>         sparc_print_operand function call.
>>>         (sparc_print_operand_punct_valid_p, sparc_print_operand_address): New
>>>         functions.

> This patch broke Solaris 2/SPARC bootstrap which still uses
> print_operand in sparc/sol2.h (ASM_OUTPUT_CALL).  A bootstrap with the
> obvious fix is currently running.

> What is so hard about running grep when removing/renaming symbols???

Sorry for my mistake. I think that the patch is obvious, but I have no 
capability to test it. 


        * config/sparc/sol.h (ASM_OUTPUT_CALL): Use print_operand target
        hook.



Anatoly.

Comments

Rainer Orth May 4, 2011, 5:43 p.m. UTC | #1
Hi Anatoly,

> Sorry for my mistake. I think that the patch is obvious, but I have no 
> capability to test it. 
>
>
>         * config/sparc/sol.h (ASM_OUTPUT_CALL): Use print_operand target
>         hook.
>
>
> Index: gcc/config/sparc/sol2.h
> ===================================================================
> --- gcc/config/sparc/sol2.h     (revision 173212)
> +++ gcc/config/sparc/sol2.h     (working copy)
> @@ -172,7 +172,7 @@
>    do                                                           \
>      {                                                          \
>        fprintf (FILE, "\tcall\t");                              \
> -      print_operand (FILE, XEXP (DECL_RTL (FN), 0), 0);        \
> +      targetm.asm_out.print_operand (FILE, XEXP (DECL_RTL (FN), 0), 0);        \
>        fprintf (FILE, "\n\tnop\n");                             \
>      }                                                          \
>    while (0)

I thought so, too, but you also need to include target.h in
config/sol2.c.  I'm currently testing such a patch; will commit tomorrow
if bootstrap passes.

You could at least test it by cross-building cc1 for
sparc-sun-solaris2.10, which failed to link.

	Rainer
diff mbox

Patch

Index: gcc/config/sparc/sol2.h
===================================================================
--- gcc/config/sparc/sol2.h     (revision 173212)
+++ gcc/config/sparc/sol2.h     (working copy)
@@ -172,7 +172,7 @@ 
   do                                                           \
     {                                                          \
       fprintf (FILE, "\tcall\t");                              \
-      print_operand (FILE, XEXP (DECL_RTL (FN), 0), 0);        \
+      targetm.asm_out.print_operand (FILE, XEXP (DECL_RTL (FN), 0), 0);        \
       fprintf (FILE, "\n\tnop\n");                             \
     }                                                          \
   while (0)