Test "Scalable Vector Extension (SVE) support." on arm64
Change-Id: I3abaca932985a06b06887b962e769f2eac96c738
This commit is contained in:
committed by
Masamichi Takagi
parent
6810506c3d
commit
7da5fede8b
40
test/sve/src/common.h
Normal file
40
test/sve/src/common.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/* common.h COPYRIGHT FUJITSU LIMITED 2017-2019 */
|
||||
#ifndef __COMMON_H__
|
||||
#define __COMMON_H__
|
||||
|
||||
#include "sve.h"
|
||||
|
||||
/* for migrate CPU */
|
||||
#define SMP_MAX_CPUS 512
|
||||
|
||||
/* test */
|
||||
#define TEST_NAME(num) test_##num
|
||||
#define TEST_ARG(arg) arg
|
||||
#define TEST_UI_ARG(arg) unsigned int TEST_ARG(arg)
|
||||
#define TEST_I_ARG(arg) int TEST_ARG(arg)
|
||||
#define TEST_CHAR_PP_ARG(arg) char **TEST_ARG(arg)
|
||||
#define TEST_FUNC(num, arg1, arg2, arg3, arg4) \
|
||||
int TEST_NAME(num)(int tp_num, TEST_UI_ARG(arg1), \
|
||||
TEST_UI_ARG(arg2), \
|
||||
TEST_I_ARG(arg3), \
|
||||
TEST_CHAR_PP_ARG(arg4))
|
||||
|
||||
extern char *usage_messages[];
|
||||
|
||||
#define cpu_pause() \
|
||||
({ \
|
||||
__asm__ __volatile__("yield" ::: "memory"); \
|
||||
})
|
||||
|
||||
/* instruction code */
|
||||
#define NOP_INST 0xd503201fUL
|
||||
#define BRK_INST 0xd4200000UL
|
||||
|
||||
extern int wait_child_stop(pid_t cpid);
|
||||
extern int wait_child_exit(pid_t cpid);
|
||||
extern int rewrite_brk_inst(pid_t cpid, void *inst_addr);
|
||||
extern void print_test_overview(int tp_num);
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
||||
|
||||
#endif /* !__COMMON_H__ */
|
||||
Reference in New Issue
Block a user