Default sizes for instructions without a size specifier suffix
For instructions that support multiple sizes but do not have a size suffix specified, the assembler should select a default size. For example:
move #0, d0 -> move.w #0, d0
addq #1, d1 -> addq.w #1, d1
subq #1, d1 -> subq.w #1, d1
btst #0, $FF0000 -> btst.b #0, $FF0000 ; the only size supported for addresses or register-indirect
btst #0, d0 -> btst.l #0, d0 ; the only size supported for registers
Both asm68k and vasm do this.
This is currently enabled on a case-by-case basis, but it should be easily made universal.
I updated the sources and rebuilt the assembler, but when I tried assembling an unsized MOVE instruction, I got an assertion failure:
Assertion failed: cc_false, file C:\Users\Kelsey\Documents\clownassembler\semantic.c, line 3249
It seems that the size check has not been updated to account for this change.
Whoops. And here I thought all instructions used ConstructSizeBits. That should be corrected now. I've also permitted more instructions to be unsized.