[HN Gopher] Shecc: A self-hosting and educational C optimizing c...
       ___________________________________________________________________
        
       Shecc: A self-hosting and educational C optimizing compiler
        
       Author : eatonphil
       Score  : 21 points
       Date   : 2024-01-07 21:12 UTC (1 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | jserv wrote:
       | Shecc is a self-compiling compiler for 32-bit Arm and RISC-V
       | architectures, focusing on a subset of the C language and
       | incorporating basic optimization techniques. It generates
       | executable Linux ELF binaries for ARMv7-A and RV32IM and includes
       | a minimal C standard library for GNU/Linux I/O. Written in ANSI
       | C, it is broadly compatible and features an integrated machine
       | code generator, removing the need for external tools. The
       | compiler uses a two-pass process for syntax checking and
       | translating operations into machine code, and has a register
       | allocation system for RISC-style architectures. Additionally, it
       | includes an architecture-independent, SSA-based middle-end for
       | enhanced optimizations.
        
       | yklcs wrote:
       | I've been working on a C compiler with the goal of ANSI C
       | compliance, and most of the projects described as a "C compiler"
       | seem to only support an arbitrary subset of C. This project seems
       | to support more than most educational/toy CCs, but I still
       | believe there's value in implementing full standard C.
        
       ___________________________________________________________________
       (page generated 2024-01-07 23:00 UTC)