Skip to content

Instantly share code, notes, and snippets.

View maratik123's full-sized avatar

maratik123

  • Serbia, Belgrade
View GitHub Profile
@maratik123
maratik123 / spectre.c
Created January 5, 2018 23:03 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif