]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sparc.c (sparc_override_options): Initialize fpu mask correctly.
authorEric Botcazou <ebotcazou@libertysurf.fr>
Wed, 13 Jun 2007 14:00:51 +0000 (16:00 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 13 Jun 2007 14:00:51 +0000 (14:00 +0000)
* config/sparc/sparc.c (sparc_override_options): Initialize
fpu mask correctly.

From-SVN: r125676

gcc/ChangeLog
gcc/config/sparc/sparc.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/sparc/mfpu.c [new file with mode: 0644]

index b8a9a69c5d3fcfbf1589bf4c3788f46ba940c481..55709ca1aa6dd2d2e6b6e43a17d7312f93b3e03c 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-13  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * config/sparc/sparc.c (sparc_override_options): Initialize
+       fpu mask correctly.
+
 2007-06-08  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        PR target/32163
index 201a425f10c733655bcb9c53dd14198f4677a87e..1360594bb9b4ffa92194e406e3deee0418114bbf 100644 (file)
@@ -675,7 +675,7 @@ sparc_override_options (void)
        error ("-mcmodel= is not supported on 32 bit systems");
     }
 
-  fpu = TARGET_FPU; /* save current -mfpu status */
+  fpu = target_flags & MASK_FPU; /* save current -mfpu status */
 
   /* Set the default CPU.  */
   for (def = &cpu_default[0]; def->name; ++def)
index 4891eb00fd8ec193f9db5d8c7f390bb709b05a09..fc58daf32ee069f48bf4695fa3c3e06f8fafc2a5 100644 (file)
@@ -1,3 +1,7 @@
+2007-06-13  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * gcc.target/sparc/mfpu.c: New test.
+
 2007-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libfortran/31964
diff --git a/gcc/testsuite/gcc.target/sparc/mfpu.c b/gcc/testsuite/gcc.target/sparc/mfpu.c
new file mode 100644 (file)
index 0000000..e95754c
--- /dev/null
@@ -0,0 +1,11 @@
+/* Reported by Peter A. Krauss <peter.a.krauss@web.de> */
+
+/* { dg-do compile } */
+/* { dg-options "-mfpu" } */
+
+float square(float x)
+{
+  return x * x;
+}
+
+/* { dg-final { scan-assembler "fmuls" } } */