Skip to content

CE C/C++ Toolchain (v14.0)

Latest

Choose a tag to compare

@adriweb adriweb released this 22 Dec 08:56
· 14 commits to master since this release

The v14.0 toolchain adds many functions, fixes bugs, and applies optimizations here and there.
Merry Christmas! 🎄

This release is brought to you in particular thanks to @ZERICO2005 who did almost all of the work!

Highlights:

  • Massive expansion of libc functionality: strto*, atoi/atol/atoll, strlcat, memmem, memrmem, strrstr, stpncpy, strspn/strcspn/strpbrk, etc., many implemented/optimized in handwritten assembly.
  • Added sscanf and vsscanf
  • Wide-character and C95 additions: wint_t, <wctype.h>, <cfenv>, numerous wmem* and wcs* helpers.
  • C++ library updates: added <complex>, improvements to <type_traits>, fixes to C++98 headers.
  • Math and floating-point: new/optimized dtof, (u)lltod, logbf, ldexpf behavior fixes, and scalbln(f/l).
  • IO and tooling fixes: fclose correctness, stdio.h cleanup/rename helpers, fileioc performance and docs, gfx_AllocSprite bug fix.

Getting Started

Check out the CE C/C++ Toolchain Documentation.

Downloads

Windows: CEdev-Windows.zip
Linux: CEdev-Linux.tar.gz
macOS (intel): CEdev-macOS-intel.dmg
macOS (arm): CEdev-macOS-arm.dmg


Changelog

Added

  • String/number conversion:
    • Assembly implementations: strtol/strtoul, strtoll/strtoull, atoi/atol/atoll.
    • New helpers: __strtoi, __strtoui.
  • String utilities:
    • sscanf/vsscanf.
    • strlcat, stpncpy, memmem, memrmem, strrstr, strspn, strcspn, strpbrk, strchrnul.
  • Wide-character and locale:
    • wint_t, <wctype.h>, C95 wmem* functions, wcslen/wcsnlen.
  • C/C++ headers and types:
    • <cfenv>; PRI24 and SCN24 in <inttypes.h>.
    • <cstdarg> added; fixes for (c)stddef under C89/C++98.
    • Expanded <type_traits>.
    • C++ <complex> added.
  • Math/FP:
    • Assembly dtof, (u)lltod, logbf; optimized ilogbf, copysignl.
    • Implemented scalbln(f/l).
    • fminf/fmaxf in assembly.
  • Testing/tooling/infra:
    • lots of tests for the above!
    • git-blame-ignore-revs added.
    • updated some CI things

Fixed

  • fclose correctness; stdio.h cleanup and rename alias.
  • Fix and optimize clipping behavior for gfx_HorizLine and gfx_VertLine (by @calc84maniac, fixes #673).
  • Fixed fontlib_GetGlyphWidth.
  • gfx_AllocSprite return value bug.
  • ti_Alloc(String/Equ) now handles NULL from allocator; nonnull attributes added.
  • ti_SetArchiveStatus prototype/declaration corrected.
  • errno/perror strings updated; additional errno defines for compatibility (partially by @coco875, see #640).
  • Replaced broken OS strspn/strcspn/strpbrk with in-house implementations (by @calc84maniac, fixes #646).
  • some float handling edge cases, and endptr for strto(f/d/ld), fixed.
  • <fenv.h> function-macros fixed; introduced <cfenv>.
  • convimg: fix transparent-index and palette-offset (by @mateoconlechuga)
  • Misc. docs fixes

Performance and Optimizations

  • Multiplication helpers: inlined/optimized __llmul_b, __llmul_add_b_overflow; llmulu_b improvements and cycle count fixes.
  • memmove optimized; zero-filling in calloc faster under __TICE__.
  • File I/O: fileioc optimized.
  • i48/i64 routines: implemented i48div, optimized i48div and i64 bitwise ops; added cycle counts and formatting for i48 CRT routines.
  • ZX0 decompressor optimized using eZ80 instructions.
  • Misc. size opts

The next release should also be major, as @mateoconlechuga is working on some standard-ification of the toolchain tools especially linking-wise, and @Sightem on fixing newer LLVM compiler rebase efforts (v15 -> v17). Stay tuned!