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