BGBCC - cr88192/bgbtech_shxemu GitHub Wiki
BGBCC is a C compiler.
- In the context of this project, there is an in-progress SH target.
- Other branches exist, but development of this is more "copy-paste-specialize".
- Will use a variant of the SH ABI BGBCC SHx ABI
- Write more here as it becomes relevant.
- ELF: Produces flat absolute-addressed images.
- Future goals: finish PIC, shared-objects
- Also possible: Support PE/COFF (or a variant)
- Scalar integer/pointer code: Works
- Structs: Incomplete
- Struct pointers should work, but by-value semantics are incomplete
- Arrays: 1D arrays mostly seem to work.
- Multidimensional arrays: TODO
- Long Long: Incomplete
- Float/Double: Mostly complete but untested.
- varargs: Mostly working, uses __builtin_va_start() and friends.
- TBD: support composite types? (pretty much never used AFAIK).
- Globals: Don't yet support initialization values.
- Currently likely to be a C99 subset.
- Lacks older K&R style declarations;
- Trigraphs are disabled, digraphs don't work;
- Function prototypes are required.
- Unclear if more advanced features would be supported (VLAs, _Complex, ...)
- TBD if I will bother with __int128 or __float128 on SH.
- Would most likely be done pretty much entirely via internal runtime calls.