Skip to content

Instantly share code, notes, and snippets.

Avatar
⚠️
thisisunsafe

Lerk lfuelling

⚠️
thisisunsafe
View GitHub Profile
@lfuelling
lfuelling / spectre.c
Created Jan 8, 2018 — forked from ErikAugust/spectre.c
Spectre example code
View spectre.c
#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