* Added 'add imm, mem' instruction format.

This commit is contained in:
Abdulaziz Ghuloum 2006-12-21 17:16:33 +03:00
parent efae97a6e0
commit 3aa22ea200
8 changed files with 13 additions and 49 deletions

Binary file not shown.

View File

@ -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;

View File

@ -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";

View File

@ -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

View File

@ -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)

Binary file not shown.

View File

@ -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)

View File

@ -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