Skip to content

Releases: llvm-mos/llvm-mos-sdk

SDK v8.1.0

04 Dec 19:04
Compare
Choose a tag to compare

New targets

  • #250 - Atari 8-bit XEGS (bank-switched) cartridge support - @cwedgwood

New features

  • llvm-mos/llvm-mos#10 - Floating Point Support
    • llvm-mos now supports the float and double data types, with binary32 and binary64 IEEE 754 implementations, respectively. The soft float library comes from LLVM's compiler-rt, and it isn't very well optimized for the 6502. Printf support may be manually included by passing -lprintf_flt. Unfortunatly, at present, printf must operate over doubles, and the simulator is the only target large enough to support a full printf implementation. Work is underway to make this smaller.
    • All relevant llvm-test-suite end-to-end floating-point tests pass.

Optimizations

  • llvm-mos/llvm-mos#419 - Strict inlining costs
    • The inliner no longer forces inlining to occur when an indirect call can be elided. This happened with printf, which could cause up to a complete printf implementations to be duplicated up to four times.

Bug fixes

  • Ignore empty records in ABI: Empty unions could cause the compiler to crash.

Known issues

  • The floating point libcalls are huge; this suggests they should be kept out of LTO, since ultimately unused libcalls present in LTO can still end up permanently bringing things in. Unfortunately, libcalls must be either fully included in LTO or fully excluded, since they are implicitly treated as __attribute__((leaf)). I opted for the latter, which means that this release regresses performance of large libcalls, since they can no longer use the zero page or static stacks. Work is underway to provide better stripping for unused libcalls, which will allow us to summarily pull in all libcalls to LTO in a future release.

Misc

SDK v8.0.1

28 Nov 00:59
cd3055e
Compare
Choose a tag to compare

Bug fixes

  • llvm-mos/llvm-mos#413 - Fixed compiler crash due to new shift chaining optimization.
  • Fixed latent issue in register scavenger; it would attempt to scavenge X, but this isn't implemented. Instead, disable ZP, Y addressing to avoid the case.
  • Fixed recursive codegen issue uncovered in the register scavenger; since it can run more than once, we need to check if the reserved imaginary save registers are in use before marking a register for scavenging.
  • #247 - Fix pce_joypad_read() only returning low nibble - @asiekierka

Optimizations

  • #248 - Base printf routines on one another. Helps decrease code size when multiple printf variants are used.

Miscellaneous

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