]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Support single-precision in g++.dg/eh/arm-vfp-unwind.C
authorChristophe Lyon <christophe.lyon@foss.st.com>
Thu, 16 Sep 2021 09:31:31 +0000 (09:31 +0000)
committerChristophe Lyon <christophe.lyon@foss.st.com>
Thu, 16 Sep 2021 09:33:52 +0000 (09:33 +0000)
g++.dg/eh/arm-vfp-unwind.C uses an asm statement relying on
double-precision FPU support. This patch extends it support
single-precision, useful for targets without double-precision.

2021-09-16  Richard Earnshaw  <rearnsha@arm.com>

gcc/testsuite/
* g++.dg/eh/arm-vfp-unwind.C: Support single-precision.

gcc/testsuite/g++.dg/eh/arm-vfp-unwind.C

index 62263c0c3b06d77eb5016f822b66c5e839e02c18..8ea25e57ca25140e96c6e953c3b8db93496849c5 100644 (file)
@@ -12,7 +12,11 @@ using namespace std;
 
 static void donkey ()
 {
-  asm volatile ("fcpyd d9, %P0" : : "w" (1.2345) : "d9");
+#if __ARM_FP & 8
+  asm volatile ("vmov.f64 d9, %P0" : : "w" (1.2345) : "d9");
+#else
+  asm volatile ("vmov.f32 s18, %0" : : "t" (1.2345f) : "s18");
+#endif
   throw 1;
 }