1 year ago
#350793
Nieważne Nieważne
I can't get Non-Temporal stores/loads to work without -fsanitize=address
Non-temporal store fails every time for me, but if I replace them with temporal stores it never fails;
The only way I got non-temporal loads/stores not to fail is if I use -fsanitize=address option, and I don't quiet understand why;
I use calloc so the memory I am accessing should be initialized as far as I know;
This is my minimal reproduceable:
#include <stdint.h>
#include <stdlib.h>
#define oopsie 8192 // Loads and stores: 4096 doesn't fail;
int main() {
uint8_t* in = calloc(oopsie, 32);
// Calloc output is aligned to the 4k memory page
if(in == NULL) {
return 1;
}
//for(int i=0; i != oopsie*32 ;i+=32) {
// Segmentation Fault at iteration 0, before crossing memory page boundry;
//__asm__("VMOVNTDQA (%0), %%ymm0":: "r"(&(in[i])):"%ymm0");
// AT&T syntax
// vmovdqu never fails; VMOVNTDQ does;
//}
__asm__("VMOVNTDQA (%0), %%ymm0":: "r"(&(in[0])):"%ymm0");
return 0;
}
c
x86
simd
inline-assembly
avx
0 Answers
Your Answer