diff options
author | Christian Bruel <christian.bruel@st.com> | 2013-04-22 09:16:21 +0200 |
---|---|---|
committer | Christian Bruel <chrbr@gcc.gnu.org> | 2013-04-22 09:16:21 +0200 |
commit | 1818d01c42aa11ae2298b12625a040a6f76ce1f8 (patch) | |
tree | 721b4cab3666b6b5635cfb48a09c3d4e3a8573f4 /gcc | |
parent | 3e8a33f96b74947776324692e9f0b91fa93c4771 (diff) | |
download | gcc-1818d01c42aa11ae2298b12625a040a6f76ce1f8.zip gcc-1818d01c42aa11ae2298b12625a040a6f76ce1f8.tar.gz gcc-1818d01c42aa11ae2298b12625a040a6f76ce1f8.tar.bz2 |
re PR target/56995 (sh4 -mfmovd: ICE in find_costs_and_classes)
2013-04-18 Christian Bruel <christian.bruel@st.com>
PR target/56995
* config/sh/sh.h (enum reg_class): Remove DF_HI_REGS.
(REG_CLASS_NAMES): Idem.
(REG_CLASS_CONTENTS): Idem.
(REGCLASS_HAS_FP_REG): Idem.
* config/sh/sh.c (sh_cannot_change_mode_class): Idem.
(sh_conditional_register_usage): Idem.
From-SVN: r198123
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 6 | ||||
-rw-r--r-- | gcc/config/sh/sh.h | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/sh/mfmovd.c | 9 |
5 files changed, 26 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 469a8b9..261b6a7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2013-04-18 Christian Bruel <christian.bruel@st.com> + + PR target/56995 + * config/sh/sh.h (enum reg_class): Remove DF_HI_REGS. + (REG_CLASS_NAMES): Idem. + (REG_CLASS_CONTENTS): Idem. + (REGCLASS_HAS_FP_REG): Idem. + * config/sh/sh.c (sh_cannot_change_mode_class): Idem. + (sh_conditional_register_usage): Idem. + 2013-04-21 Jeff Law <law@redhat.com> * tree-ssa-forwprop.c (simplify_conversion_from_bitmask): New function. diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index a4bb62a..c61952e 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -12163,7 +12163,7 @@ sh_cannot_change_mode_class (enum machine_mode from, enum machine_mode to, else { if (GET_MODE_SIZE (from) < 8) - return reg_classes_intersect_p (DF_HI_REGS, rclass); + return reg_classes_intersect_p (DF_REGS, rclass); } } return false; @@ -13210,9 +13210,7 @@ sh_conditional_register_usage (void) call_really_used_regs[MACH_REG] = 0; call_really_used_regs[MACL_REG] = 0; } - for (regno = FIRST_FP_REG + (TARGET_LITTLE_ENDIAN != 0); - regno <= LAST_FP_REG; regno += 2) - SET_HARD_REG_BIT (reg_class_contents[DF_HI_REGS], regno); + if (TARGET_SHMEDIA) { for (regno = FIRST_TARGET_REG; regno <= LAST_TARGET_REG; regno ++) diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 3744f98..8e27030 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -984,7 +984,6 @@ enum reg_class GENERAL_REGS, FP0_REGS, FP_REGS, - DF_HI_REGS, DF_REGS, FPSCR_REGS, GENERAL_FP_REGS, @@ -1010,7 +1009,6 @@ enum reg_class "GENERAL_REGS", \ "FP0_REGS", \ "FP_REGS", \ - "DF_HI_REGS", \ "DF_REGS", \ "FPSCR_REGS", \ "GENERAL_FP_REGS", \ @@ -1046,8 +1044,6 @@ enum reg_class { 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000 }, \ /* FP_REGS: */ \ { 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, \ -/* DF_HI_REGS: Initialized in TARGET_CONDITIONAL_REGISTER_USAGE. */ \ - { 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x0000ff00 }, \ /* DF_REGS: */ \ { 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x0000ff00 }, \ /* FPSCR_REGS: */ \ @@ -1922,7 +1918,7 @@ struct sh_args { #define REGCLASS_HAS_FP_REG(CLASS) \ ((CLASS) == FP0_REGS || (CLASS) == FP_REGS \ - || (CLASS) == DF_REGS || (CLASS) == DF_HI_REGS) + || (CLASS) == DF_REGS) /* ??? Perhaps make MEMORY_MOVE_COST depend on compiler option? This would be so that people with slow memory systems could generate diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0c05a76..2ba5044 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-04-18 Christian Bruel <christian.bruel@st.com> + + PR target/56995 + * gcc.target/sh/mfmovd.c: Add new function and check hard_float. + 2013-04-21 Jeff Law <law@redhat.com> * gcc.dg/tree-ssa/forwprop-26.c: New test. diff --git a/gcc/testsuite/gcc.target/sh/mfmovd.c b/gcc/testsuite/gcc.target/sh/mfmovd.c index b5653c7..3b7564a 100644 --- a/gcc/testsuite/gcc.target/sh/mfmovd.c +++ b/gcc/testsuite/gcc.target/sh/mfmovd.c @@ -1,8 +1,9 @@ /* Verify that we generate fmov.d instructions to move doubles when -mfmovd option is enabled. */ /* { dg-do compile { target "sh*-*-*" } } */ +/* { dg-require-effective-target hard_float } */ /* { dg-options "-mfmovd" } */ -/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a" "-m2a-single" "-m4" "-m4-single" "-m4-100" "-m4-100-single" "-m4-200" "-m4-200-single" "-m4-300" "-m4-300-single" "-m4a" "-m4a-single" } } */ +/* { dg-skip-if "" { *-*-* } { "*-single-only" } { "" } } */ /* { dg-final { scan-assembler "fmov.d" } } */ extern double g; @@ -13,3 +14,9 @@ f (double d) g = d; } +extern float h; + +void f2 () +{ + h = g; +} |