From b8e5038798b0dece628846acb5ad25d9d4e60395 Mon Sep 17 00:00:00 2001 From: Guillaume Valadon Date: Fri, 15 Jun 2018 12:10:10 +0200 Subject: Toshiba MeP support --- test/arch/mep/asm/test_major_opcode_9.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/arch/mep/asm/test_major_opcode_9.py (limited to 'test/arch/mep/asm/test_major_opcode_9.py') diff --git a/test/arch/mep/asm/test_major_opcode_9.py b/test/arch/mep/asm/test_major_opcode_9.py new file mode 100644 index 00000000..822f3b6a --- /dev/null +++ b/test/arch/mep/asm/test_major_opcode_9.py @@ -0,0 +1,24 @@ +# Toshiba MeP-c4 - Major Opcode #9 unit tests +# Guillaume Valadon + +from ut_helpers_asm import check_instruction + + +class TestMajor9: + + def test_ADD3(self): + """Test the ADD3 instruction""" + + # Top instructions + check_instruction("ADD3 $10, $4, $0", "940a") + check_instruction("ADD3 $3, $0, $0", "9003") + check_instruction("ADD3 $12, $4, $0", "940c") + check_instruction("ADD3 $7, $12, $0", "9c07") + check_instruction("ADD3 $TP, $4, $0", "940d") + + # Randomly choosen instructions + check_instruction("ADD3 $4, $1, $9", "9194") + check_instruction("ADD3 $7, $12, $9", "9c97") + check_instruction("ADD3 $12, $9, $SP", "99fc") + check_instruction("ADD3 $12, $TP, $7", "9d7c") + check_instruction("ADD3 $4, $8, $SP", "98f4") -- cgit 1.4.1