68 lines
1.8 KiB
Diff
68 lines
1.8 KiB
Diff
From b924856587c570d227bfc8a3234d275e8fc79438 Mon Sep 17 00:00:00 2001
|
|
From: Tri Vo <trong@google.com>
|
|
Date: Wed, 21 Sep 2016 15:10:38 -0700
|
|
Subject: [PATCH 02/24] Compile breakpoints and x86 tests. Test: make vts
|
|
|
|
(cherry picked from commit 0fd3eaf312c6284450f758e3a49c5cfd855e4847)
|
|
---
|
|
tools/testing/selftests/x86/test_FISTTP.c | 18 ++++++++++++++++++
|
|
1 file changed, 18 insertions(+)
|
|
|
|
diff --git a/tools/testing/selftests/x86/test_FISTTP.c b/tools/testing/selftests/x86/test_FISTTP.c
|
|
index 09789c0ce3e9c..c920a57ddb06a 100644
|
|
--- a/tools/testing/selftests/x86/test_FISTTP.c
|
|
+++ b/tools/testing/selftests/x86/test_FISTTP.c
|
|
@@ -25,7 +25,11 @@ int test(void)
|
|
feclearexcept(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW);
|
|
asm volatile ("\n"
|
|
" fld1""\n"
|
|
+#ifdef __clang__
|
|
+ " fisttps res16""\n"
|
|
+#else
|
|
" fisttp res16""\n"
|
|
+#endif
|
|
" fld1""\n"
|
|
" fisttpl res32""\n"
|
|
" fld1""\n"
|
|
@@ -45,7 +49,11 @@ int test(void)
|
|
feclearexcept(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW);
|
|
asm volatile ("\n"
|
|
" fldpi""\n"
|
|
+#ifdef __clang__
|
|
+ " fisttps res16""\n"
|
|
+#else
|
|
" fisttp res16""\n"
|
|
+#endif
|
|
" fldpi""\n"
|
|
" fisttpl res32""\n"
|
|
" fldpi""\n"
|
|
@@ -66,7 +74,13 @@ int test(void)
|
|
asm volatile ("\n"
|
|
" fldpi""\n"
|
|
" fchs""\n"
|
|
+#ifdef __clang__
|
|
+ " fisttps res16""\n"
|
|
+#else
|
|
+ // clang will complain: ambiguous instructions require an explicit suffix
|
|
+ // (could be 'fisttps', or 'fisttpl')
|
|
" fisttp res16""\n"
|
|
+#endif
|
|
" fldpi""\n"
|
|
" fchs""\n"
|
|
" fisttpl res32""\n"
|
|
@@ -88,7 +102,11 @@ int test(void)
|
|
feclearexcept(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW);
|
|
asm volatile ("\n"
|
|
" fldln2""\n"
|
|
+#ifdef __clang__
|
|
+ " fisttps res16""\n"
|
|
+#else
|
|
" fisttp res16""\n"
|
|
+#endif
|
|
" fldln2""\n"
|
|
" fisttpl res32""\n"
|
|
" fldln2""\n"
|
|
--
|
|
2.36.0.550.gb090851708-goog
|
|
|