public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Hookize TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
@ 2010-08-07  8:57 Anatoly Sokolov
  2010-08-10 15:39 ` Richard Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Anatoly Sokolov @ 2010-08-07  8:57 UTC (permalink / raw)
  To: gcc-patches

Hello.

  This patch turns TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA macro into a hook.

  The patch has been bootstrapped on and regression tested on
x86_64-unknown-linux-gnu for c and c++.

  This patch is pre-approved and should be committed within a week if no
objections.

        * target.def (output_addr_const_extra): New hook.
        * doc/tm.texi.in (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Document.
        * doc/tm.texi: Regenerate.
        * targhooks.c (default_asm_output_addr_const_extra): New function.
        * targhooks.h (default_asm_output_addr_const_extra): Declare.
        * final.c: (output_addr_const): Change second argument to const_rtx.
        Use TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA  target hook.
        * output.h (output_addr_const): Update signature.
        * varasm.c (simplify_subtraction): Change argument to const_rtx.
        * rtl.h (simplify_subtraction): Update signature.

        * config/i386/i386.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
        * config/i386/i386-protos.h (output_addr_const_extra): Remove.
        * config/i386/i386.h (output_addr_const_extra): Rename to...
        (i386_asm_output_addr_const_extra): ...this. Make static. Change
        second argument to const_rtx.
        (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define


Index: gcc/doc/tm.texi
===================================================================
--- gcc/doc/tm.texi     (revision 162975)
+++ gcc/doc/tm.texi     (working copy)
@@ -7410,6 +7410,18 @@
 when the relevant string is @code{NULL}.
 @end deftypefn
 
+@deftypefn {Target Hook} bool TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA (FILE *@var{file}, const_rtx @var{x})
+A target hook to recognize @var{rtx} patterns that @code{output_addr_const}
+can't deal with, and output assembly code to @var{file} corresponding to
+the pattern @var{x}.  This may be used to allow machine-dependent
+@code{UNSPEC}s to appear within constants.
+
+If target hook fails to recognize a pattern, it must return @code{false},
+so that a standard error message is printed.  If it prints an error message
+itself, by calling, for example, @code{output_operand_lossage}, it may just
+return @code{true}.
+@end deftypefn
+
 @defmac OUTPUT_ADDR_CONST_EXTRA (@var{stream}, @var{x}, @var{fail})
 A C statement to recognize @var{rtx} patterns that
 @code{output_addr_const} can't deal with, and output assembly code to
Index: gcc/doc/tm.texi.in
===================================================================
--- gcc/doc/tm.texi.in  (revision 162975)
+++ gcc/doc/tm.texi.in  (working copy)
@@ -7401,6 +7401,18 @@
 when the relevant string is @code{NULL}.
 @end deftypefn
 
+@hook TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
+A target hook to recognize @var{rtx} patterns that @code{output_addr_const}
+can't deal with, and output assembly code to @var{file} corresponding to
+the pattern @var{x}.  This may be used to allow machine-dependent
+@code{UNSPEC}s to appear within constants.
+
+If target hook fails to recognize a pattern, it must return @code{false},
+so that a standard error message is printed.  If it prints an error message
+itself, by calling, for example, @code{output_operand_lossage}, it may just
+return @code{true}.
+@end deftypefn
+
 @defmac OUTPUT_ADDR_CONST_EXTRA (@var{stream}, @var{x}, @var{fail})
 A C statement to recognize @var{rtx} patterns that
 @code{output_addr_const} can't deal with, and output assembly code to
Index: gcc/targhooks.c
===================================================================
--- gcc/targhooks.c     (revision 162975)
+++ gcc/targhooks.c     (working copy)
@@ -356,6 +356,21 @@
 #endif
 }
 
+/* The default implementation of TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA.  */
+
+bool
+default_asm_output_addr_const_extra (FILE *file ATTRIBUTE_UNUSED,
+                                    const_rtx x ATTRIBUTE_UNUSED)
+{
+#ifdef OUTPUT_ADDR_CONST_EXTRA
+  OUTPUT_ADDR_CONST_EXTRA (file, CONST_CAST_RTX (x), fail);
+  return true;
+
+fail:
+#endif
+  return false;
+}
+
 /* True if MODE is valid for the target.  By "valid", we mean able to
    be manipulated in non-trivial ways.  In particular, this means all
    the arithmetic is supported.
Index: gcc/targhooks.h
===================================================================
--- gcc/targhooks.h     (revision 162975)
+++ gcc/targhooks.h     (working copy)
@@ -65,6 +65,7 @@
 extern void default_print_operand (FILE *, rtx, int);
 extern void default_print_operand_address (FILE *, rtx);
 extern bool default_print_operand_punct_valid_p (unsigned char);
+extern bool default_asm_output_addr_const_extra (FILE *, const_rtx);
 
 extern bool default_scalar_mode_supported_p (enum machine_mode);
 extern bool default_decimal_float_supported_p (void);
Index: gcc/target.def
===================================================================
--- gcc/target.def      (revision 162975)
+++ gcc/target.def      (working copy)
@@ -415,6 +415,12 @@
  void ,(FILE *file, const char *name),
  default_asm_output_source_filename)
 
+DEFHOOK
+(output_addr_const_extra,
+ "",
+ bool, (FILE *file, const_rtx x),
+ default_asm_output_addr_const_extra)
+
 /* ??? The TARGET_PRINT_OPERAND* hooks are part of the asm_out struct,
    even though that is not reflected in the macro name to override their
    initializers.  */
Index: gcc/final.c
===================================================================
--- gcc/final.c	(revision 162975)
+++ gcc/final.c	(working copy)
@@ -3504,7 +3504,7 @@
    that may appear in these expressions.  */
 
 void
-output_addr_const (FILE *file, rtx x)
+output_addr_const (FILE *file, const_rtx x)
 {
   char buf[256];
 
@@ -3620,12 +3620,9 @@
       break;
 
     default:
-#ifdef OUTPUT_ADDR_CONST_EXTRA
-      OUTPUT_ADDR_CONST_EXTRA (file, x, fail);
-      break;
+      if (targetm.asm_out.output_addr_const_extra (file, x))
+       break;
 
-    fail:
-#endif
       output_operand_lossage ("invalid expression as operand");
     }
 }
Index: gcc/varasm.c
===================================================================
--- gcc/varasm.c        (revision 162975)
+++ gcc/varasm.c        (working copy)
@@ -3358,8 +3358,8 @@
 /* Given a MINUS expression, simplify it if both sides
    include the same symbol.  */
 
-rtx
-simplify_subtraction (rtx x)
+const_rtx
+simplify_subtraction (const_rtx x)
 {
   rtx r = simplify_rtx (x);
   return r ? r : x;
Index: gcc/rtl.h
===================================================================
--- gcc/rtl.h   (revision 162975)
+++ gcc/rtl.h   (working copy)
@@ -1628,7 +1628,7 @@
 extern rtx get_pool_constant (rtx);
 extern rtx get_pool_constant_mark (rtx, bool *);
 extern enum machine_mode get_pool_mode (const_rtx);
-extern rtx simplify_subtraction (rtx);
+extern const_rtx simplify_subtraction (const_rtx);
 
 /* In function.c  */
 extern rtx assign_stack_local (enum machine_mode, HOST_WIDE_INT, int);
Index: gcc/output.h
===================================================================
--- gcc/output.h        (revision 162975)
+++ gcc/output.h        (working copy)
@@ -115,7 +115,7 @@
 /* Print an integer constant expression in assembler syntax.
    Addition and subtraction are the only arithmetic
    that may appear in these expressions.  */
-extern void output_addr_const (FILE *, rtx);
+extern void output_addr_const (FILE *, const_rtx);
 
 /* Output a string of assembler code, substituting numbers, strings
    and fixed syntactic prefixes.  */
Index: gcc/config/i386/i386.h
===================================================================
--- gcc/config/i386/i386.h      (revision 162975)
+++ gcc/config/i386/i386.h      (working copy)
@@ -2117,12 +2117,6 @@
        "call " CRT_MKSTR(__USER_LABEL_PREFIX__) #FUNC "\n"     \
        TEXT_SECTION_ASM_OP);
 \f
-#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL)	\
-do {                                           \
-  if (! output_addr_const_extra (FILE, (X)))   \
-    goto FAIL;                                 \
-} while (0);
-\f
 /* Which processor to schedule for. The cpu attribute defines a list that
    mirrors this list, so changes to i386.md must be made at the same time.  */
 
Index: gcc/config/i386/i386-protos.h
===================================================================
--- gcc/config/i386/i386-protos.h       (revision 162975)
+++ gcc/config/i386/i386-protos.h       (working copy)
@@ -62,7 +62,6 @@
 
 extern void print_reg (rtx, int, FILE*);
 extern void ix86_print_operand (FILE *, rtx, int);
-extern bool output_addr_const_extra (FILE*, rtx);
 
 extern void split_di (rtx[], int, rtx[], rtx[]);
 extern void split_ti (rtx[], int, rtx[], rtx[]);
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c      (revision 162975)
+++ gcc/config/i386/i386.c      (working copy)
@@ -13125,8 +13125,10 @@
     }
 }
 
-bool
-output_addr_const_extra (FILE *file, rtx x)
+/* Implementation of TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA.  */
+
+static bool
+i386_asm_output_addr_const_extra (FILE *file, const_rtx x)
 {
   rtx op;
 
@@ -31540,6 +31542,8 @@
 #define TARGET_PRINT_OPERAND_ADDRESS ix86_print_operand_address
 #undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
 #define TARGET_PRINT_OPERAND_PUNCT_VALID_P ix86_print_operand_punct_valid_p
+#undef TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
+#define TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA i386_asm_output_addr_const_extra 
 
 #undef TARGET_SCHED_ADJUST_COST
 #define TARGET_SCHED_ADJUST_COST ix86_adjust_cost


 Anatoly.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Hookize TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
  2010-08-07  8:57 [PATCH] Hookize TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA Anatoly Sokolov
@ 2010-08-10 15:39 ` Richard Henderson
  2010-08-10 21:07   ` Re[2]: " Anatoly Sokolov
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Henderson @ 2010-08-10 15:39 UTC (permalink / raw)
  To: Anatoly Sokolov; +Cc: gcc-patches

On 08/07/2010 01:57 AM, Anatoly Sokolov wrote:
>         * target.def (output_addr_const_extra): New hook.
>         * doc/tm.texi.in (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Document.
>         * doc/tm.texi: Regenerate.

Ok, modulo since this is new documentation (OUTPUT_ADDR_CONST_EXTRA
was undocumented), the body of the documentation should be placed
in the target.def string.


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re[2]: [PATCH] Hookize TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
  2010-08-10 15:39 ` Richard Henderson
@ 2010-08-10 21:07   ` Anatoly Sokolov
  2010-08-10 21:14     ` Richard Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Anatoly Sokolov @ 2010-08-10 21:07 UTC (permalink / raw)
  To: Richard Henderson; +Cc: gcc-patches

Hello.

On 08/10/2010 01:57 AM, Richard Henderson wrote:
> On 08/07/2010 01:57 AM, Anatoly Sokolov wrote:
>>         * target.def (output_addr_const_extra): New hook.
>>         * doc/tm.texi.in (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Document.
>>         * doc/tm.texi: Regenerate.

> Ok, modulo since this is new  (OUTPUT_ADDR_CONST_EXTRA
> was undocumented), the body of the documentation should be placed
> in the target.def string.

  No, documentation of the TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA target hook is
modified version of the OUTPUT_ADDR_CONST_EXTRA macro documentation.

  I'm change type of the second argument of output_addr_const function
and TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA target from const_rtx back to rtx.
Use const_rtx causes bootsrap failure on hppa target.

  The patch has been bootstrapped on and regression tested on
x86_64-unknown-linux-gnu for c.

        * target.def (output_addr_const_extra): New hook.
        * doc/tm.texi.in (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Document.
        * doc/tm.texi: Regenerate.
        * targhooks.c (default_asm_output_addr_const_extra): New function.
        * targhooks.h (default_asm_output_addr_const_extra): Declare.
        * final.c: (output_addr_const): Use TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
        target hook.

        * config/i386/i386.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
        * config/i386/i386-protos.h (output_addr_const_extra): Remove.
        * config/i386/i386.h (output_addr_const_extra): Rename to...
        (i386_asm_output_addr_const_extra): ...this. Make static.
        (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define


Index: gcc/doc/tm.texi
===================================================================
--- gcc/doc/tm.texi     (revision 163077)
+++ gcc/doc/tm.texi     (working copy)
@@ -7410,6 +7410,18 @@
 when the relevant string is @code{NULL}.
 @end deftypefn
 
+@deftypefn {Target Hook} bool TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA (FILE *@var{file}, rtx @var{x})
+A target hook to recognize @var{rtx} patterns that @code{output_addr_const}
+can't deal with, and output assembly code to @var{file} corresponding to
+the pattern @var{x}.  This may be used to allow machine-dependent
+@code{UNSPEC}s to appear within constants.
+
+If target hook fails to recognize a pattern, it must return @code{false},
+so that a standard error message is printed.  If it prints an error message
+itself, by calling, for example, @code{output_operand_lossage}, it may just
+return @code{true}.
+@end deftypefn
+
 @defmac OUTPUT_ADDR_CONST_EXTRA (@var{stream}, @var{x}, @var{fail})
 A C statement to recognize @var{rtx} patterns that
 @code{output_addr_const} can't deal with, and output assembly code to
Index: gcc/doc/tm.texi.in
===================================================================
--- gcc/doc/tm.texi.in  (revision 163077)
+++ gcc/doc/tm.texi.in  (working copy)
@@ -7401,6 +7401,18 @@
 when the relevant string is @code{NULL}.
 @end deftypefn
 
+@hook TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
+A target hook to recognize @var{rtx} patterns that @code{output_addr_const}
+can't deal with, and output assembly code to @var{file} corresponding to
+the pattern @var{x}.  This may be used to allow machine-dependent
+@code{UNSPEC}s to appear within constants.
+
+If target hook fails to recognize a pattern, it must return @code{false},
+so that a standard error message is printed.  If it prints an error message
+itself, by calling, for example, @code{output_operand_lossage}, it may just
+return @code{true}.
+@end deftypefn
+
 @defmac OUTPUT_ADDR_CONST_EXTRA (@var{stream}, @var{x}, @var{fail})
 A C statement to recognize @var{rtx} patterns that
 @code{output_addr_const} can't deal with, and output assembly code to
Index: gcc/targhooks.c
===================================================================
--- gcc/targhooks.c     (revision 163077)
+++ gcc/targhooks.c     (working copy)
@@ -356,6 +356,21 @@
 #endif
 }
 
+/* The default implementation of TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA.  */
+
+bool
+default_asm_output_addr_const_extra (FILE *file ATTRIBUTE_UNUSED,
+                                    rtx x ATTRIBUTE_UNUSED)
+{
+#ifdef OUTPUT_ADDR_CONST_EXTRA
+  OUTPUT_ADDR_CONST_EXTRA (file, x, fail);
+  return true;
+
+fail:
+#endif
+  return false;
+}
+
 /* True if MODE is valid for the target.  By "valid", we mean able to
    be manipulated in non-trivial ways.  In particular, this means all
    the arithmetic is supported.
Index: gcc/targhooks.h
===================================================================
--- gcc/targhooks.h     (revision 163077)
+++ gcc/targhooks.h     (working copy)
@@ -65,6 +65,7 @@
 extern void default_print_operand (FILE *, rtx, int);
 extern void default_print_operand_address (FILE *, rtx);
 extern bool default_print_operand_punct_valid_p (unsigned char);
+extern bool default_asm_output_addr_const_extra (FILE *, rtx);
 
 extern bool default_scalar_mode_supported_p (enum machine_mode);
 extern bool default_decimal_float_supported_p (void);
Index: gcc/target.def
===================================================================
--- gcc/target.def      (revision 163077)
+++ gcc/target.def      (working copy)
@@ -415,6 +415,12 @@
  void ,(FILE *file, const char *name),
  default_asm_output_source_filename)
 
+DEFHOOK
+(output_addr_const_extra,
+ "",
+ bool, (FILE *file, rtx x),
+ default_asm_output_addr_const_extra)
+
 /* ??? The TARGET_PRINT_OPERAND* hooks are part of the asm_out struct,
    even though that is not reflected in the macro name to override their
    initializers.  */
Index: gcc/final.c
===================================================================
--- gcc/final.c	(revision 163077)
+++ gcc/final.c	(working copy)
@@ -3620,12 +3620,9 @@
       break;
 
     default:
-#ifdef OUTPUT_ADDR_CONST_EXTRA
-      OUTPUT_ADDR_CONST_EXTRA (file, x, fail);
-      break;
+      if (targetm.asm_out.output_addr_const_extra (file, x))
+       break;
 
-    fail:
-#endif
       output_operand_lossage ("invalid expression as operand");
     }
 }
Index: gcc/config/i386/i386.h
===================================================================
--- gcc/config/i386/i386.h      (revision 163077)
+++ gcc/config/i386/i386.h      (working copy)
@@ -2117,12 +2117,6 @@
        "call " CRT_MKSTR(__USER_LABEL_PREFIX__) #FUNC "\n"     \
        TEXT_SECTION_ASM_OP);
 \f
-#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL)	\
-do {                                           \
-  if (! output_addr_const_extra (FILE, (X)))   \
-    goto FAIL;                                 \
-} while (0);
-\f
 /* Which processor to schedule for. The cpu attribute defines a list that
    mirrors this list, so changes to i386.md must be made at the same time.  */
 
Index: gcc/config/i386/i386-protos.h
===================================================================
--- gcc/config/i386/i386-protos.h       (revision 163077)
+++ gcc/config/i386/i386-protos.h       (working copy)
@@ -62,7 +62,6 @@
 
 extern void print_reg (rtx, int, FILE*);
 extern void ix86_print_operand (FILE *, rtx, int);
-extern bool output_addr_const_extra (FILE*, rtx);
 
 extern void split_di (rtx[], int, rtx[], rtx[]);
 extern void split_ti (rtx[], int, rtx[], rtx[]);
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c      (revision 163077)
+++ gcc/config/i386/i386.c      (working copy)
@@ -13124,8 +13124,10 @@
     }
 }
 
-bool
-output_addr_const_extra (FILE *file, rtx x)
+/* Implementation of TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA.  */
+
+static bool
+i386_asm_output_addr_const_extra (FILE *file, rtx x)
 {
   rtx op;
 
@@ -31539,6 +31541,8 @@
 #define TARGET_PRINT_OPERAND_ADDRESS ix86_print_operand_address
 #undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
 #define TARGET_PRINT_OPERAND_PUNCT_VALID_P ix86_print_operand_punct_valid_p
+#undef TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
+#define TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA i386_asm_output_addr_const_extra 
 
 #undef TARGET_SCHED_ADJUST_COST
 #define TARGET_SCHED_ADJUST_COST ix86_adjust_cost



Anatoly.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Hookize TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
  2010-08-10 21:07   ` Re[2]: " Anatoly Sokolov
@ 2010-08-10 21:14     ` Richard Henderson
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2010-08-10 21:14 UTC (permalink / raw)
  To: Anatoly Sokolov; +Cc: gcc-patches

On 08/10/2010 01:23 PM, Anatoly Sokolov wrote:
>   No, documentation of the TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA target hook is
> modified version of the OUTPUT_ADDR_CONST_EXTRA macro documentation.

Huh.  I missed that O_A_C_E was documented previously.

>   I'm change type of the second argument of output_addr_const function
> and TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA target from const_rtx back to rtx.
> Use const_rtx causes bootsrap failure on hppa target.

Ok.


r~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Hookize TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
  2010-08-07 10:30 Dominique Dhumieres
@ 2010-08-07 11:06 ` Anatoly Sokolov
  0 siblings, 0 replies; 6+ messages in thread
From: Anatoly Sokolov @ 2010-08-07 11:06 UTC (permalink / raw)
  To: gcc-patches, Dominique Dhumieres

Hi.
From: "Dominique Dhumieres" <dominiq@lps.ens.fr>

>> This patch turns TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA macro into a hook.
>>
>>   The patch has been bootstrapped on and regression tested on
>> x86_64-unknown-linux-gnu for c and c++.
>
> Athough I don't understand anything about the hook changes I find
> quite wierd that it is tested on x86_64-unknown-linux-gnu only
> and not on other platforms and that OUTPUT_ADDR_CONST_EXTRA is
> removed on config/i386/ only. A grep for OUTPUT_ADDR_CONST_EXTRA
> on gcc/config/* returns
>
> gcc/config/arm/arm.h:#define OUTPUT_ADDR_CONST_EXTRA(file, x, fail) \
....
> gcc/config/xtensa/xtensa.h:#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, 
> FAIL) \
>
> I am quite surprised that OUTPUT_ADDR_CONST_EXTRA is not removed
> also for the non i386 platforms. Am I wrong?
>

Because compilation and testings time of the GCC for each platform very big, 
I prefer hookize target macros tatget-by-target.

Anatoly.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Hookize TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
@ 2010-08-07 10:30 Dominique Dhumieres
  2010-08-07 11:06 ` Anatoly Sokolov
  0 siblings, 1 reply; 6+ messages in thread
From: Dominique Dhumieres @ 2010-08-07 10:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: aesok

> This patch turns TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA macro into a hook.
>
>   The patch has been bootstrapped on and regression tested on
> x86_64-unknown-linux-gnu for c and c++.

Athough I don't understand anything about the hook changes I find
quite wierd that it is tested on x86_64-unknown-linux-gnu only
and not on other platforms and that OUTPUT_ADDR_CONST_EXTRA is
removed on config/i386/ only. A grep for OUTPUT_ADDR_CONST_EXTRA
on gcc/config/* returns

gcc/config/arm/arm.h:#define OUTPUT_ADDR_CONST_EXTRA(file, x, fail)		\
gcc/config/cris/cris.c:/* Worker function for OUTPUT_ADDR_CONST_EXTRA.  */
gcc/config/cris/cris.h:#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \
gcc/config/i386/i386.h:#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL)	\
gcc/config/m68k/m68k.c:/* m68k implementation of OUTPUT_ADDR_CONST_EXTRA.  */
gcc/config/m68k/m68k.h:#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL)		\
gcc/config/mn10300/mn10300.h:#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \
gcc/config/rs6000/rs6000.c:/* Implement OUTPUT_ADDR_CONST_EXTRA for address X.  */
gcc/config/rs6000/rs6000.h:#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL)		\
gcc/config/s390/s390.h:#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL)		\
gcc/config/sh/sh.h:#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \
gcc/config/v850/v850.h:#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL)  \
gcc/config/xtensa/xtensa.h:#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL)			\

I am quite surprised that OUTPUT_ADDR_CONST_EXTRA is not removed
also for the non i386 platforms. Am I wrong?

Cheers

Dominique

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-10 21:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-07  8:57 [PATCH] Hookize TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA Anatoly Sokolov
2010-08-10 15:39 ` Richard Henderson
2010-08-10 21:07   ` Re[2]: " Anatoly Sokolov
2010-08-10 21:14     ` Richard Henderson
2010-08-07 10:30 Dominique Dhumieres
2010-08-07 11:06 ` Anatoly Sokolov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).