comparison m68k.cpu @ 2456:72d0eac49507

Implement movep in new 68K core
author Michael Pavone <pavone@retrodev.com>
date Wed, 21 Feb 2024 20:09:11 -0800
parents b1e8e7554f2f
children f9d5c137c74b
comparison
equal deleted inserted replaced
2455:4aef84fbe2e2 2456:72d0eac49507
1621 update_flags Z 1621 update_flags Z
1622 dst |= tmp 1622 dst |= tmp
1623 m68k_save_dst size 1623 m68k_save_dst size
1624 m68k_prefetch 1624 m68k_prefetch
1625 1625
1626 0000DDD10Z001AAA movep_ay_dx
1627 local address 32
1628 m68k_prefetch
1629 scratch1 += aregs.A
1630 address = scratch1 + 2
1631 ocall read_8
1632 dregs.D:1 = scratch1 << 8
1633 scratch1 = address
1634 ocall read_8
1635 dregs.D:0 = scratch1
1636 if Z
1637 address += 2
1638 scratch1 = address
1639 dregs.D <<= 16
1640 ocall read_8
1641 dregs.D:1 = scratch1 << 8
1642 scratch1 = address + 2
1643 ocall read_8
1644 dregs.D:0 = scratch1
1645 end
1646 m68k_prefetch
1647
1648 0000DDD11Z001AAA movep_dx_ay
1649 m68k_prefetch
1650 scratch2 = scratch1 + aregs.A
1651 if Z
1652 scratch1 = dregs.D >> 24
1653 ocall write_8
1654 scratch2 += 2
1655 scratch1 = dregs.D >> 16
1656 ocall write_8
1657 scratch2 += 2
1658 end
1659 scratch1 = dregs.D >> 8
1660 ocall write_8
1661 scratch2 += 2
1662 scratch1 = dregs.D
1663 ocall write_8
1664 m68k_prefetch
1665
1626 0100111001110000 reset 1666 0100111001110000 reset
1627 if reset_handler 1667 if reset_handler
1628 pcall reset_handler m68k_reset_handler context 1668 pcall reset_handler m68k_reset_handler context
1629 end 1669 end
1630 cycles 128 1670 cycles 128