deepjit: 1642
[calu.git] / 3_test / deepjit.s
index f65b4458986f55e0dc034cd06d1f7aa2207780fa..3653ad27386dae4e74743d67e298488c109ea819 100644 (file)
@@ -156,6 +156,10 @@ jit:
        ;r9 ... address to actual entry in defer table
        ;r10... address to defer table
 
+       ;load address of program
+       ldil r14, prog_mul@lo
+       ldih r14, prog_mul@hi
+
        ldil r15, prog_consts@lo
        ldih r15, prog_consts@hi
 
@@ -232,38 +236,34 @@ vm_defer:
 ;case *
 ;42
 vm_mul:
-       ;load address of program
-       ldil r4, prog_mul@lo
-       ldih r4, prog_mul@hi
-
        ;program instruction (14)
-       ldw r0, 0(r4)
+       ldw r0, 0(r14)
        stx r0, 0(r2)
-       ldw r0, 4(r4)
+       ldw r0, 4(r14)
        stx r0, 4(r2)
-       ldw r0, 8(r4)
+       ldw r0, 8(r14)
        stx r0, 8(r2)
-       ldw r0, 12(r4)
+       ldw r0, 12(r14)
        stx r0, 12(r2)
-       ldw r0, 16(r4)
+       ldw r0, 16(r14)
        stx r0, 16(r2)
-       ldw r0, 20(r4)
+       ldw r0, 20(r14)
        stx r0, 20(r2)
-       ldw r0, 24(r4)
+       ldw r0, 24(r14)
        stx r0, 24(r2)
-       ldw r0, 28(r4)
+       ldw r0, 28(r14)
        stx r0, 28(r2)
-       ldw r0, 32(r4)
+       ldw r0, 32(r14)
        stx r0, 32(r2)
-       ldw r0, 36(r4)
+       ldw r0, 36(r14)
        stx r0, 36(r2)
-       ldw r0, 40(r4)
+       ldw r0, 40(r14)
        stx r0, 40(r2)
-       ldw r0, 44(r4)
+       ldw r0, 44(r14)
        stx r0, 44(r2)
-       ldw r0, 48(r4)
+       ldw r0, 48(r14)
        stx r0, 48(r2)
-       ldw r0, 52(r4)
+       ldw r0, 52(r14)
        stx r0, 52(r2)
 
        ;increment address