comparison mc-nop-386.c @ 58:727c280bdd25

*** empty log message ***
author kono
date Wed, 19 Feb 2003 18:48:37 +0900
parents 3d7f199e99d0
children 8ffb8ca3fe34
comparison
equal deleted inserted replaced
57:3d7f199e99d0 58:727c280bdd25
892 emit_copy(from,to,2,offset,0,det); 892 emit_copy(from,to,2,offset,0,det);
893 if(length>0) 893 if(length>0)
894 emit_copy(from,to,length,offset,0,det); 894 emit_copy(from,to,length,offset,0,det);
895 break; 895 break;
896 } 896 }
897 if (det) {
898 /*
899 call bcopy
900 g_expr(list3(FUNCTION,,);
901 break;
902 */
903 }
897 use_register(from,REG_ESI,1); 904 use_register(from,REG_ESI,1);
898 use_register(to, REG_EDI,1); 905 use_register(to, REG_EDI,1);
899 use_register(dreg,REG_ECX,0); 906 use_register(dreg,REG_ECX,0);
900 if (length<0) { 907 if (length<0) {
901 printf("\tmovl $%d,%%ecx\n",-length/4); 908 printf("\tmovl $%d,%%ecx\n",-length/4);
996 e2 = cadr(e1); 1003 e2 = cadr(e1);
997 nargs = 0; 1004 nargs = 0;
998 for (e3 = caddr(e1); e3; e3 = cadr(e3)) { 1005 for (e3 = caddr(e1); e3; e3 = cadr(e3)) {
999 t=caddr(e3); 1006 t=caddr(e3);
1000 n=(NMTBL *)(e5=(cadr(e4 = car(e3)))); 1007 n=(NMTBL *)(e5=(cadr(e4 = car(e3))));
1001 switch(car(e4)) { 1008 if(scalar(t)) {
1002 /* 1009 g_expr(e4);
1003 case FNAME:
1004 printf("\tlea %s,%s\n",n->nm,register_name(creg,0));
1005 printf("\tpushl %s\n",register_name(creg,0)); 1010 printf("\tpushl %s\n",register_name(creg,0));
1006 break; 1011 } else if (car(t)==STRUCT||car(t)==UNION) {
1007 case ADDRESS: 1012 nargs += struct_push(e4,t);
1008 g_expr(e5); 1013 continue;
1009 printf("\tpushl %s\n",register_name(creg,0)); 1014 } else {
1010 break; 1015 error(TYERR);
1011 */
1012 default:
1013 if(scalar(t)) {
1014 g_expr(e4);
1015 printf("\tpushl %s\n",register_name(creg,0));
1016 } else if (car(t)==STRUCT||car(t)==UNION) {
1017 nargs += struct_push(e4,t);
1018 continue;
1019 } else {
1020 error(TYERR);
1021 }
1022 } 1016 }
1023 ++nargs; 1017 ++nargs;
1024 } 1018 }
1025 if (car(e2) == FNAME) { 1019 if (car(e2) == FNAME) {
1026 n=(NMTBL *)cadr(e2); 1020 n=(NMTBL *)cadr(e2);