diff options
| author | Guillaume Valadon <guillaume@valadon.net> | 2018-06-15 12:10:10 +0200 |
|---|---|---|
| committer | Guillaume Valadon <guillaume@valadon.net> | 2018-07-12 22:50:51 +0200 |
| commit | b8e5038798b0dece628846acb5ad25d9d4e60395 (patch) | |
| tree | 932dd2676afcf0c4ba6bf0c57d3b574954461ad2 /test/arch/mep/jit/test_jit_branchjump.py | |
| parent | 82eb5f6eb197fc59d2e9ae21cfda05a1868e462e (diff) | |
| download | miasm-b8e5038798b0dece628846acb5ad25d9d4e60395.tar.gz miasm-b8e5038798b0dece628846acb5ad25d9d4e60395.zip | |
Toshiba MeP support
Diffstat (limited to 'test/arch/mep/jit/test_jit_branchjump.py')
| -rw-r--r-- | test/arch/mep/jit/test_jit_branchjump.py | 23 |
1 files changed, 23 insertions, 0 deletions
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 <guillaume@valadon.net> + +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) |