CCTLib
Calling-context and data-object attribution library for Intel Pin
redspy_sse16_tp.c
Go to the documentation of this file.
1 // redspy ISA test: back-to-back 16B SSE stores of the SAME xmm register
2 // value. The second store is redundant.
3 #include <stdint.h>
4 #include <string.h>
5 #define WORK_COUNT 10000
6 static volatile uint64_t sink;
7 static uint64_t buf[2] __attribute__((aligned(16)));
8 int main(int argc, char** argv) {
9  (void)argc; (void)argv;
10  // Prime xmm0 with a known pattern.
11  __asm__ __volatile__("pcmpeqb %%xmm0, %%xmm0" : : : "xmm0");
12  for (int i = 0; i < WORK_COUNT; ++i) {
13  __asm__ __volatile__(
14  "movdqa %%xmm0, (%0)\n\t"
15  "movdqa %%xmm0, (%0)\n\t" // same value -- redundant
16  :
17  : "r"(buf)
18  : "memory", "xmm0");
19  }
20  sink = buf[0];
21  return 0;
22 }
static uint64_t buf[ITERS]
#define WORK_COUNT
int main(int argc, char **argv)
static volatile uint64_t sink
static uint64_t buf[2] __attribute__((aligned(16)))