From 63e23a3d74d3560ee0635d32961fd9c205890f05 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 3 Feb 2026 21:42:48 +0100 Subject: Add the __fallthrough__ pseudo-instruction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'nasm' assembler now implements this, which is quite convenient. Define also a fake macro for it when the assembler is not 'nasm' just to bridge the gaps. Signed-off-by: Miquel Sabaté Solà --- include/asm.s | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/asm.s') diff --git a/include/asm.s b/include/asm.s index 67b195c..09229f9 100644 --- a/include/asm.s +++ b/include/asm.s @@ -20,3 +20,13 @@ .macro JAL ADDR jmp ADDR .endmacro + +;; Pseudo-instruction from 'nasm' that is not available for 'ca65'. An empty +;; implementation is actually quite accurate, as it's just a way for 'nasm' to +;; perform extra checks when programmers want to explicitly make the code fall +;; through. +.ifndef __NASM__ + .macro __fallthrough__ arg + ;; Nothing to do. + .endmacro +.endif -- cgit v1.2.3