Skip to content

Instantly share code, notes, and snippets.

View 4oo4's full-sized avatar

4oo4 4oo4

  • 0.0.0.0/0
View GitHub Profile
@4oo4
4oo4 / spectre.c
Created January 10, 2018 00:43 — 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