deepjit: 1642
authorMartin Perner <martin@perner.cc>
Mon, 27 Dec 2010 01:06:20 +0000 (02:06 +0100)
committerMartin Perner <martin@perner.cc>
Mon, 27 Dec 2010 01:06:20 +0000 (02:06 +0100)
3_test/deepjit.s
8_benchs/angabe/vm.c

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
index d31264fab717b5e0467ea53d97a3220b1f29877b..aa4a83f4ea6825f287b18e657511c9240a1a72a0 100644 (file)
@@ -27,6 +27,7 @@ int vm(const char *insns)
                        int8_t op = insns[pc];
                        int32_t t;
 
+                       printf("pc: %d op: %c\n", pc, op);
                        /* putchar(op); */
 
                        /* printf(" %d/%d:\t%08x\t%08x\t%08x\t%08x\t%08x\t%08x\t%08x\t%08x\n", */