blob: 6a86835c6b1355bd3c69c7c1d694adc266667334 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#ifndef _ORC_TEST_TEST_H_
#define _ORC_TEST_TEST_H_
#include <orc/orc.h>
#include <orc/orcutils.h>
ORC_BEGIN_DECLS
#ifdef BUILDING_ORC_TEST
#define ORC_TEST_API ORC_API_EXPORT /* defined in config.h */
#else
#define ORC_TEST_API ORC_API_IMPORT
#endif
typedef enum {
ORC_TEST_FAILED = 0,
ORC_TEST_INDETERMINATE = 1,
ORC_TEST_OK = 2
} OrcTestResult;
#define ORC_TEST_FLAGS_BACKUP (1<<0)
#define ORC_TEST_FLAGS_FLOAT (1<<1)
#define ORC_TEST_FLAGS_EMULATE (1<<2)
ORC_TEST_API
void orc_test_init (void);
ORC_TEST_API
OrcTestResult orc_test_gcc_compile (OrcProgram *p);
ORC_TEST_API
OrcTestResult orc_test_gcc_compile_neon (OrcProgram *p);
ORC_TEST_API
OrcTestResult orc_test_gcc_compile_c64x (OrcProgram *p);
ORC_TEST_API
OrcTestResult orc_test_gcc_compile_mips (OrcProgram *p);
ORC_TEST_API
void orc_test_random_bits (void *data, int n_bytes);
ORC_TEST_API
OrcTestResult orc_test_compare_output (OrcProgram *program);
ORC_TEST_API
OrcTestResult orc_test_compare_output_full (OrcProgram *program, int flags);
ORC_TEST_API
OrcTestResult orc_test_compare_output_backup (OrcProgram *program);
ORC_TEST_API
OrcProgram * orc_test_get_program_for_opcode (OrcStaticOpcode *opcode);
ORC_TEST_API
OrcProgram * orc_test_get_program_for_opcode_const (OrcStaticOpcode *opcode);
ORC_TEST_API
OrcProgram * orc_test_get_program_for_opcode_param (OrcStaticOpcode *opcode);
ORC_TEST_API
void orc_test_performance (OrcProgram *program, int flags);
ORC_TEST_API
double orc_test_performance_full (OrcProgram *program, int flags,
const char *target);
ORC_END_DECLS
#endif
|