Skip to content

Releases: llvm-mos/llvm-mos-sdk

SDK v8.0.0

18 Nov 20:57
7d4df2b
Compare
Choose a tag to compare

Breaking changes

  • #242 - Rename cx16 kernal call SAVEHL to BSAVE -- @XarkLabs
    • This call was not documented previously, and internal vector was called savehl (save headerless). Now it is documented as BSAVE so this PR renames kernel vector and function to match documentation.

New features

  • #244 - Add missing cbm_k_chkout KERNAL routine.

Optimizations

  • llvm-mos/llvm-mos#408 - Optimize multiplies and chain shifts
    • Multiplies by constants are now relaxed into a add or subtract of two shifts, wherever possible.
    • Shifts of the same base by different constant amounts in the same direction are now chained off of each other, with lesser amounts occuring "on the way" to greater amount. Code is moved globally within a function to form the chains.
    • This also fixes llvm-mos/llvm-mos#268, where a manual add of shifts would be normalized into a multiply, but lacking this backend transform, the multiply would stay all the way to final output.

Bug fixes

  • llvm-mos/llvm-mos#381 - Support relative and absolute paths in -fpost-link-tool.
  • llvm-mos/llvm-mos#403 - Don't report function sizes for Mesen label files
    • Providing function symbol sizes corrupts the disassembly in Mesen's debugger
  • #239 - Various Atari 2600 fixes -- @sehugg
    • Fixed zp section overlapping registers.
    • Fixed bank selection macros to accept macro parameters.
    • Better Stella signature.
  • Make cbm.h header work when included from C++.

SDK v7.1.0

12 Nov 21:40
d9b3373
Compare
Choose a tag to compare

New targets

  • #237 - Atari 2600 support (4K and 3E mappers) with VCSLib port - @sehugg

Bug fixes

  • llvm-mos/llvm-mos#354 - Added error messages for out-of-range relocations
    • For compatibility with existing practice, the high two bytes of the 32-bit virtual addresses are ignored for 8-bit and 16-bit addresses.

SDK v7.0.1

06 Nov 02:43
4c6e9a5
Compare
Choose a tag to compare

Bug fixes

  • llvm-mos/llvm-mos#379 - Fixed compiler crash due to branch folding
  • llvm-mos/llvm-mos#399 - The compiler now conservatively sizes inline assembly when determining whether to a relative branch is in range.
  • llvm-mos/llvm-mos#393 - Inline assembly now has callee-saved imaginary registers correctly rewritten to the zero page stack when appropriate.

SDK v7.0.0

02 Nov 16:36
4c6e9a5
Compare
Choose a tag to compare

Breaking changes

  • llvm-mos/llvm-mos#397 -- Rename xo65 segment hex from _XX to _xXX.
    • This avoids a conflict with the dollar sign escape _d.

Bug fixes

  • Fix latent data structure corruption in MOSTargetStreamer
  • llvm-mos/llvm-mos#398 -- Fix xo65 integration on Windows

SDK v6.4.0

30 Oct 05:19
4c6e9a5
Compare
Choose a tag to compare

New targets

New features

  • #395 -- Wrap od65 and ld65 to link xo65 object files
    • This is a pretty landmark feature (IMO); you can now use ca65 object files (i.e. xo65 files) in a llvm-mos link more-or-less as if they were ELF. This allows linking against existing ca65 libraries without converting them to work with the llvm assembler.
    • See https://llvm-mos.org/wiki/Cc65_integration for details
    • See https://github.com/mysterymath/llvm-pently for an example project that links the NES "pently" auto library assembled with ca65 against a demo application in llvm-mos C.

New libraries

Bug fixes

  • llvm-mos/llvm-mos#392 -- Fixed issue where a function that only called __attribute__((leaf)) inline asm could be incorrectly optimized out
  • #233 -- Minor volatile fixes for Commodore PET -- @asiekierka

SDK v6.3.1

23 Oct 15:53
Compare
Choose a tag to compare

Bug fixes

-- [NES] Fix neslib by correcting .aligned_buffers to .aligned.

SDK v6.3.0

21 Oct 16:40
Compare
Choose a tag to compare

Optimizations

  • [NES] Moved aligned buffers to .aligned section at beginning of RAM.
    • NES noinit buffers commonly require high alignment, which then would make .noinit require high alignment. .noinit isn't traditionally the first thing in the C enclave, so this could waste too much of the NES's 2K of ram aligning the buffers. Traditionally these buffers are placed at 0x200; accordingly, we've created an .aligned section that is the first thing placed in NES RAM.

SDK v6.2.0

08 Oct 21:49
e7ce558
Compare
Choose a tag to compare

Optimizations

Bug fixes

  • #226 -- Fix zeropage declarations for NES MMC3 mapper -- @cogwheel
  • Add default printf implementation for NES
    • Writes to 0x401B; provided printf-mesen1.lua and printf-mesen2.lua scripts for Mesen1 and Mesen2 to redirect this to the debug console.
  • #227 -- (CP/M-65) Fix some problems with relocation conversion -- @davidgiven

SDK v6.1.0

02 Oct 16:47
Compare
Choose a tag to compare

New features

Bug fixes

  • llvm-mos/llvm-mos#369 -- Fix various issues with zero page pointers (e.g., llvm-mos/llvm-mos#366, llvm-mos/llvm-mos#363) -- @asiekierka

  • Use __builtin_bit_cast to allow constexpr initialization of struct of array arrays.

    • This was thought to work, but the previous implementation invoked reinterpret_cast, which isn't legal in constexpr. The new version works so long as the types don't contain pointers. For those that do, there's intrinsically no way to statically initialize them in C++; this has to instead be done in an assembly file using #<ptr and #>ptr.

Optimization

  • Loop induction variable canonicalization now prefers narrower types instead of wider ones. This can replace 16-bit loop counters with zero-extensions of 8-bit ones. Doesn't come up tremendously often, but when it does, the previous behavior absolutely killed performance.

  • #222 - Make neslib/nesdoug buffers weak so they can be moved by the user; move PAL_BUF out of hardware stack by default -- @cogwheel

  • Fix C++-invalid cast in nes.h

SDK v6.0.0

25 Sep 02:51
bdcf0f5
Compare
Choose a tag to compare

Breaking changes

  • #220 -- NES -- Rename bank.h to mapper.h -- @asiekierka
    • These were originally shortenings of bank_helpers.h from nesdoug, but as they gained more mapper-related functionality they were increasingly inaccurately named. Backwards incompatible changes like this are better to happen earlier, before too many NES projects depend on the API in the wild.

New features

  • llvm-mos/llvm-mos#348 -- Zero page pointers -- @asiekierka
    • Variables can now be annotated with __zeropage or __zp to change their address space, e.g., char __zeropage value. These variables are automatically placed in .zp.noinit, .zp.data, or .zp.bss, as appropariate. What separates this from regular explicit section annotations is that pointers can also be annotated as pointing to zero page variables, e.g., char __zeropage *ptr. These pointers only take 8 bits, and arbitrary constant offsets backwards and forwards from them can be referenced using the zp,x or zp,y addressing modes. For example, if x is a zero page pointer stored in X, a read from x[2] can be done using lda 2,x, and a load from x[-2] can be done using lda 254,x. This should be the preferred way of manually placing values in the zero page going forward.
  • #211 -- NES MMC3 -- Add macros to set four-screen nametables -- @cogwheel
  • #207 -- Commander X16 -- Add VERA FX register to cx16.h -- @ToboterXP
  • #212 -- NES -- Improve NMI performnace for multi_vram_buffer operations -- @cogwheel
  • #218 -- NES -- Add .ram output section to explicitly place input sections in NES RAM -- @cogwheel

Optimizations

  • #217, #221 -- Split neslib and nesdoug components out so they are only linked in as used.
    • These libraries were previously fairly monolithic, so using any of them tended to link in a large amount of data and NMI handlers. These have now been broken up, so largely only NMI handlers for the used portion of the library are brought into the program.

Bug fixes

  • #209 -- Fix MMC3 bug when where C sections would remain uninitialized if placed in PRG-RAM -- @cogwheel