about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--example/asm_mips32.py10
-rw-r--r--example/test_jit_mips32.py4
2 files changed, 8 insertions, 6 deletions
diff --git a/example/asm_mips32.py b/example/asm_mips32.py
index c28519b9..83e7a90b 100644
--- a/example/asm_mips32.py
+++ b/example/asm_mips32.py
@@ -30,14 +30,16 @@ st = StrPatchwork()
 blocs, symbol_pool = parse_asm.parse_txt(mn_mips32, "l", '''
 main:
     ADDIU      A0, ZERO, 0x10
-    ADDIU         A1, ZERO, 0
+    ADDIU      A1, ZERO, 0
 loop:
     ADDIU      A1, A1, 0x1
-    ADDIU      A0, A0, 0xFFFFFFFF
     BNE        A0, ZERO, loop
-    NOP
+    ADDIU      A0, A0, 0xFFFFFFFF
+
+    ADDIU      A2, A2, 0x1
+    MOVN       A1, ZERO, ZERO
     JR         RA
-    NOP
+    ADDIU      A2, A2, 0x1
 ''')
 
 # fix shellcode addr
diff --git a/example/test_jit_mips32.py b/example/test_jit_mips32.py
index 2e18b9dd..5dd9175d 100644
--- a/example/test_jit_mips32.py
+++ b/example/test_jit_mips32.py
@@ -70,8 +70,8 @@ def jit_mips32_binary(args):
 
     else:
         print(myjit.continue_run())
-
+    return myjit
 if __name__ == '__main__':
     from sys import stderr
     args = parser.parse_args()
-    jit_mips32_binary(args)
+    myjit = jit_mips32_binary(args)