--- generator/cpu68k/def68k.c 2020/03/04 04:46:43 1.1 +++ generator/cpu68k/def68k.c 2020/03/04 04:47:19 1.1.1.3 @@ -40,6 +40,9 @@ int main(int argc, char *argv[]) char buf[BUFLEN], *p; int lineno = 0; + (void)argc; + (void)argv; + /* open output files and write headers */ if ((outiibs = fopen(FNAME_OUTIIBS, "w")) == NULL) { @@ -657,7 +660,9 @@ void procline(char *line, int lineno, FI /* checks */ if (expand_d_ea_e) { - if (e[ea_Imm]) { + /* BTST is weirdo and you can do BTST Dx, #nnnn where Dx is the source + * of the bit-position and #nnnn is the immediate data to test */ + if (e[ea_Imm] && mnemonic_num != i_BTST ) { fprintf(stderr, "%d: Immediate data not allowed as dest\n", lineno); exit(1); } @@ -702,7 +707,6 @@ void procline(char *line, int lineno, FI t_size size; t_datatype ea_e; t_datatype ea_f; - int skip; int cc; int wordlen, type; int idx; @@ -1360,8 +1364,6 @@ int clocks_typetoindex(t_datatype type) int clocks_eacalc(t_datatype type, t_size size) { - int clks = 0; - switch(type) { case dt_Dreg: case dt_Areg: return 0; @@ -1382,8 +1384,8 @@ int clocks_eacalc(t_datatype type, t_siz case dt_Imm4: case dt_Imm8: case dt_Imm8s: + case dt_ImmV: case dt_Ill: return 0; - default: } printf("Invalid type for clocks\n"); exit(1);