Changeset 2081 for rtcg/trunk/src/asm_write.c
- Timestamp:
- 01/19/10 14:59:03 (2 years ago)
- Files:
-
- 1 modified
-
rtcg/trunk/src/asm_write.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rtcg/trunk/src/asm_write.c
r2079 r2081 2 2 #include <stdlib.h> 3 3 #include <string.h> 4 #include <x86/modrm.h> 4 5 5 6 #include "asm.h" … … 55 56 offset+=5; 56 57 break; 58 59 case INSTR_SUB: 60 oInstr[1] = AsmMakeModRm(MOD_REG, instr->regDest, instr->regSrc); 61 oInstr[3] = instr->imSrc; 62 offset += 4; 63 break; 57 64 58 65 case INSTR_NOP: … … 73 80 exit(0); 74 81 } 75 76 // printf("oInstr = %#X (%#X %#X)\n", oInstr, *(unsigned long*)oInstr, *(unsigned long*)(oInstr+4));77 82 } 78 83 79 84 curr=curr->next; 80 85 } 81 82 // printf("New code length has %d bytes\n", offset);83 86 84 87 return offset;
