/* 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(); } }