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]

patch applied to sh-elf-4.1-branch sh.h


It turns out that I didn't see the IEEE problems because the configuration I tested defaulted to SH1.
Hence, the test (TARGET_SH2E && !TARGET_IEEE) in OPTIMIZATION_OPTIONS was
always false.
2005-04-11  J"orn Rennecke <joern.rennecke@st.com>

	* sh.h (OPTIMIZATION_OPTIONS): Don't make setting of
	flag_branch_target_load_optimize dependent on TARGET_SHMEDIA.
	Set flag_finite_math_only to 2.
	If flag_finite_math_only set set to 2, set it to 1 iff
	we use SH2E..SH4 arithmetic without full IEEE support.

Index: config/sh/sh.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.h,v
retrieving revision 1.262.2.1
diff -p -r1.262.2.1 sh.h
*** config/sh/sh.h	8 Apr 2005 17:41:30 -0000	1.262.2.1
--- config/sh/sh.h	11 Apr 2005 14:03:07 -0000
*************** do {									\
*** 776,789 ****
        target_flags |= SPACE_BIT;					\
        sh_div_str = "call";						\
      }									\
!   if (TARGET_SHMEDIA && LEVEL > 1)					\
      {									\
        flag_branch_target_load_optimize = 1;				\
        if (! (SIZE))							\
  	target_flags |= SAVE_ALL_TR_BIT;				\
      }									\
!   if (TARGET_SH2E && ! TARGET_IEEE)					\
!     flag_finite_math_only = 1;						\
  } while (0)
  
  #define ASSEMBLER_DIALECT assembler_dialect
--- 776,796 ----
        target_flags |= SPACE_BIT;					\
        sh_div_str = "call";						\
      }									\
!   /* We can't meaningfully test TARGET_SHMEDIA here, because -m options	\
!      haven't been parsed yet, hence we';d read only the default.	\
!      sh_target_reg_class will return NO_REGS if this is not SHMEDIA, so	\
!      it's OK to always set flag_branch_target_load_optimize.  */	\
!   if (LEVEL > 1)							\
      {									\
        flag_branch_target_load_optimize = 1;				\
        if (! (SIZE))							\
  	target_flags |= SAVE_ALL_TR_BIT;				\
      }									\
!   /* Likewise, we can't meaningfully test TARGET_SH2E / TARGET_IEEE	\
!      here, so leave it to OVERRIDE_OPTIONS to set			\
!     flag_finite_math_only.  We set it to 2 here so we know if the user	\
!     explicitly requested this to be on or off.  */			\
!   flag_finite_math_only = 2;						\
  } while (0)
  
  #define ASSEMBLER_DIALECT assembler_dialect
*************** extern enum sh_divide_strategy_e sh_div_
*** 809,814 ****
--- 816,823 ----
  do {									\
    int regno;								\
  									\
+   if (flag_finite_math_only == 2)					\
+     flag_finite_math_only = TARGET_SH2E && ! TARGET_IEEE;		\
    sh_cpu = CPU_SH1;							\
    assembler_dialect = 0;						\
    if (TARGET_SH2)							\

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