comparison m68k.cpu @ 2479:29baf8d5a579

Implement unlk, tst and nop in new 68K core
author Michael Pavone <pavone@retrodev.com>
date Fri, 08 Mar 2024 23:14:08 -0800
parents ea37200967c7
children f0645adddf0d
comparison
equal deleted inserted replaced
2478:ea37200967c7 2479:29baf8d5a579
1729 m68k_write32 aregs.R 1729 m68k_write32 aregs.R
1730 m68k_prefetch 1730 m68k_prefetch
1731 aregs.R = a7 1731 aregs.R = a7
1732 sext 32 scratch1 scratch1 1732 sext 32 scratch1 scratch1
1733 a7 += scratch1 1733 a7 += scratch1
1734 m68k_prefetch
1735
1736 0100111001011RRR unlk
1737 a7 = aregs.R
1738 scratch1 = a7
1739 m68k_read32
1740 a7 += 4
1741 aregs.R = scratch1
1734 m68k_prefetch 1742 m68k_prefetch
1735 1743
1736 0100100001000RRR swap 1744 0100100001000RRR swap
1737 ror dregs.R 16 dregs.R 1745 ror dregs.R 16 dregs.R
1738 update_flags NZV0C0 1746 update_flags NZV0C0
1815 1823
1816 m68k_calc_ea M R 1824 m68k_calc_ea M R
1817 aregs.D = ea 1825 aregs.D = ea
1818 1826
1819 m68k_prefetch 1827 m68k_prefetch
1820 1828
1829 01001010ZZMMMRRR tst
1830 invalid M 7 R 5
1831 invalid M 7 R 6
1832 invalid M 7 R 7
1833
1834 m68k_fetch_dst_ea M R Z
1835
1836 cmp 0 dst Z
1837 update_flags NZV0C0
1838 m68k_prefetch
1821 1839
1822 0100111001110000 reset 1840 0100111001110000 reset
1823 if reset_handler 1841 if reset_handler
1824 pcall reset_handler m68k_reset_handler context 1842 pcall reset_handler m68k_reset_handler context
1825 end 1843 end
1826 cycles 128 1844 cycles 128
1827 m68k_prefetch 1845 m68k_prefetch
1846
1847 0100111001110001 nop
1848 m68k_prefetch