about summary refs log tree commit diff stats
path: root/test/arch/mep/asm/test_major_opcode_5.py
blob: dc984420b07ed57aa5792f077beb955d41312488 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Toshiba MeP-c4 - Major Opcode #5 unit tests
# Guillaume Valadon <guillaume@valadon.net>

from ut_helpers_asm import check_instruction


class TestMajor5:

    def test_MOV(self):
        """Test the MOV instruction"""

        # Top instructions
        check_instruction("MOV $2, 0", "5200", multi=2)
        check_instruction("MOV $12, 0", "5c00", multi=2)
        check_instruction("MOV $4, 0", "5400", multi=2)
        check_instruction("MOV $0, 0", "5000", multi=2)
        check_instruction("MOV $0, 3", "5003", multi=2)

        # Randomly choosen instructions
        check_instruction("MOV $8, 84", "5854", multi=2)
        check_instruction("MOV $SP, 108", "5f6c", multi=2)
        check_instruction("MOV $12, 80", "5c50", multi=2)
        check_instruction("MOV $TP, 59", "5d3b", multi=2)
        check_instruction("MOV $9, 89", "5959", multi=2)