Skip to content

Instantly share code, notes, and snippets.

View amanusk's full-sized avatar
😘
Training ... Unit ready

amanusk amanusk

😘
Training ... Unit ready
View GitHub Profile
@amanusk
amanusk / spectre.c
Created January 8, 2018 19:37 — 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