AInt *sub_aryNew(AInt n) { AInt *p = malloc(n * sizeof (AInt)); memset((char *) p, 0, n * sizeof (AInt)); return p; } void sub_aryInit(AInt *a, AInt *ip, AInt n) { memcpy((char *) a, (char *) ip, n * sizeof (AInt)); }
var[TcSubAryNew] = (AInt) sub_aryNew; var[TcSubAryInit] = (AInt) sub_aryInit;
} else if (phrCmp(70, "[!!**0]=", epc) && priority >= 15) { e1 = i; e0 = expr(0); epc = ppc1; i = exprSub(15); ! putIcX64("%R_8b_%2m0; %R_8b_%0m2; %R_8b_%1m1; %R_89_04_ca;", &var[e1], &var[e0], &var[i], 0); } else if (phrCmp(71, "[!!**0]", epc)) { e1 = i; i = tmpAlloc(); e0 = expr(0); ! putIcX64("%R_8b_%0m2; %R_8b_%1m1; %R_8b_04_ca; %R_89_%2m0;", &var[e1], &var[e0], &var[i], 0); epc = ppc1;
} else if (phrCmp(21, "int !!*0[!!**2];", pc)) { e2 = expr(2); + #if (ABI_MSW64 != 0) ! putIcX64("%R_8b_%1m1; %R_ff_%2m2; %R_89_%0m0;", &var[tc[wpc[0]]], &var[e2], &var[TcSubAryNew], 0); + #elif (ABI_SYSV64 != 0) + putIcX64("%R_8b_%1m7; %R_ff_%2m2; %R_89_%0m0;", &var[tc[wpc[0]]], &var[e2], &var[TcSubAryNew], 0); + #endif } else if (phrCmp(22, "int !!*0[!!**2] = {", pc)) { e2 = expr(2); + #if (ABI_MSW64 != 0) ! putIcX64("%R_8b_%1m1; %R_ff_%2m2; %R_89_%0m0;", &var[tc[wpc[0]]], &var[e2], &var[TcSubAryNew], 0); + #elif (ABI_SYSV64 != 0) + putIcX64("%R_8b_%1m7; %R_ff_%2m2; %R_89_%0m0;", &var[tc[wpc[0]]], &var[e2], &var[TcSubAryNew], 0); + #endif j = 0; for (i = ppc1; i < pc1; i++) { // コンマ以外のトークンを数える. if (tc[i] == TcCrBrCls) break; if (tc[i] != TcComma) { j++; } } if (i >= pc1) goto err; AInt *ip = malloc(j * sizeof (AInt)); j = 0; for (i = ppc1; tc[i] != TcCrBrCls; i++) { if (tc[i] == TcCrBrCls) break; if (tc[i] != TcComma) { ip[j] = var[tc[i]]; j++; } } + #if (ABI_MSW64 != 0) ! putIcX64("%R_8b_%0m1; ba_%1i; 41_b8_%2i; %R_ff_%3m2;", &var[tc[wpc[0]]], (IntP) ip, (IntP) (AInt) j, &var[TcSubAryInit]); + #elif (ABI_SYSV64 != 0) + putIcX64("%R_8b_%0m7; be_%1i; ba_%2i; %R_ff_%3m2;", &var[tc[wpc[0]]], (IntP) ip, (IntP) (AInt) j, &var[TcSubAryInit]); + #endif ppc1 = i + 2; // } と ; の分.
enum { OpCpy = 0, OpCeq, OpCne, OpClt, OpCge, OpCle, OpCgt, OpAdd, OpSub, OpMul, OpDiv, OpMod, OpAnd, OpShr, OpAdd1, OpNeg, OpGoto, OpJeq, OpJne, OpJlt, OpJge, OpJle, OpJgt, OpLop, OpPrint, OpTime, OpEnd, OpPrints, OpAryNew, OpAryInit, OpArySet, OpAryGet, OpOpnWin, OpSetPix0, OpM64s, OpRgb8, OpWait, OpXorShift, OpGetPix, OpFilRct0, OpPrm, OpF16Sin, OpF16Cos, OpInkey, OpDrwStr0, OpGprDec, OpBitBlt };
void putIc(int op, IntP p0, IntP p1, IntP p2, IntP p3) // 移行中の間だけ、以下の形で残しておく. { printf("putIc: error\n"); exit(1); }
int phrCmpPutIc(int pid, String phr, int pc, int *pi, int lenExpr, int op, int *err) // 移行中の間だけ、以下の形で残しておく. { if (phrCmp(pid, phr, pc)) { printf("phrCmpPutIc: error\n"); exit(1); } return 0; }
putIcX64("%R_8b_%2m0; %R_8b_%0m2; %R_8b_%1m1; %R_89_04_ca;", &var[e1], &var[e0], &var[i], 0); %R_8b_%2m0 RAX = [x]; // RAXはレジスタ番号0 %R_8b_%0m2 RDX = [a]; // RDXはレジスタ番号2 %R_8b_%1m1 RCX = [i]; // RCXはレジスタ番号1 %R_89_04_ca [RDX+RCX*8] = RAX;
putIcX64("%R_8b_%0m2; %R_8b_%1m1; %R_8b_04_ca; %R_89_%2m0;", &var[e1], &var[e0], &var[i], 0); %R_8b_%0m2 RDX = [a]; // RDXはレジスタ番号2 %R_8b_%1m1 RCX = [i]; // RCXはレジスタ番号1 %R_8b_04_8a RAX = [RDX+RCX*8]; %R_89_%2m0 [x] = RAX; // RAXはレジスタ番号0
コメント | お名前 | NameLink | |