1 From e44a6d438db4848c2a555be773568a3cf7994206 Mon Sep 17 00:00:00 2001
2 From: Alexandru-Cezar Sardan <alexandru.sardan-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
3 Date: Mon, 26 May 2014 12:11:13 +0300
4 Subject: [PATCH] Fix E500 with SPE errors with the _Decimal64 type
7 2014-04-21 Michael Meissner <meissner-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
10 * config/rs6000/rs6000.md (mov<mode>_softfloat32, FMOVE64 case):
11 If mode is DDmode and TARGET_E500_DOUBLE allow move.
13 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Print some
14 more debug information for E500 if -mdebug=reg.
17 2014-04-21 Michael Meissner <meissner-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
20 * gcc.target/powerpc/pr60735.c: New test. Insure _Decimal64 does
21 not cause errors if -mspe.
23 Upstream status: Accepted
25 This solves upstream bug 60735
26 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60735).
28 Patch taken from https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=209664
30 gcc/config/rs6000/rs6000.c | 18 ++++++++++++++++++
31 gcc/config/rs6000/rs6000.md | 3 ++-
32 gcc/testsuite/gcc.target/powerpc/pr60735.c | 11 +++++++++++
33 3 files changed, 31 insertions(+), 1 deletion(-)
34 create mode 100644 gcc/testsuite/gcc.target/powerpc/pr60735.c
36 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
37 index 494efc5..6dcf440 100644
38 --- a/gcc/config/rs6000/rs6000.c
39 +++ b/gcc/config/rs6000/rs6000.c
40 @@ -2283,6 +2283,24 @@ rs6000_debug_reg_global (void)
41 if (rs6000_float_gprs)
42 fprintf (stderr, DEBUG_FMT_S, "float_gprs", "true");
44 + fprintf (stderr, DEBUG_FMT_S, "fprs",
45 + (TARGET_FPRS ? "true" : "false"));
47 + fprintf (stderr, DEBUG_FMT_S, "single_float",
48 + (TARGET_SINGLE_FLOAT ? "true" : "false"));
50 + fprintf (stderr, DEBUG_FMT_S, "double_float",
51 + (TARGET_DOUBLE_FLOAT ? "true" : "false"));
53 + fprintf (stderr, DEBUG_FMT_S, "soft_float",
54 + (TARGET_SOFT_FLOAT ? "true" : "false"));
56 + fprintf (stderr, DEBUG_FMT_S, "e500_single",
57 + (TARGET_E500_SINGLE ? "true" : "false"));
59 + fprintf (stderr, DEBUG_FMT_S, "e500_double",
60 + (TARGET_E500_DOUBLE ? "true" : "false"));
62 if (TARGET_LINK_STACK)
63 fprintf (stderr, DEBUG_FMT_S, "link_stack", "true");
65 diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
66 index 64c9e7c..9cefe15 100644
67 --- a/gcc/config/rs6000/rs6000.md
68 +++ b/gcc/config/rs6000/rs6000.md
70 (match_operand:FMOVE64 1 "input_operand" "r,Y,r,G,H,F"))]
72 && ((TARGET_FPRS && TARGET_SINGLE_FLOAT)
73 - || TARGET_SOFT_FLOAT || TARGET_E500_SINGLE)
74 + || TARGET_SOFT_FLOAT || TARGET_E500_SINGLE
75 + || (<MODE>mode == DDmode && TARGET_E500_DOUBLE))
76 && (gpc_reg_operand (operands[0], <MODE>mode)
77 || gpc_reg_operand (operands[1], <MODE>mode))"
79 diff --git a/gcc/testsuite/gcc.target/powerpc/pr60735.c b/gcc/testsuite/gcc.target/powerpc/pr60735.c
81 index 0000000..9bac30b
83 +++ b/gcc/testsuite/gcc.target/powerpc/pr60735.c
85 +/* { dg-do compile } */
86 +/* { dg-options "-mcpu=8548 -mspe -mabi=spe -O2" } */
87 +/* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */
89 +/* In PR60735, the type _Decimal64 generated an insn not found message. */
92 +pr60735 (_Decimal64 *p, _Decimal64 *q)