comparison mc-code-ia32.c @ 62:129f4802b027

separation done
author kono
date Thu, 20 Feb 2003 05:27:29 +0900
parents 8ffb8ca3fe34
children e13486b2c12e
comparison
equal deleted inserted replaced
61:8ffb8ca3fe34 62:129f4802b027
156 } else { 156 } else {
157 return reg_name[rname[i]]; /* should be error */ 157 return reg_name[rname[i]]; /* should be error */
158 } 158 }
159 } 159 }
160 160
161 extern int rname[MAX_MAX];
162 extern int regs[MAX_MAX]; /* 使われているレジスタを示すフラグ */
163 extern int reg_stack[MAX_MAX]; /* 実際のレジスタの領域 */
164 extern int regv[MAX_MAX]; /* 値が入っているかどうか */
165
166 extern int creg_regvar; 161 extern int creg_regvar;
167 162
168 void 163 void
169 gexpr_code_init(void){ 164 gexpr_code_init(void){
170 use_register(creg,REG_EAX,0); 165 use_register(creg,REG_EAX,0);
327 } 322 }
328 323
329 324
330 void 325 void
331 code_crlvar(int e2) { 326 code_crlvar(int e2) {
332 printf("\tmovsbl %d(%%ebp),%s\n",lvar(e2),register_name(creg,0)); 327 printf("\tmovsbl %d(%%ebp),%s\n",e2,register_name(creg,0));
333 } 328 }
334 329
335 330
336 void 331 void
337 code_fname(char *e2) { 332 code_fname(char *e2) {
786 printf("\tmovl %s,%%ebp\n",register_name(e3,0)); 781 printf("\tmovl %s,%%ebp\n",register_name(e3,0));
787 } 782 }
788 783
789 784
790 void 785 void
791 code_fix_frame_pointer(disp_offset) { 786 code_fix_frame_pointer(int disp_offset) {
792 printf("\tlea %d(%%ebp),%%ebp\n",disp_offset); 787 printf("\tlea %d(%%ebp),%%ebp\n",disp_offset);
793 } 788 }
794 789
795 790
796 void 791 void