Skip to content

v4.0.0

Choose a tag to compare

@eliminmax eliminmax released this 30 Mar 17:08
· 188 commits to main since this release

Version 4.0.0

New and Changed Features:

  • Added riscv64 backend, targeting RV64GC with the lp64d ABI
  • rework error handling
    • The only externally-visible changes are that additional information
      is provided, and error IDs are now PascalCase rather than
      SCREAMING_SNAKE_CASE
  • Added (optional) support for GNU-style --long-opts
    • this is only compiled in if the BFC_LONGOPTS macro is defined to a
      truthy value at compile time, which it's not by default.
  • If not explicitly specified, backend now will match the system's
    architecture if possible
    • This requires eambfc to be compiled with a compiler that has the same
      predefined macros identifying the target system as gcc.
  • Before compiling the corresponding ] instruction, the space reserved
    for the [ instruction will start with a trap/illegal instruction,
    before using no-op instructions to pad to the needed size, rather than
    just using no-ops from the start.

Bugfixes:

  • JSON now properly validates UTF-8, replacing bytes that cannot be read
    as UTF-8 with Unicode's REPLACEMENT CHARACTER (�).
  • Fixed bug in encoding of NOP instructions in the arm64 backend
    • Because NOP instructions are only used within the placeholder for [
      instructions before the offset of the corresponding ] is known,
      this would be overwritten before the binary was actually output, unless
      -k was passed and there was a missing ].
  • Fixed preprocessor directives generating invalid code if any
    architectures were disabled
  • Fixed false negative in check if the s390x IIHL instruction can be used
  • Fixed incorrect encoding of s390x IIHH instruction

Internal changes:

  • internal API and documentation improved and reworked
  • operations common to multiple backends are now in utils.h
  • removed resource_mgr
  • use GCC compiler attributes for better static analysis and optimization
    • attributes are handled in a way that ensures that it will still compile
      without issue if using non-GCC compilers
    • the noreturn attribute is also supported in non-GCC C11/C17/C23
      compilers
  • added support for unit testing with CUnit, the LLVM C interface's
    disassembler, and libjson-c, and ported a number of Rust unit tests over.
  • more robust testing in general
  • pre-release testing now runs tests concurrently using GNU parallel
  • non-portable testing hass been moved from the Makefile into a justfile
  • the command-line tests are now run using a POSIX C program which is
    cleaner than the combination of Makefile and test.sh, which was limited
    by the fairly restricted set of features POSIX requires make to support,
    and was too complex to fit within a shell script
  • Now explicitly documents support for newer versions of C as being
    in-scope