CCTLib
Calling-context and data-object attribution library for Intel Pin
deadspy_avx32_tp.c
Go to the documentation of this file.
1 // deadspy ISA test: back-to-back 32B AVX stores. Hits RecordLargeMemWrite
2 // with size=32.
3 #include <stdint.h>
4 #define WORK_COUNT 10000
5 static volatile uint64_t sink;
6 static uint64_t buf[4] __attribute__((aligned(32)));
7 int main(int argc, char** argv) {
8  (void)argc; (void)argv;
9  for (int i = 0; i < WORK_COUNT; ++i) {
10  __asm__ __volatile__(
11  "vmovdqu %%ymm0, (%0)\n\t"
12  "vmovdqu %%ymm1, (%0)\n\t"
13  :
14  : "r"(buf)
15  : "memory", "ymm0", "ymm1");
16  }
17  sink = buf[0];
18  return 0;
19 }
#define WORK_COUNT
int main(int argc, char **argv)
static uint64_t buf[4] __attribute__((aligned(32)))
static volatile uint64_t sink
static uint64_t buf[ITERS]