A Python-based C compiler for x86-64, featuring full parsing, semantic analysis, IR generation, and assembly code emission.

asm assembly assembly-language c c-language codegen compiler educational lexer llvm parser python python3 system-programming tacky x86-64
3 Open Issues Need Help Last updated: Jul 10, 2025

Open Issues Need Help

View All on GitHub
implement assember about 2 months ago

AI Summary: Implement a minimal assembler in Python to convert x86 assembly code (`.s` files) generated by a C compiler into ELF object files (`.o` files). The assembler should handle basic x86 instructions, labels, jumps, `.text` and `.data` sections, and a symbol table. It should output a valid 64-bit ELF `.o` file that can be linked (either with the custom linker or `ld`). Optional future work includes supporting relocation entries, `.bss` and `.rodata` sections, and a more complete instruction set.

Complexity: 5/5
enhancement help wanted

A Python-based C compiler for x86-64, featuring full parsing, semantic analysis, IR generation, and assembly code emission.

Python
#asm#assembly#assembly-language#c#c-language#codegen#compiler#educational#lexer#llvm#parser#python#python3#system-programming#tacky#x86-64
Write a minimal ELF linker about 2 months ago

AI Summary: The task is to create a minimal ELF linker for 32-bit x86 architecture in order to make the existing Python-based C compiler independent of external linkers like GCC/LD. This initial version should handle ELF header creation, program header generation, merging of code sections (.text, .data, .bss), basic symbol resolution, and writing the output to an a.out file. Relocations, dynamic linking, and debugging information are out of scope for this initial implementation.

Complexity: 4/5
enhancement help wanted

A Python-based C compiler for x86-64, featuring full parsing, semantic analysis, IR generation, and assembly code emission.

Python
#asm#assembly#assembly-language#c#c-language#codegen#compiler#educational#lexer#llvm#parser#python#python3#system-programming#tacky#x86-64
Minimal C Preprocessor about 2 months ago

AI Summary: Implement a minimal C preprocessor for the existing x86-64 C compiler, handling #include, #define, #ifdef/#ifndef/#endif directives, and comment removal. The preprocessor should be independent of GCC, focusing on basic macro replacement and header inclusion without advanced features like variadic macros or macro functions.

Complexity: 4/5
enhancement help wanted

A Python-based C compiler for x86-64, featuring full parsing, semantic analysis, IR generation, and assembly code emission.

Python
#asm#assembly#assembly-language#c#c-language#codegen#compiler#educational#lexer#llvm#parser#python#python3#system-programming#tacky#x86-64