SIMD intrinsics
BlitzMax Forums/BlitzMax NG/SIMD intrinsics
| ||
The source shows they will only be compiled for x64. Can they be used in 32-bit x86? |
| ||
Couldn't you adjust the make.bmk and check what happens? Sorry am not knowing much about all these things so just suggesting it + googling. Bye Ron |
| ||
Note that some older versions of windows dont support simd. Hardware functionality might be there, but if the operating system dont preserve registers on context switching you will be in for some fun. EDIT: Disregard the last part, there is a os-agnostic mechanic preventing this, so your applications should bomb out immediately for illegal instructions if the os its running on have not declared support for whatever extension you end up using. |
| ||
which versions of windows should that be? bye Ron |
| ||
avx was patched in for windows 7 (sp1 maybe?), sse should be in a varying state of support for the earlier versions depending on how updated the os install is, and which iteration of sse you are using. x86-64 guarantees at least sse2, which is probably why Brucey set it up like that. |
| ||
SSE2 first appeared in the Intel Pentium 4 in 2001 and AMD a couple years later. From what I can tell AVX isn't supported by the compiler. |
| ||
Can they be used in 32-bit x86? Are they all available for 32-bit? If so, I can change it to work for both x86 and x64. |
| ||
From what I can tell right up to SSE3 are available on some 32-bit processors. 32-bit mode on a x64 processor still has access to the all SIMD instructions but not the extra registers. |
| ||
@Brucey If the hardware has support for it shouldnt matter if the software was compiled for x86 or x64. SSE1/2 should be *very* commonplace today, so might be worth considering. |
| ||
Maybe it would make sense to split the module into separate ones for the individual SSE versions to deal with compatibility? |