[CRIU] [PATCH 08/23] fpu00 test: fix for clang

Kir Kolyshkin kir at openvz.org
Tue Oct 11 18:46:46 PDT 2016


clang complains a number of times on our inline asm code, like this:

> fpu00.c:13:6: error: ambiguous instructions require an explicit suffix
> (could be 'flds', 'fldl', or 'fldt')
>                           "fld  %0\n"
>                           ^
> <inline asm>:1:2: note: instantiated into assembly here
>         fld     -4(%rsp)
>         ^

As floats are used, the suffix should be 's' ("short", 32-bit, float).

Add it where needed.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 test/zdtm/static/fpu00.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/zdtm/static/fpu00.c b/test/zdtm/static/fpu00.c
index f04fac4..3e168a2 100644
--- a/test/zdtm/static/fpu00.c
+++ b/test/zdtm/static/fpu00.c
@@ -10,10 +10,10 @@ const char *test_author	= "Pavel Emelianov <xemul at parallels.com>";
 void start(float a, float b, float c, float d)
 {
 	__asm__ volatile (
-			  "fld	%0\n"
-			  "fadd	%1\n"
-			  "fld	%2\n"
-			  "fadd	%3\n"
+			  "flds  %0\n"
+			  "fadds %1\n"
+			  "flds  %2\n"
+			  "fadds %3\n"
 			  "fmulp %%st(1)\n"
 			  :
 			  : "m" (a), "m" (b), "m" (c), "m" (d)
@@ -25,7 +25,7 @@ float finish(void)
 	float res;
 
 	__asm__ volatile (
-			  "fstp	%0\n"
+			  "fstps %0\n"
 			  : "=m" (res)
 			 );
 	return res;
-- 
2.7.4



More information about the CRIU mailing list