diff options
author | olegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-13 18:09:10 +0000 |
---|---|---|
committer | olegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-13 18:09:10 +0000 |
commit | bb0578782fc7e912baf8eb5ace9b9046aa4d95aa (patch) | |
tree | f74de87ca2e71aa3f530e74fa71a89a4e333a087 /libgcc | |
parent | cfdddc4bb07cddac1682c817d741d0ec09d20fe4 (diff) | |
download | gcc-bb0578782fc7e912baf8eb5ace9b9046aa4d95aa.tar.gz |
PR target/49880
* config/sh/sh.opt (FPU_SINGLE_ONLY): New mask.
(musermode): Convert to Var(TARGET_USERMODE).
* config/sh/sh.h (SELECT_SH2A_SINGLE_ONLY, SELECT_SH4_SINGLE_ONLY,
MASK_ARCH): Add MASK_FPU_SINGLE_ONLY.
* config/sh/sh.c (sh_option_override): Use
TARGET_FPU_DOUBLE || TARGET_FPU_SINGLE_ONLY for call-fp case.
* config/sh/sh.md (udivsi3_i1, divsi3_i1): Remove ! TARGET_SH4
condition.
(udivsi3_i4, divsi3_i4): Use TARGET_FPU_DOUBLE condition instead of
TARGET_SH4.
(udivsi3_i4_single, divsi3_i4_single): Use
TARGET_FPU_SINGLE_ONLY || TARGET_FPU_DOUBLE instead of TARGET_HARD_SH4.
PR target/49880
* config/sh/lib1funcs.S (sdivsi3_i4, udivsi3_i4): Enable for SH2A.
(sdivsi3, udivsi3): Remove SH4 check and always compile these functions.
PR target/49880
* gcc.target/sh/pr49880-1.c: New.
* gcc.target/sh/pr49880-2.c: New.
* gcc.target/sh/pr49880-3.c: New.
* gcc.target/sh/pr49880-4.c: New.
* gcc.target/sh/pr49880-5.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196636 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 6 | ||||
-rw-r--r-- | libgcc/config/sh/lib1funcs.S | 16 |
2 files changed, 12 insertions, 10 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index fe08adb12aa..61f5cc07694 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2013-03-13 Oleg Endo <olegendo@gcc.gnu.org> + + PR target/49880 + * config/sh/lib1funcs.S (sdivsi3_i4, udivsi3_i4): Enable for SH2A. + (sdivsi3, udivsi3): Remove SH4 check and always compile these functions. + 2013-03-07 Sriraman Tallam <tmsriram@google.com> * config/i386/cpuinfo.c (get_intel_cpu): Fix cpuid codes for diff --git a/libgcc/config/sh/lib1funcs.S b/libgcc/config/sh/lib1funcs.S index 56257190421..5f0bbff264f 100644 --- a/libgcc/config/sh/lib1funcs.S +++ b/libgcc/config/sh/lib1funcs.S @@ -1006,7 +1006,7 @@ hiset: sts macl,r0 ! r0 = bb*dd #ifdef L_sdivsi3_i4 .title "SH DIVIDE" !! 4 byte integer Divide code for the Renesas SH -#ifdef __SH4__ +#if defined (__SH4__) || defined (__SH2A__) !! args in r4 and r5, result in fpul, clobber dr0, dr2 .global GLOBAL(sdivsi3_i4) @@ -1021,7 +1021,7 @@ GLOBAL(sdivsi3_i4): ftrc dr0,fpul ENDFUNC(GLOBAL(sdivsi3_i4)) -#elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__) +#elif defined (__SH2A_SINGLE__) || defined (__SH2A_SINGLE_ONLY__) || defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__) !! args in r4 and r5, result in fpul, clobber r2, dr0, dr2 #if ! __SH5__ || __SH5__ == 32 @@ -1046,13 +1046,12 @@ GLOBAL(sdivsi3_i4): ENDFUNC(GLOBAL(sdivsi3_i4)) #endif /* ! __SH5__ || __SH5__ == 32 */ -#endif /* ! __SH4__ */ +#endif /* ! __SH4__ || __SH2A__ */ #endif #ifdef L_sdivsi3 /* __SH4_SINGLE_ONLY__ keeps this part for link compatibility with sh2e/sh3e code. */ -#if (! defined(__SH4__) && ! defined (__SH4_SINGLE__)) || defined (__linux__) !! !! Steve Chamberlain !! sac@cygnus.com @@ -1369,13 +1368,12 @@ div0: rts ENDFUNC(GLOBAL(sdivsi3)) #endif /* ! __SHMEDIA__ */ -#endif /* ! __SH4__ */ #endif #ifdef L_udivsi3_i4 .title "SH DIVIDE" !! 4 byte integer Divide code for the Renesas SH -#ifdef __SH4__ +#if defined (__SH4__) || defined (__SH2A__) !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4, !! and t bit @@ -1417,7 +1415,7 @@ L1: .double 2147483648 ENDFUNC(GLOBAL(udivsi3_i4)) -#elif defined (__SH5__) && ! defined (__SH4_NOFPU__) +#elif defined (__SH5__) && ! defined (__SH4_NOFPU__) && ! defined (__SH2A_NOFPU__) #if ! __SH5__ || __SH5__ == 32 !! args in r4 and r5, result in fpul, clobber r20, r21, dr0, fr33 .mode SHmedia @@ -1438,7 +1436,7 @@ GLOBAL(udivsi3_i4): ENDFUNC(GLOBAL(udivsi3_i4)) #endif /* ! __SH5__ || __SH5__ == 32 */ -#elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) +#elif defined (__SH2A_SINGLE__) || defined (__SH2A_SINGLE_ONLY__) || defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4 .global GLOBAL(udivsi3_i4) @@ -1493,7 +1491,6 @@ L1: #ifdef L_udivsi3 /* __SH4_SINGLE_ONLY__ keeps this part for link compatibility with sh2e/sh3e code. */ -#if (! defined(__SH4__) && ! defined (__SH4_SINGLE__)) || defined (__linux__) !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit .global GLOBAL(udivsi3) @@ -1688,7 +1685,6 @@ LOCAL(large_divisor): ENDFUNC(GLOBAL(udivsi3)) #endif /* ! __SHMEDIA__ */ -#endif /* __SH4__ */ #endif /* L_udivsi3 */ #ifdef L_udivdi3 |