Changeset 67078 in vbox for trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
- Timestamp:
- May 25, 2017 9:29:48 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
r67077 r67078 2311 2311 2312 2312 2313 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_M b_RO(PBS3CG1STATE pThis, unsigned iEncoding)2313 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Msomething(PBS3CG1STATE pThis, unsigned iEncoding) 2314 2314 { 2315 2315 unsigned off; 2316 if (iEncoding == 0) 2317 { 2318 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)) - 1; 2319 off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2320 (pThis->abCurInstr[off] & X86_MODRM_REG_MASK) >> X86_MODRM_REG_SHIFT, 2321 1, 0, BS3CG1OPLOC_MEM); 2322 } 2323 else 2324 return 0; 2325 pThis->cbCurInstr = off; 2326 return iEncoding + 1; 2327 } 2328 2329 2330 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Md_RO(PBS3CG1STATE pThis, unsigned iEncoding) 2331 { 2332 unsigned off; 2333 if (iEncoding == 0) 2334 { 2335 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)) - 1; 2336 off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2337 (pThis->abCurInstr[off] & X86_MODRM_REG_MASK) >> X86_MODRM_REG_SHIFT, 2338 4, 0, BS3CG1OPLOC_MEM); 2339 } 2340 else 2341 return 0; 2342 pThis->cbCurInstr = off; 2343 return iEncoding + 1; 2344 } 2345 2346 2347 static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Md_WO(PBS3CG1STATE pThis, unsigned iEncoding) 2348 { 2349 unsigned off; 2350 if (iEncoding == 0) 2351 { 2352 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)) - 1; 2353 off = Bs3Cfg1EncodeMemMod0Disp(pThis, false, off, 2354 (pThis->abCurInstr[off] & X86_MODRM_REG_MASK) >> X86_MODRM_REG_SHIFT, 2355 4, 0, BS3CG1OPLOC_MEM_WO); 2356 } 2357 else 2358 return 0; 2316 switch (iEncoding) 2317 { 2318 case 0: 2319 off = Bs3Cg1InsertOpcodes(pThis, Bs3Cg1InsertReqPrefix(pThis, 0)) - 1; 2320 off = Bs3Cfg1EncodeMemMod0DispWithDefaultsAndNoReg(pThis, off); 2321 break; 2322 default: 2323 return 0; 2324 } 2359 2325 pThis->cbCurInstr = off; 2360 2326 return iEncoding + 1; … … 3982 3948 return Bs3Cg1EncodeNext_MODRM_Gv_RO_Ma(pThis, iEncoding); 3983 3949 3984 case BS3CG1ENC_MODRM_Mb_RO:3985 return Bs3Cg1EncodeNext_MODRM_Mb_RO(pThis, iEncoding);3986 case BS3CG1ENC_MODRM_Md_RO:3987 return Bs3Cg1EncodeNext_MODRM_Md_RO(pThis, iEncoding);3988 case BS3CG1ENC_MODRM_Md_WO:3989 return Bs3Cg1EncodeNext_MODRM_Md_WO(pThis, iEncoding);3990 3991 3950 case BS3CG1ENC_FIXED: 3992 3951 return Bs3Cg1EncodeNext_FIXED(pThis, iEncoding); … … 4334 4293 4335 4294 case BS3CG1ENC_MODRM_Mb_RO: 4336 pThis->iRmOp = 0; 4337 pThis->aOperands[0].cbOp = 1; 4338 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_MEM; 4295 pThis->pfnEncoder = Bs3Cg1EncodeNext_MODRM_Msomething; 4296 pThis->iRmOp = 0; 4297 pThis->aOperands[0].cbOp = 1; 4298 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_MEM; 4299 pThis->aOperands[0].enmLocationMem = BS3CG1OPLOC_MEM; 4339 4300 break; 4340 4301 4341 4302 case BS3CG1ENC_MODRM_Md_RO: 4342 pThis->iRmOp = 0; 4343 pThis->aOperands[0].cbOp = 4; 4344 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_MEM; 4303 pThis->pfnEncoder = Bs3Cg1EncodeNext_MODRM_Msomething; 4304 pThis->iRmOp = 0; 4305 pThis->aOperands[0].cbOp = 4; 4306 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_MEM; 4307 pThis->aOperands[0].enmLocationMem = BS3CG1OPLOC_MEM; 4345 4308 break; 4346 4309 4347 4310 case BS3CG1ENC_MODRM_Md_WO: 4348 pThis->iRmOp = 0; 4349 pThis->aOperands[0].cbOp = 4; 4350 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_MEM_WO; 4311 pThis->pfnEncoder = Bs3Cg1EncodeNext_MODRM_Msomething; 4312 pThis->iRmOp = 0; 4313 pThis->aOperands[0].cbOp = 4; 4314 pThis->aOperands[0].enmLocation = BS3CG1OPLOC_MEM_WO; 4315 pThis->aOperands[0].enmLocationMem = BS3CG1OPLOC_MEM_WO; 4351 4316 break; 4352 4317
Note:
See TracChangeset
for help on using the changeset viewer.