Skip to content

Instantly share code, notes, and snippets.

View xianyi's full-sized avatar
😆

Zhang Xianyi xianyi

😆
View GitHub Profile
@xianyi
xianyi / test_vaddpd.s
Created June 20, 2012 14:53
Test the binary code of Clang and GCC
.text
.globl test
test:
vaddpd 2*8(%rbx,%r10,1),%xmm13,%xmm13
ret
@xianyi
xianyi / as
Created June 20, 2012 02:39
Replace the native OS X assembler (/usr/bin/as) by a script which calls the clang assembler. (http://old.nabble.com/Re%3a-gcc,-as,-AVX,-binutils-and-MacOS-X-10.7-p32584737.html)
#!/bin/sh
HAS_INPUT_FILE=0
ARGS=$@
while [ $# -ne 0 ]; do
ARG=$1
# Skip options
if [ $ARG == "-arch" ] || [ $ARG == "-o" ]; then
# Skip next token
shift
shift