Skip to content

Instantly share code, notes, and snippets.

View 3outeille's full-sized avatar
🎯
https://www.youtube.com/watch?v=VYPi0qcHWvQ&ab_channel=ABANIMETION

Ferdinand Mom 3outeille

🎯
https://www.youtube.com/watch?v=VYPi0qcHWvQ&ab_channel=ABANIMETION
View GitHub Profile
@3outeille
3outeille / prologue.asm
Last active September 6, 2022 14:51
Macro expansion to understand how C function calls x86inc function
%define ARCH_X86_64 1
; sad_16x16, 4, 7, 5, src, src_stride, dst, dst_stride, src_stride3, dst_stride3, cnt
; function_name, #args (%1), #regs (%2), #xmm_regs (%3), [stack_size,] (%4) arg_names... (%5-*)
%macro PUSH_IF_USED 1-*
%rep %0
%if %1 < regs_used
push r%1
%endif
@3outeille
3outeille / Makefile
Last active September 3, 2022 14:07
register sum weird results
all:
nasm -f elf64 main.asm
gcc -g -nostartfiles -no-pie -o main main.o
debug:
echo "dashboard -output /dev/pts/0\nb _start\nrun >> gdb-log.txt 2>&1\nlayout asm\ndashboard assembly\ndashboard source\ndashboard threads\nset logging file gdb-log.txt\nset logging on\nset trace-commands on\nrecord\n" > gdb-commands.txt
gdb -x gdb-commands.txt main
clean:
rm *.o main gdb-commands.txt gdb-log.txt .gdb_history
@3outeille
3outeille / Makefile
Last active July 29, 2022 06:59
block average sse4 asm attempt
NAME = libasm.a
SRCS = block_avg.asm
OBJS = $(SRCS:.asm=.o)
all:
nasm -g -f elf64 ${SRCS}
gcc -g -c main.c -o main.o
ar rc $(NAME) $(OBJS)
gcc -g main.o $(NAME) -o main
@3outeille
3outeille / Makefile
Created July 25, 2022 09:33
attempt to print something with x86inc.asm
NAME = libasm.a
SRCS = fill_mat.asm
OBJS = $(SRCS:.asm=.o)
all:
nasm -g -f elf64 ${SRCS}
gcc -g -c main.c -o main.o
ar rc $(NAME) $(OBJS)
gcc -g main.o $(NAME) -o main
@3outeille
3outeille / Makefile
Last active June 12, 2022 15:04
x86_64 SSE4 dot_product between {1, 2, 3, 4, 5, 6, 7, 8} and {10, 20, 30, 40, 50, 60, 70, 80}
NAME = libasm.a
SRCS = dot_product.asm
OBJS = $(SRCS:.asm=.o)
all:
nasm -g -f elf64 ${SRCS}
gcc -g -c main.c -o main.o
ar rc $(NAME) $(OBJS)
gcc -g main.o $(NAME) -o main
@3outeille
3outeille / parse_hackmd.md
Last active January 26, 2022 19:48
Standalone script which parse hackmd markdown (including imgur link) and create directory (from tags) with downloaded imgur link
  • Developped under Python 3.7.12
  • Standalone script which parse hackmd markdown (including imgur link) and create directory (from tags) with downloaded imgur link
  • To use, python3 script.py --zip_file <file.zip>
  • To export your hackmd markdown as zip file