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/jit/test_jit_branchjump.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/arch/mep/jit/test_jit_branchjump.py (limited to 'test/arch/mep/jit/test_jit_branchjump.py') diff --git a/test/arch/mep/jit/test_jit_branchjump.py b/test/arch/mep/jit/test_jit_branchjump.py new file mode 100644 index 00000000..baf602d8 --- /dev/null +++ b/test/arch/mep/jit/test_jit_branchjump.py @@ -0,0 +1,23 @@ +# Toshiba MeP-c4 - Branch/Jump instructions JIT unit tests +# Guillaume Valadon + +from ut_helpers_jit import jit_instructions + + +class TestBranchJump: + + def test_blti(self): + """Test BLTI jit""" + + # Instructions that will be jitted + instructions = "MOV R0, 1\n" + instructions += "BLTI R0, 0x2, 0x6\n" + instructions += "MOV R0, 0\n" + instructions += "MOV R1, 1" + + # Jit + jitter = jit_instructions(instructions) + + # Check expected results + assert(jitter.cpu.R0 == 1) + assert(jitter.cpu.R1 == 1) -- cgit 1.4.1