This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] support decimal float modes only when enabled
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Sep 2009 09:41:41 -0700
- Subject: Re: [PATCH] support decimal float modes only when enabled
- References: <1253119943.6043.3.camel@janis-laptop> <4AB8DC35.5040806@redhat.com>
- Reply-to: janis187 at us dot ibm dot com
On Tue, 2009-09-22 at 07:16 -0700, Richard Henderson wrote:
> On 09/16/2009 09:52 AM, Janis Johnson wrote:
> > gcc/
> > * config/i386/i386.c (ix86_scalar_mode_supported_p): Don't return
> > unconditional true for decimal float modes.
> > * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Ditto.
> > * config/s390/s390.c (s390_scalar_mode_supported_p): Ditto.
> >
> > gcc/testsuite/
> > * lib/target-supports.exp (check_effective_target_dfp_nocache):
> > Check support via mode instead of C type.
>
> Ok.
>
>
> r~
There were a couple more effective-target checks that needed to be
changed, so here's what I checked in for the testsuite part of the
patch.
2009-09-22 Janis Johnson <janis187@us.ibm.com>
* lib/target-supports.exp (check_effective_target_dfp_nocache):
Check support via mode instead of C type.
(check_effective_target_dfprt_nocache): Ditto.
(check_effective_target_hard_dfp): Ditto.
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp (revision 151821)
+++ gcc/testsuite/lib/target-supports.exp (working copy)
@@ -1295,7 +1295,7 @@ proc check_effective_target_fixed_point
proc check_effective_target_dfp_nocache { } {
verbose "check_effective_target_dfp_nocache: compiling source" 2
set ret [check_no_compiler_messages_nocache dfp object {
- _Decimal32 x; _Decimal64 y; _Decimal128 z;
+ float x __attribute__((mode(DD)));
}]
verbose "check_effective_target_dfp_nocache: returning $ret" 2
return $ret
@@ -1303,7 +1303,8 @@ proc check_effective_target_dfp_nocache
proc check_effective_target_dfprt_nocache { } {
return [check_runtime_nocache dfprt {
- _Decimal32 x = 1.2df; _Decimal64 y = 2.3dd; _Decimal128 z;
+ typedef float d64 __attribute__((mode(DD)));
+ d64 x = 1.2df; y = 2.3dd; z;
int main () { z = x + y; return 0; }
}]
}
@@ -3069,7 +3070,8 @@ proc check_effective_target_pow10 { } {
proc check_effective_target_hard_dfp {} {
return [check_no_messages_and_pattern hard_dfp "!adddd3" assembly {
- _Decimal64 x, y, z;
+ typedef float d64 __attribute__((mode(DD)));
+ d64 x, y, z;
void foo (void) { z = x + y; }
}]
}