diff --git a/bin/ikarus b/bin/ikarus index dc749c7..dad761e 100755 Binary files a/bin/ikarus and b/bin/ikarus differ diff --git a/bin/ikarus.h b/bin/ikarus.h index 7e0bb55..ff84bbc 100644 --- a/bin/ikarus.h +++ b/bin/ikarus.h @@ -110,6 +110,7 @@ typedef struct ikpcb{ void* system_stack; /* offset = 24 */ unsigned int* dirty_vector; /* offset = 28 */ ikp arg_list; /* offset = 32 */ + ikp engine_counter; /* offset = 36 */ /* the rest are not used by any scheme code */ /* they only support the runtime system (gc, etc.) */ unsigned int* segment_vector; diff --git a/src/geninstr/gen.pl b/src/geninstr/gen.pl index 13b6515..1543036 100755 --- a/src/geninstr/gen.pl +++ b/src/geninstr/gen.pl @@ -48,8 +48,7 @@ sub gen3{ } } -gen1 "movl \$27, 4(r1)\n"; -gen1 "movl \$27, 4000(r1)\n"; +gen1 "addl \$27, 12(r1)\n"; #gen1 "movb \$0, 4(r1)\n"; #gen1 "movb -2(r1), %ah\n"; diff --git a/src/geninstr/tmp.dump b/src/geninstr/tmp.dump index 821d007..e69de29 100644 --- a/src/geninstr/tmp.dump +++ b/src/geninstr/tmp.dump @@ -1,31 +0,0 @@ - -tmp.o: file format elf32-i386 - -Disassembly of section .text: - -00000000 <.text>: - 0: c7 40 04 1b 00 00 00 movl $0x1b,0x4(%eax) - 7: c7 41 04 1b 00 00 00 movl $0x1b,0x4(%ecx) - e: c7 42 04 1b 00 00 00 movl $0x1b,0x4(%edx) - 15: c7 43 04 1b 00 00 00 movl $0x1b,0x4(%ebx) - 1c: c7 44 24 04 1b 00 00 movl $0x1b,0x4(%esp) - 23: 00 - 24: c7 45 04 1b 00 00 00 movl $0x1b,0x4(%ebp) - 2b: c7 46 04 1b 00 00 00 movl $0x1b,0x4(%esi) - 32: c7 47 04 1b 00 00 00 movl $0x1b,0x4(%edi) - 39: c7 80 a0 0f 00 00 1b movl $0x1b,0xfa0(%eax) - 40: 00 00 00 - 43: c7 81 a0 0f 00 00 1b movl $0x1b,0xfa0(%ecx) - 4a: 00 00 00 - 4d: c7 82 a0 0f 00 00 1b movl $0x1b,0xfa0(%edx) - 54: 00 00 00 - 57: c7 83 a0 0f 00 00 1b movl $0x1b,0xfa0(%ebx) - 5e: 00 00 00 - 61: c7 84 24 a0 0f 00 00 movl $0x1b,0xfa0(%esp) - 68: 1b 00 00 00 - 6c: c7 85 a0 0f 00 00 1b movl $0x1b,0xfa0(%ebp) - 73: 00 00 00 - 76: c7 86 a0 0f 00 00 1b movl $0x1b,0xfa0(%esi) - 7d: 00 00 00 - 80: c7 87 a0 0f 00 00 1b movl $0x1b,0xfa0(%edi) - 87: 00 00 00 diff --git a/src/geninstr/tmp.s b/src/geninstr/tmp.s index ea423d1..d828601 100644 --- a/src/geninstr/tmp.s +++ b/src/geninstr/tmp.s @@ -1,17 +1,9 @@ .text -movl $27, 4(%eax) -movl $27, 4(%ecx) -movl $27, 4(%edx) -movl $27, 4(%ebx) -movl $27, 4(%esp) -movl $27, 4(%ebp) -movl $27, 4(%esi) -movl $27, 4(%edi) -movl $27, 4000(%eax) -movl $27, 4000(%ecx) -movl $27, 4000(%edx) -movl $27, 4000(%ebx) -movl $27, 4000(%esp) -movl $27, 4000(%ebp) -movl $27, 4000(%esi) -movl $27, 4000(%edi) +addl $27, 12(%eax) +addl $27, 12(%ecx) +addl $27, 12(%edx) +addl $27, 12(%ebx) +addl $27, 12(%esp) +addl $27, 12(%ebp) +addl $27, 12(%esi) +addl $27, 12(%edi) diff --git a/src/ikarus.boot b/src/ikarus.boot index 3239021..4032a70 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/libcompile.ss b/src/libcompile.ss index 5e28349..41d0d3a 100644 --- a/src/libcompile.ss +++ b/src/libcompile.ss @@ -2931,6 +2931,7 @@ [(system-stack) (mem 24 pcr)] [(dirty-vector) (mem 28 pcr)] [(arg-list) (mem 32 pcr)] + [(engine-counter) (mem 36 pcr)] [else (error 'pcb-ref "invalid arg ~s" x)]))) (define (primref-loc op) diff --git a/src/libintelasm.ss b/src/libintelasm.ss index 7168d32..89b2349 100644 --- a/src/libintelasm.ss +++ b/src/libintelasm.ss @@ -478,6 +478,8 @@ (CODE #x01 (ModRM 3 src dst ac))] [(and (mem? src) (reg? dst)) (CODErd #x03 dst src ac)] + [(and (imm? src) (mem? dst)) + (CODEdi #x81 dst src ac)] [else (error who "invalid ~s" instr)])] [(subl src dst) (cond