add test - add overloading instruction test
This commit is contained in:
@@ -21,14 +21,34 @@ ismnemonic_error .set 0
|
|||||||
.if .ismnemonic(instr)
|
.if .ismnemonic(instr)
|
||||||
; do nothing
|
; do nothing
|
||||||
.else
|
.else
|
||||||
ismnemonic_error .set ismnemonic_error + 1
|
ismnemonic_error .set 1
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
|
; test .feature ubiquitous_idents
|
||||||
|
|
||||||
|
; allow overloading mnemonics
|
||||||
|
.feature ubiquitous_idents
|
||||||
|
|
||||||
|
.setcpu "6502"
|
||||||
|
|
||||||
|
; make an adc macro
|
||||||
|
.macro adc
|
||||||
|
.endmacro
|
||||||
|
|
||||||
|
; should not match
|
||||||
|
.if .ismnemonic(adc)
|
||||||
|
ismnemonic_error .set 1
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.delmac adc
|
||||||
|
|
||||||
|
; test all instructions:
|
||||||
|
|
||||||
; there is no instruction table for "none", make sure 'adc' (common to all CPUs) and 'add' (sweet16) doesn't match
|
; there is no instruction table for "none", make sure 'adc' (common to all CPUs) and 'add' (sweet16) doesn't match
|
||||||
.setcpu "none"
|
.setcpu "none"
|
||||||
.if .ismnemonic(adc) || .ismnemonic(add)
|
.if .ismnemonic(adc) || .ismnemonic(add)
|
||||||
ismnemonic_error .set ismnemonic_error + 1
|
ismnemonic_error .set 1
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.setcpu "6502"
|
.setcpu "6502"
|
||||||
|
|||||||
Reference in New Issue
Block a user