Commit effe3294 authored by Alexander Kartashov's avatar Alexander Kartashov Committed by Pavel Emelyanov

zdtm: added target architecture checks into FPU tests

Signed-off-by: 's avatarAlexander Kartashov <alekskartashov@parallels.com>
Acked-by: 's avatarAndrey Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 67730900
......@@ -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__)
......
......@@ -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@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
......@@ -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__)
......
......@@ -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__)
......
......@@ -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__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment