deepjit: downto 1648
authorMartin Perner <martin@perner.cc>
Mon, 27 Dec 2010 01:00:40 +0000 (02:00 +0100)
committerMartin Perner <martin@perner.cc>
Mon, 27 Dec 2010 01:00:40 +0000 (02:00 +0100)
3_test/deepjit.s

index 58d6d23dca209be14e72617d9c7f67c3b58a6423..f65b4458986f55e0dc034cd06d1f7aa2207780fa 100644 (file)
@@ -156,6 +156,9 @@ jit:
        ;r9 ... address to actual entry in defer table
        ;r10... address to defer table
 
+       ldil r15, prog_consts@lo
+       ldih r15, prog_consts@hi
+
        ;backup defer table address
        mov r10, r9
        ;decrement address to input by 1
@@ -319,12 +322,8 @@ vm_sub:
 ;case 0 1 2 3 4 5 6 7 8 9
 ;48-57
 vm_consts:
-       ;load address of program
-       ldil r4, prog_consts@lo
-       ldih r4, prog_consts@hi
-
        ;program instruction (3)
-       ldw r0, 0(r4)
+       ldw r0, 0(r15)
        ;the first instr. loads r6 with the number
        ;thus we shall emulate this
 
@@ -338,9 +337,9 @@ vm_consts:
 
        ;store this 'dynamic' instruction
        stx r0, 0(r2)
-       ldw r0, 4(r4)
+       ldw r0, 4(r15)
        stx r0, 4(r2)
-       ldw r0, 8(r4)
+       ldw r0, 8(r15)
        stx r0, 8(r2)
 
        ;increment address