Mercurial > repos > blastem
comparison 68kinst.c @ 3:a4ad0e3e3e0e
Finish mulu.w, muls.w and abcd parameter decoding
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 03 Nov 2012 22:15:55 -0700 |
parents | 5df303bf72e6 |
children | 6f6a2d7cc889 |
comparison
equal
deleted
inserted
replaced
2:5df303bf72e6 | 3:a4ad0e3e3e0e |
---|---|
405 //data register direct not allowed when <ea> is the source (operand order bit of 1) | 405 //data register direct not allowed when <ea> is the source (operand order bit of 1) |
406 if (*istream & 0x100) { | 406 if (*istream & 0x100) { |
407 if ((*istream & 0xC0) == 0xC0) { | 407 if ((*istream & 0xC0) == 0xC0) { |
408 decoded->op = M68K_MULS; | 408 decoded->op = M68K_MULS; |
409 decoded->extra.size = OPSIZE_WORD; | 409 decoded->extra.size = OPSIZE_WORD; |
410 decoded->dst.addr_mode = MODE_REG; | |
411 decoded->dst.params.regs.pri = m68K_reg_quick_field(*istream); | |
410 istream = m68k_decode_op(istream, OPSIZE_WORD, &(decoded->src)); | 412 istream = m68k_decode_op(istream, OPSIZE_WORD, &(decoded->src)); |
411 } else if(!(*istream & 0xF0)) { | 413 } else if(!(*istream & 0xF0)) { |
412 decoded->op = M68K_ABCD; | 414 decoded->op = M68K_ABCD; |
415 decoded->extra.size = OPSIZE_BYTE; | |
416 decoded->src.params.regs.pri = *istream & 0x7; | |
417 decoded->dst.params.regs.pri = m68K_reg_quick_field(*istream); | |
418 decoded->dst.addr_mode = decoded->src.addr_mode = (*istream & 8) ? MODE_AREG_PREDEC : MODE_REG; | |
413 } else if(!(*istream & 0x30)) { | 419 } else if(!(*istream & 0x30)) { |
414 decoded->op = M68K_EXG; | 420 decoded->op = M68K_EXG; |
415 decoded->extra.size = OPSIZE_LONG; | 421 decoded->extra.size = OPSIZE_LONG; |
416 decoded->src.params.regs.pri = m68K_reg_quick_field(*istream); | 422 decoded->src.params.regs.pri = m68K_reg_quick_field(*istream); |
417 decoded->dst.params.regs.pri = *istream & 0x7; | 423 decoded->dst.params.regs.pri = *istream & 0x7; |
434 } | 440 } |
435 } else { | 441 } else { |
436 if ((*istream & 0xC0) == 0xC0) { | 442 if ((*istream & 0xC0) == 0xC0) { |
437 decoded->op = M68K_MULU; | 443 decoded->op = M68K_MULU; |
438 decoded->extra.size = OPSIZE_WORD; | 444 decoded->extra.size = OPSIZE_WORD; |
445 decoded->dst.addr_mode = MODE_REG; | |
446 decoded->dst.params.regs.pri = m68K_reg_quick_field(*istream); | |
439 istream = m68k_decode_op(istream, OPSIZE_WORD, &(decoded->src)); | 447 istream = m68k_decode_op(istream, OPSIZE_WORD, &(decoded->src)); |
440 } else { | 448 } else { |
441 decoded->op = M68K_AND; | 449 decoded->op = M68K_AND; |
442 decoded->extra.size = (*istream >> 6); | 450 decoded->extra.size = (*istream >> 6); |
443 decoded->src.addr_mode = MODE_REG; | 451 decoded->src.addr_mode = MODE_REG; |