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: do_global_ctors_aux vs. pt placement


> ptabs-diff-20050414-2* works fine on sh64-unknown-linux-gnu.
> There are no regressions for c, c++ and libstdc++-v3 tests.

Sorry, I've run all tests with -mpt-fixed accidentally.  Without
-mpt-fixed, some pch tests fail in the compiler testsuite.  The first
failed test is gcc.dg/pch/save-temps-1.c.  In that case, it looks that
the value of the option string gettrcost= is "100" in .gch and "" at
sh_pch_valid_p when the later compilation is done with -E option.
sh_gettrcost_str is set to "100" in CONDITIONAL_REGISTER_USAGE but it
isn't called in the above -E case.  Can we set sh_gettrcost_str in
OVERRIDE_OPTIONS?
The appended patch gets rid of all such pch test failures.

Regards,
	kaz
--

--- LOCAL/gcc-4.1-sh/gcc/config/sh/sh.h	Sat Apr 16 09:18:40 2005
+++ TMP/gcc-4.1-sh/gcc/config/sh/sh.h	Sat Apr 16 09:04:09 2005
@@ -120,6 +120,8 @@ do { \
     {									\
       regno_reg_class[FIRST_GENERAL_REG] = GENERAL_REGS;		\
       CLEAR_HARD_REG_SET (reg_class_contents[FP0_REGS]);		\
+      if (!TARGET_PT_FIXED && !*sh_gettrcost_str)			\
+	sh_gettrcost_str = "100";					\
       regno_reg_class[FIRST_FP_REG] = FP_REGS;				\
     }									\
   if (flag_pic)								\
@@ -924,8 +926,6 @@ do {									\
 		sh_div_strategy = SH_DIV_INV;				\
 	    }								\
 	}								\
-      if (!TARGET_PT_FIXED && !*sh_gettrcost_str)			\
-	sh_gettrcost_str = "100";					\
       /* -fprofile-arcs needs a working libgcov .  In unified tree	\
 	 configurations with newlib, this requires to configure with	\
 	 --with-newlib --with-headers.  But there is no way to check	\


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