Skip to content

Instantly share code, notes, and snippets.

@paroj
Last active March 7, 2017 13:01
Show Gist options
  • Save paroj/4fadff1d4036a1e50a57997a1e99994d to your computer and use it in GitHub Desktop.
Save paroj/4fadff1d4036a1e50a57997a1e99994d to your computer and use it in GitHub Desktop.
clobber: force code generation for benchmarking
// gcc -O3 -S -masm=intel -fverbose-asm test.c
// (code : out : in : clobber)
asm volatile ("" :: "g"(&a) : "memory");
// see also: https://www.youtube.com/watch?v=nXaxk27zwlk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment