Releases: llvm-mos/llvm-mos-sdk
Releases · llvm-mos/llvm-mos-sdk
SDK v8.1.0
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
anddouble
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.
- llvm-mos now supports the
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
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
- #246, llvm-mos/llvm-mos#412 - Add arm64 build target for macOS
- #241 -- Use emutest and libretro to test arbitrary emulators in Github CI (currently only NES and Atari2600 are implemented) - @sehugg
- Merge llvm/llvm-project@f4c6947
SDK v8.0.0
Breaking changes
- #242 - Rename cx16 kernal call
SAVEHL
toBSAVE
-- @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
New targets
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
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
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
.
- This avoids a conflict with the dollar sign escape
Bug fixes
- Fix latent data structure corruption in MOSTargetStreamer
- llvm-mos/llvm-mos#398 -- Fix xo65 integration on Windows
SDK v6.4.0
New targets
- #231 -- Add Commodore VIC-20 target (
mos-vic20-clang
) -- @asiekierka - #233 -- Add Commodore 128 target (
mos-c128-clang
) -- @asiekierka
New features
- #395 -- Wrap
od65
andld65
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
- #231 -- Add cc65-compatible header files for PET -- @asiekierka
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
Bug fixes
-- [NES] Fix neslib by correcting .aligned_buffers
to .aligned.
SDK v6.3.0
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.
- NES noinit buffers commonly require high alignment, which then would make
SDK v6.2.0
Optimizations
- llvm-mos/llvm-mos#378 -- Emit more efficient DEC/CMP patterns; use DCP (illegal opcode) when available -- @asiekierka
- llvm-mos/llvm-mos#372 -- Emit indexed-indirect JMP-based jump tables for 65CO2/SPC700 -- @asiekierka , @jackoalan
- llvm-mos/llvm-mos#376 -- Support MOVImag8 logical opcode on SPC700 for imaginary/imaginary copies -- @asiekierka
Bug fixes
- #226 -- Fix zeropage declarations for NES MMC3 mapper -- @cogwheel
- Add default printf implementation for NES
- Writes to 0x401B; provided
printf-mesen1.lua
andprintf-mesen2.lua
scripts for Mesen1 and Mesen2 to redirect this to the debug console.
- Writes to 0x401B; provided
- #227 -- (CP/M-65) Fix some problems with relocation conversion -- @davidgiven