aboutsummaryrefslogtreecommitdiff
path: root/deps/lightning/check/self.c
blob: 7cfbb94ce6dfc71cdc5d7bf32981d499afbf1297 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#include <lightning.h>
#include <stdio.h>
#include <assert.h>

int
main(int argc, char *argv[])
{
    jit_state_t		*_jit;

    /* Same JIT_XY are not constants */
    init_jit(argv[0]);

    _jit = jit_new_state();
    assert(JIT_R0 == jit_r(0));
    (void)jit_callee_save_p(JIT_R0);
    assert(JIT_R1 == jit_r(1));
    (void)jit_callee_save_p(JIT_R1);
    assert(JIT_R2 == jit_r(2));
    (void)jit_callee_save_p(JIT_R2);
#if defined(JIT_R3)
    assert(JIT_R3 == jit_r(3));
    (void)jit_callee_save_p(JIT_R3);
#  if defined(JIT_R4)
    assert(JIT_R4 == jit_r(4));
    (void)jit_callee_save_p(JIT_R4);
#    if defined(JIT_R5)
    assert(JIT_R5 == jit_r(5));
    (void)jit_callee_save_p(JIT_R5);
#      if defined(JIT_R6)
    assert(JIT_R6 == jit_r(6));
    (void)jit_callee_save_p(JIT_R6);
#        if defined(JIT_R7)
    assert(JIT_R7 == jit_r(7));
    (void)jit_callee_save_p(JIT_R7);
#        endif
#      endif
#    endif
#  endif
#endif
    assert(JIT_V0 == jit_v(0));
    assert(jit_callee_save_p(JIT_V0));
    assert(JIT_V1 == jit_v(1));
    assert(jit_callee_save_p(JIT_V1));
    assert(JIT_V2 == jit_v(2));
    assert(jit_callee_save_p(JIT_V2));
#if defined(JIT_V3)
    assert(JIT_V3 == jit_v(3));
    assert(jit_callee_save_p(JIT_V3));
#  if defined(JIT_V4)
    assert(JIT_V4 == jit_v(4));
    assert(jit_callee_save_p(JIT_V4));
#    if defined(JIT_V5)
    assert(JIT_V5 == jit_v(5));
    assert(jit_callee_save_p(JIT_V5));
#      if defined(JIT_V6)
    assert(JIT_V6 == jit_v(6));
    assert(jit_callee_save_p(JIT_V6));
#        if defined(JIT_V7)
    assert(JIT_V7 == jit_v(7));
    assert(jit_callee_save_p(JIT_V7));
#          if defined(JIT_V8)
    assert(JIT_V8 == jit_v(8));
    assert(jit_callee_save_p(JIT_V8));
#            if defined(JIT_V9)
    assert(JIT_V9 == jit_v(9));
    assert(jit_callee_save_p(JIT_V9));
#              if defined(JIT_V10)
    assert(JIT_V10 == jit_v(10));
    assert(jit_callee_save_p(JIT_V10));
#                if defined(JIT_V11)
    assert(JIT_V11 == jit_v(11));
    assert(jit_callee_save_p(JIT_V11));
#                  if defined(JIT_V12)
    assert(JIT_V12 == jit_v(12));
    assert(jit_callee_save_p(JIT_V12));
#                    if defined(JIT_V13)
    assert(JIT_V13 == jit_v(13));
    assert(jit_callee_save_p(JIT_V13));
#                      if defined(JIT_V14)
    assert(JIT_V14 == jit_v(14));
    assert(jit_callee_save_p(JIT_V14));
#                        if defined(JIT_V15)
    assert(JIT_V15 == jit_v(15));
    assert(jit_callee_save_p(JIT_V15));
#                          if defined(JIT_V16)
    assert(JIT_V16 == jit_v(16));
    assert(jit_callee_save_p(JIT_V16));
#                          endif
#                        endif
#                      endif
#                    endif
#                  endif
#                endif
#              endif
#            endif
#          endif
#        endif
#      endif
#    endif
#  endif
#endif
    assert(JIT_F0 == jit_f(0));
    (void)jit_callee_save_p(JIT_F0);
    assert(JIT_F1 == jit_f(1));
    (void)jit_callee_save_p(JIT_F1);
    assert(JIT_F2 == jit_f(2));
    (void)jit_callee_save_p(JIT_F2);
    assert(JIT_F3 == jit_f(3));
    (void)jit_callee_save_p(JIT_F3);
    assert(JIT_F4 == jit_f(4));
    (void)jit_callee_save_p(JIT_F4);
    assert(JIT_F5 == jit_f(5));
    (void)jit_callee_save_p(JIT_F5);
#if defined(JIT_F6)
    assert(JIT_F6 == jit_f(6));
    (void)jit_callee_save_p(JIT_F6);
#  if defined(JIT_F7)
    assert(JIT_F7 == jit_f(7));
    (void)jit_callee_save_p(JIT_F7);
#    if defined(JIT_F8)
    assert(JIT_F8 == jit_f(8));
    (void)jit_callee_save_p(JIT_F8);
#      if defined(JIT_F9)
    assert(JIT_F9 == jit_f(9));
    (void)jit_callee_save_p(JIT_F9);
#      endif
#    endif
#  endif
#endif

    jit_clear_state();
    jit_destroy_state();
    finish_jit();

    return (0);
}