Releases: llvm-mos/llvm-mos-sdk
SDK v0.13.1
New targets
- Commodore PET (
mos-pet-clang
): Thanks @williamw4096 !
Bug fixes
-
The CPM/65
elftocpm65
tool no longer attempts to relocate absolute addresses. Thanks @davidgiven ! -
The NES targets now once again compute DPCM offsets correctly. This caused DPCM samples not to work with the included ft2 library.
Library improvements
-
Made string/mem libc functions weak, so they can be easily overridden by user code.
-
The CX16 stack has been moved from banked RAM to main RAM, allowing use of the banked area. Thanks @XarkLabs !
SDK v0.13.0
Breaking Changes
-
Removed OVERLAY section type extension from linker script language. It isn't needed any more in our stock linker scripts, and is better done by either using the OVERLAY section type, or more preferably, using the high bits of the 32-bit VMA to separate out banks. The latter allows encoding the bank number directly into a symbol's address.
-
Removed OUTPUT_FORMAT(binary) from linker script. This decreases the diff from upstream, and we no longer need it. It's difficult to use and kind of a misfeature; the custom output format extension completely supersedes it.
SDK v0.12.1
Bug Fixes
- Fixed a bug in the NES targets that caused incorrect Mesen labels to be generated when the C symbols were placed in PRG-RAM and the data segment was nonempty.
- Fixed #99, which caused non-zero return values for various
cbm_k_
* functions in the Commodore targets on successful return. (Thanks @mlund, @cnelson20 !)
SDK v0.12.0
Breaking Changes
- The SDK no longer includes the additional libraries, headers, and tools needed for building rust-mos. These are huge, and the SDK is already a quite hefty download and install.
Optimizations
- Fixed llvm-mos/llvm-mos#182, where
.zp.data
and.zp.bss
references would use absolute addressing modes. - Fixed llvm-mos/llvm-mos#279, where negating a boolean would be done with control flow rather than
EOR #1
.
Miscellaneous
- Merged llvm/llvm-project@6a63e21cf4e6
- Improved debug location tracking throughout the backend.
SDK v0.11.8
Bug Fixes
- neslib -- Fixed almost completely broken
vram_inc
implementation.
Miscellaneous
- The release packages now include the headers, libraries, and tools needed to build rust-mos. This should allow that project to consume our binary releases rather than rebuilding llvm-mos from scratch.
SDK v0.11.7
New Features and Improvements
-
Partial implementations of C++ headers
<algorithm>
,<array>
,<iterator>
,<utility>
, and<limits>
. Thanks, @pfusik ! -
The assembler now accepts uppercase register names (i.e.,
LDA (32),Y
, not justLDA (32),y
). Thanks, @pfusik ! -
The default C64 target now swaps out the BASIC ROM before program start, which increases usable contiguous memory to 50KiB. Thanks, @OskarLinde !
-
Merged from upstream LLVM.
Bug Fixes
- Setting PRG-(NV)RAM or CHR-(NV)RAM sizes to zero on NES targets now works properly. Previously, zero would be fed into the formula used to compute shift counts for the iNES 2.0 header, but zero is out of the legal range of those formula.
SDK v0.11.6
New targets
- The new
atari8-stdcart
target now allows compiling to a standard 8KiB or 16KiB Atari 8-bit cartridge. Thanks, @cwedgwood !
Assembler improvements
INC A
,INA
,DEA
, andDEC A
spellings are now supported forINC
andDEC
. Thanks, @pfusik !
Optimizations
- The compiler now spends more time on Loop Strength Reduction, the most important loop optimization pass. Loop quality is particularly important on the 6502, especially relative to overall program size, so we can afford to spend longer on it. Overall, it doesn't seem to impact the compile times that much, but we see a sizable gain on some benchmarks.
Cleanup
- The compiler now uses the
.zeropage
directive to introduce imaginary registers when generating assembly output. This means that uses of imaginary registers are no longer wrapped withmos8(...)
, which makes assembly listings considerably easier to read.
SDK v0.11.5
New features
- Added a
.zeropage <symbol>
directive to allow marking external symbols as belonging to the zero page, much like cc65's.importzp
. This is more ergonomic than wrapping each usage withmos8(...)
, and it paves the way to more readable compiler-generated assembly as well.
Bug fixes
- The
BRK()
macro in6502.h
now contains anop
after thebrk
. This allows thebrk
to return successfully to the program afterwards, which makes this more useful when temporarily stopping the program to debug it. - Fixed a stray write to the zero page in the MMC1 bank handler. A symbol was accidentally placed in absolute memory rather than the zero page, but the memory was referenced using just the low byte.
SDK v0.11.4
Bug fixes
- Fixed transposition of the x and y arguments in neslib's
scroll()
. - Fixed MMC1 issue where use of certain banking routines might not register the corresponding NMI handler.
- Pinned Ubuntu and Windows versions to the previous release.
- Generally, systems libraries offer backwards, but not forwards, compatibility, so a binary built against newer system libraries may not run against an older system. Accordingly, we now build against the oldest supported Ubuntu and Windows versions offered by Github Actions.
- Prevent post-link tools from running when using
-Wl,--lto-emit-asm
. llvm-mos/llvm-mos#256 - Fix crash in specific increment/decrement optimization scenario. llvm-mos/llvm-mos#257
- Don't allocate variables covered by
#pragma clang section
to the zero page. This would break later, as the implicit section would override the zero page tag, but the code would still use 8-bit references. - Don't link against Github Action's libxml and zlib. These aren't reliably available on all target platforms, and they're used for niche functionality in LLVM.
SDK v0.11.2
New Features
- Added
-fnonreentrant
,-freentrant
,__attribute__((nonreentrant))
, and__attribute__((reentrant))
. The-fnonreentrant
Clang flag and__attribute__((nonreentrant))
function attribute directly tell the compiler that it can safely assume that no more than one instance of a given function can simultaneously be active, whether via recursion or interrupt handling. The compiler flag applies to every function in the given module. The-freentrant
and__attribute__((reentrant))
flags produce the current default behavior; the compiler cannot assume nonreentrancy, but it still may be able to prove that a given function is safe. The function attributes take precedence over the compiler flags.
Optimizations
- Fixed llvm-mos/llvm-mos#244. This can prevent spilling and filling of immediate loads, preferring instead to reissue the load.
- Fixed llvm-mos/llvm-mos#245, a minor load elision optimization.