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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
/* Generated by Nim Compiler v1.6.12 */
/* Compiled for: Linux, amd64, gcc */
/* Command for C compiler:
gcc -c -w -fmax-errors=3 -mavx -I/gnu/store/xqah57hhkjdyp880dvxmqpvn58g5j7mv-nim-1.6.12/lib -I/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim -o /home/wrk/.cache/nim/simd_d/@msimd.nim.c.o /home/wrk/.cache/nim/simd_d/@msimd.nim.c */
#define NIM_INTBITS 64
#include "nimbase.h"
#include "xmmintrin.h"
#include <string.h>
#include "immintrin.h"
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
# define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
# define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
# define nimln_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NimStringDesc* tyArray__nHXaesL0DJZHyVS07ARPRA[1];
typedef NF32 tyArray__9aTCwbdg1cSQimdVd0OEKVw[4];
typedef NF tyArray__jOGfJgrdxgfAJsLC7WNNEw[4];
N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___simd_70)(tyArray__9aTCwbdg1cSQimdVd0OEKVw x);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___simd_192)(tyArray__jOGfJgrdxgfAJsLC7WNNEw x);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_2997)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsgnuatsstoreatsxqah57hhkjdyp880dvxmqpvn58g5j7mvminusnimminus1dot6dot12atslibatssystemdotnim_DatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsgnuatsstoreatsxqah57hhkjdyp880dvxmqpvn58g5j7mvminusnimminus1dot6dot12atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
STRING_LITERAL(TM__NqVfYNeiCrBLDU2vGCYO9bA_3, "TESTING AVX", 11);
static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__NqVfYNeiCrBLDU2vGCYO9bA_2 = {((NimStringDesc*) &TM__NqVfYNeiCrBLDU2vGCYO9bA_3)}
;
N_LIB_PRIVATE __m128 a__simd_2;
N_LIB_PRIVATE __m128 b__simd_3;
N_LIB_PRIVATE __m128 c__simd_4;
N_LIB_PRIVATE tyArray__jOGfJgrdxgfAJsLC7WNNEw l1__simd_122 = {1.0,
2.1,
3.2,
4.3}
;
N_LIB_PRIVATE tyArray__jOGfJgrdxgfAJsLC7WNNEw l2__simd_123 = {0.0,
1.1,
2.1,
3.3}
;
N_LIB_PRIVATE __m256d regs1__simd_124;
N_LIB_PRIVATE __m256d regs2__simd_125;
N_LIB_PRIVATE __m256d result__simd_126;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
void* T1_;
T1_ = (void*)0;
T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
nimSetMem__systemZmemory_7(p, ((int) 0), size);
}
static N_INLINE(void, initStackBottomWith)(void* locals) {
nimGC_setStackBottom(locals);
}
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__system_2564 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__system_2564).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__system_2564;
framePtr__system_2564 = s;
{
if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
callDepthLimitReached__system_2997();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_2564 = (*framePtr__system_2564).prev;
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsgnuatsstoreatsxqah57hhkjdyp880dvxmqpvn58g5j7mvminusnimminus1dot6dot12atslibatssystemdotnim_DatInit000();
initStackBottomWith((void *)&inner);
atmdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsdotdotatsgnuatsstoreatsxqah57hhkjdyp880dvxmqpvn58g5j7mvminusnimminus1dot6dot12atslibatssystemdotnim_Init000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
tyArray__nHXaesL0DJZHyVS07ARPRA T1_;
union { __m128 source; tyArray__9aTCwbdg1cSQimdVd0OEKVw dest; } LOC2;
tyArray__nHXaesL0DJZHyVS07ARPRA T3_;
union { __m256d source; tyArray__jOGfJgrdxgfAJsLC7WNNEw dest; } LOC4;
nimfr_("simd", "/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim/simd.nim");
nimln_(12, "/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim/simd.nim");
echoBinSafe(TM__NqVfYNeiCrBLDU2vGCYO9bA_2, 1);
nimln_(16, "/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim/simd.nim");
a__simd_2 = _mm_set1_ps(1.0f);
nimln_(17, "/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim/simd.nim");
b__simd_3 = _mm_set1_ps(2.0f);
nimln_(18, "/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim/simd.nim");
c__simd_4 = _mm_mul_ps(a__simd_2, b__simd_3);
nimln_(21, "/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim/simd.nim");
nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
LOC2.source = c__simd_4;
T1_[0] = dollar___simd_70(LOC2.dest);
echoBinSafe(T1_, 1);
nimln_(29, "/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim/simd.nim");
regs1__simd_124 = _mm256_loadu_pd(((void*) ((&l1__simd_122[(((NI) 0))- 0]))));
nimln_(30, "/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim/simd.nim");
regs2__simd_125 = _mm256_loadu_pd(((void*) ((&l2__simd_123[(((NI) 0))- 0]))));
nimln_(31, "/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim/simd.nim");
result__simd_126 = _mm256_sub_pd(regs1__simd_124, regs2__simd_125);
nimln_(32, "/export/local/home/wrk/iwrk/opensource/lisp/prescheme-explore/nim/simd.nim");
nimZeroMem((void*)T3_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
LOC4.source = result__simd_126;
T3_[0] = dollar___simd_192(LOC4.dest);
echoBinSafe(T3_, 1);
popFrame();
}
}
|