C Compiler for MC6800 (fork from chibicc)
https://www.zukeran.org/shin/d/ ↗// readme
chibicc-6800-v1: C Compiler for MC6800
Overview
This is a Motorola MC6800 cross-compiler based on @rui314’s chibicc.
The compiler targets the MC6800 and is designed to generate efficient code. It works well on the MC6800 and provides good performance.
Many C programs, including Dhrystone and Whetstone benchmarks, now run on the MC6800. The compiler also supports IEEE 754 32-bit floating-point operations through an assembly implementation.
Some test code or implementation notes may still remain. Feedback and bug reports are always welcome.
Topics
- Data types:
intand pointers are 16-bit;longandfloatare 32-bit.doubleandlong long(64-bit or more) are unsupported. - Function parameters: Only the first parameter is passed via registers (A/B/@long). If the first parameter is a struct/union, all parameters are passed via the stack.
- Return values: Struct/union return values pass their address as an implicit first argument in a register. All other normal arguments are passed on the stack.
- IEEE 754 floating-point: 32-bit floating-point arithmetic is implemented in…