Releases: llvm-mos/llvm-mos-sdk
Releases · llvm-mos/llvm-mos-sdk
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
SDK v6.1.0
New features
- llvm-mos/llvm-mos#357 -- SCP700 (SNES sound coprocessor) support -- @asiekierka
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 allowconstexpr
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
.
- This was thought to work, but the previous implementation invoked
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