CCTLib
Calling-context and data-object attribution library for Intel Pin
deadspy_sse16_tp.c
Go to the documentation of this file.
1 // deadspy ISA test: back-to-back 16B SSE stores to same address, no read
2 // between. Second store makes the first's 16 bytes dead.
3 //
4 // Hits deadspy's RecordLargeMemWrite handler (writes > 8 bytes).
5 #include <stdint.h>
6 #define WORK_COUNT 10000
7 static volatile uint64_t sink;
8 static uint64_t buf[2] __attribute__((aligned(16)));
9 int main(int argc, char** argv) {
10  (void)argc; (void)argv;
11  for (int i = 0; i < WORK_COUNT; ++i) {
12  __asm__ __volatile__(
13  "movdqa %%xmm0, (%0)\n\t"
14  "movdqa %%xmm1, (%0)\n\t"
15  :
16  : "r"(buf)
17  : "memory", "xmm0", "xmm1");
18  }
19  sink = buf[0];
20  return 0;
21 }
#define WORK_COUNT
int main(int argc, char **argv)
static volatile uint64_t sink
static uint64_t buf[2] __attribute__((aligned(16)))
static uint64_t buf[ITERS]