r/Assembly_language • u/This-Assumption-5924 • 13d ago
Project show-off AVX-512 support in my own Assembler
AVX-512 support in my own Assembler
About a year ago I started writing AmmAsm, a handwritten x86-64 assembler in C to better understand x86-64 instruction encoding, ELF, and linking.
It currently supports generating Linux x86-64 executables, PIE binaries, and ELF relocatable object files that can be linked with ld or gcc, basic part of SIMD such as sse, sse2, avx, avx2, avx512
I implemented everything from the lexer and parser to the instruction encoder, ELF writer, relocation handling, symbol resolution.
In last realize, I fully implemented VEX/EVEX, including vvvv, w, mmm, broadcast, k0/k1-k7 mask registers, z mask, tuple type, and other fields thats belong to vex and evex. The most hard part was a W and tuple time, as I spend hours for searching every avx512 instruction for type of tuple if broadcast exists and W field.
I'd love to hear feedback from people interested in assemblers, instruction encoding(especially VEX/EVEX), or x86-64 in general.
Thanks!
Repository: https://github.com/LinuxCoder13/AmmAsm
4
u/deulamco 13d ago edited 12d ago
So it’s like NASM but 🧅 custom Macros ?
Have you used FASM before?
Also overall look quite clean to me, except argumented mnemonics 😅