Closed iss000 closed 10 months ago
While fixing a bug in cpm65 I found an issue with llvm-mos-sdk. Here is the sample code:
; Run test: ; -------- ; ; /opt/bin/mos-cpm65-clang -Os -g -c -o test.o test.S ; ; /opt/bin/llvm-objdump -S test.o ; ; Result: ; ------ ; ; test.o: file format elf32-mos ; ; Disassembly of section .text: ; ; 00000000 <test>: ; ; ; stx test, y ; ; 0: 9b <unknown> ; ; 1: 00 brk ; ; 2: 00 brk ; ; ; rts ; ; 3: 60 rts test: stx test, y rts
Compilation passes without error, while if constant is given:
test: stx 0x1000, y rts
there is a proper error message:
test.S:19:7: error: instruction requires a CPU feature not currently enabled stx 0x1000, y ^
FYI, v.4.x silently compiles the code as stx zp,y :).
stx zp,y
Duplicate of https://github.com/llvm-mos/llvm-mos/issues/354
OK, it took me 1 whole day investigation :+1: . Closing and waiting #354 to be resolved.
While fixing a bug in cpm65 I found an issue with llvm-mos-sdk. Here is the sample code:
Compilation passes without error, while if constant is given:
there is a proper error message:
FYI, v.4.x silently compiles the code as
stx zp,y
:).