[CRIU] [PATCH 18/23] zdtm: added target architecture checks into FPU tests
Pavel Emelyanov
xemul at parallels.com
Mon Jan 14 05:07:52 EST 2013
On 01/14/2013 11:26 AM, Alexander Kartashov wrote:
Andrey, review this please.
> Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
> ---
> test/zdtm/live/static/fpu00.c | 2 ++
> test/zdtm/live/static/fpu01.c | 16 +++++++++++++++-
> test/zdtm/live/static/mmx00.c | 2 ++
> test/zdtm/live/static/sse00.c | 2 ++
> test/zdtm/live/static/sse20.c | 2 ++
> 5 files changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/test/zdtm/live/static/fpu00.c b/test/zdtm/live/static/fpu00.c
> index 4eabd81..1a1ba40 100644
> --- a/test/zdtm/live/static/fpu00.c
> +++ b/test/zdtm/live/static/fpu00.c
> @@ -46,8 +46,10 @@ int chk_proc_fpu(void)
>
> int main(int argc, char ** argv)
> {
> +#if defined(__i386__) || defined(__x86_64__)
> float a, b, c, d;
> float res1, res2;
> +#endif
>
> test_init(argc, argv);
> #if defined(__i386__) || defined(__x86_64__)
> diff --git a/test/zdtm/live/static/fpu01.c b/test/zdtm/live/static/fpu01.c
> index a41acd8..bc41b69 100644
> --- a/test/zdtm/live/static/fpu01.c
> +++ b/test/zdtm/live/static/fpu01.c
> @@ -4,9 +4,12 @@
>
> #include <sys/types.h>
>
> -#include "cpuid.h"
> #include "zdtmtst.h"
>
> +#if defined(__i386__) || defined(__x86_64__)
> +
> +#include "cpuid.h"
> +
> const char *test_doc = "Test if FPU data in YMM registers do survive the c/r";
> const char *test_author = "Cyrill Gorcunov <gorcunov at openvz.org>";
>
> @@ -103,3 +106,14 @@ int main(int argc, char *argv[])
>
> return 0;
> }
> +
> +#else
> +
> +int main(int argc, char *argv[])
> +{
> + test_init(argc, argv);
> + skip("Unsupported arch");
> + return 0;
> +}
> +
> +#endif
> diff --git a/test/zdtm/live/static/mmx00.c b/test/zdtm/live/static/mmx00.c
> index a0a0e56..f0f7c3c 100644
> --- a/test/zdtm/live/static/mmx00.c
> +++ b/test/zdtm/live/static/mmx00.c
> @@ -53,6 +53,7 @@ int chk_proc_mmx(void)
>
> int main(int argc, char **argv)
> {
> +#if defined(__i386__) || defined(__x86_64__)
> uint8_t bytes[16];
> uint16_t words[8];
> uint32_t rnd[8];
> @@ -60,6 +61,7 @@ int main(int argc, char **argv)
>
> uint8_t resbytes1[8], resbytes2[8];
> uint16_t reswords1[4], reswords2[4];
> +#endif
>
> test_init(argc, argv);
> #if defined(__i386__) || defined(__x86_64__)
> diff --git a/test/zdtm/live/static/sse00.c b/test/zdtm/live/static/sse00.c
> index 15a83ff..d76d07a 100644
> --- a/test/zdtm/live/static/sse00.c
> +++ b/test/zdtm/live/static/sse00.c
> @@ -50,9 +50,11 @@ int chk_proc_sse(void)
>
> int main(int argc, char **argv)
> {
> +#if defined(__i386__) || defined(__x86_64__)
> float input[8] __attribute__((aligned(16)));
> float res1[8], res2[8];
> int i;
> +#endif
>
> test_init(argc, argv);
> #if defined(__i386__) || defined(__x86_64__)
> diff --git a/test/zdtm/live/static/sse20.c b/test/zdtm/live/static/sse20.c
> index 3755f64..1597d07 100644
> --- a/test/zdtm/live/static/sse20.c
> +++ b/test/zdtm/live/static/sse20.c
> @@ -50,9 +50,11 @@ int chk_proc_sse2(void)
>
> int main(int argc, char **argv)
> {
> +#if defined(__i386__) || defined(__x86_64__)
> double input[4] __attribute__((aligned(16)));
> double res1[4], res2[4];
> int i;
> +#endif
>
> test_init(argc, argv);
> #if defined(__i386__) || defined(__x86_64__)
>
More information about the CRIU
mailing list