{"repo":"sysprog21/shecc","free":true,"listed":false,"github":"https://github.com/sysprog21/shecc","clone":"git clone https://github.com/sysprog21/shecc.git","description":"A self-hosting and educational C optimizing compiler","language":"C","stars":1377,"topics":["arm","armv7","compiler","self-hosting","c","linux","risc-v","rv32i","rv32im","riscv"],"license":"BSD-2-Clause","category":"self-hosted-apps","readme_excerpt":"shecc : self-hosting and educational C optimizing compiler Introduction shecc is built from scratch, targeting both 32-bit Arm and RISC-V architectures, as a self-compiling compiler for a subset of the C language. Despite its simplistic nature, it is capable of performing basic optimization strategies as a standalone optimizing compiler. Features Generate executable Linux ELF binaries for ARMv7-A and RV32IM. Provide a minimal C standard library for basic I/O on GNU/Linux. The cross-compiler is written in ANSI C, making it compatible with most platforms. Include a self-contained C front-end with an integrated machine code generator; no external assembler or linker needed. Utilize a two-pass compilation process: the first pass checks syntax and breaks down complex statements into basic operations, while the second pass translates these operations into Arm/RISC-V machine code. Develop a register allocation system that is compatible with RISC-style architectures. Implement an architecture-independent, static single assignment (SSA)-based middle-end for enhanced optimizations. Support dynamic linking to allow generated executables to run with glibc. Compatibility shecc is capable of compiling C source files written in the following syntax: data types: char , int , struct , enum , typedef , and pointer types condition statements: if , else , while , for , do-while , switch , case , default , break , continue , return , and general expressions operators: all arithmetic, logical, bit","default_branch":null,"files":null,"tree":[],"storefront":"/r/sysprog21","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sysprog21/shecc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}