Skip to content

Instantly share code, notes, and snippets.

@gunlock
Last active August 29, 2015 14:06
Show Gist options
  • Save gunlock/2b644f2e12f0723aee65 to your computer and use it in GitHub Desktop.
Save gunlock/2b644f2e12f0723aee65 to your computer and use it in GitHub Desktop.
gcc output assembly
#!/bin/bash
CXX=g++
usage() {
echo "Usage: asmgen {src_file}"
exit 1
}
if [ -z "$1" ]; then
usage
fi
${CXX} -g -O0 -c -std=c++11 -fverbose-asm -Wa,-adhln ${1} > ${1}.s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment