3 ms·
Oh I'd missed that page on the blinkenlights site. Thanks!
by akkartik 6y ago
Oh I'd missed that page on the blinkenlights site. Thanks!
- jart 6y agoI hope you enjoy it! Since you mentioned chibicc earlier in this thread, and you've written an assembler of your own, this might be of interest to you: https://github.com/jart/cosmopolitan/blob/master/third_party/chibicc/as.c https://github.com/jart/cosmopolitan/blob/master/third_party... Your work was brought to my attention maybe a year and a half ago and I think what you're doing is pretty cool. Feel free to reach out by email if there's anything I can do to help.
- tekknolagi 6y agoThat's a neat assembler library. Thanks for pointing it out. I have been using maximecb's https://github.com/Shopify/ruby/blob/yjit/yjit_asm.h https://github.com/Shopify/ruby/blob/yjit/yjit_asm.h
- jart 6y agoOh that's not intended as a library for things like jit. It's just a program that takes an asm file generated by chibicc and turns it into an ELF .o file. Building a library for x86 codegen would be such a rabbit hole. Intel Xed did that but it was just so huge that the only part I wanted to use was its instruction length decoder.
- akkartik 6y agoHere's another interesting one I just noticed: https://github.com/attila-lendvai/maru/blob/maru.10/source/assembler/gen-asm-x86.l https://github.com/attila-lendvai/maru/blob/maru.10/source/a...