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]

Re: [PATCH] support decimal float modes only when enabled


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; }
     }]
 }



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