Releases: llvm-mos/llvm-mos-sdk
Releases · llvm-mos/llvm-mos-sdk
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
SDK v6.0.0
Breaking changes
- #220 -- NES -- Rename
bank.h
tomapper.h
-- @asiekierka- These were originally shortenings of
bank_helpers.h
fromnesdoug
, 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.
- These were originally shortenings of
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 thezp,x
orzp,y
addressing modes. For example, ifx
is a zero page pointer stored inX
, a read fromx[2]
can be done usinglda 2,x
, and a load fromx[-2]
can be done usinglda 254,x
. This should be the preferred way of manually placing values in the zero page going forward.
- Variables can now be annotated with
- #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
andnesdoug
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.