Changeset 41782 in vbox for trunk/src/VBox/Disassembler
- Timestamp:
- Jun 16, 2012 7:11:27 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmCore.cpp
r41781 r41782 313 313 } 314 314 315 if (off <= pCpu->cbCachedInstr) 316 disReadMore(pCpu, off, 1); 317 315 disReadMore(pCpu, off, 1); 318 316 return pCpu->abInstr[off]; 319 317 } … … 368 366 } 369 367 370 if (off + 2 < pCpu->cbCachedInstr) 371 disReadMore(pCpu, off, 2); 372 368 disReadMore(pCpu, off, 2); 373 369 #ifdef DIS_HOST_UNALIGNED_ACCESS_OK 374 370 return *(uint16_t const *)&pCpu->abInstr[off]; … … 422 418 DECL_NO_INLINE(static, uint32_t) disReadDWordSlow(PDISCPUSTATE pCpu, RTUINTPTR off) 423 419 { 424 if (RT_UNLIKELY(off + 2> DIS_MAX_INSTR_LENGTH))420 if (RT_UNLIKELY(off + 4 > DIS_MAX_INSTR_LENGTH)) 425 421 { 426 422 Log(("disReadDWord: too long instruction...\n")); … … 438 434 } 439 435 440 if (off + 2 < pCpu->cbCachedInstr) 441 disReadMore(pCpu, off, 2); 442 436 disReadMore(pCpu, off, 4); 443 437 #ifdef DIS_HOST_UNALIGNED_ACCESS_OK 444 438 return *(uint32_t const *)&pCpu->abInstr[off]; … … 458 452 DECLINLINE(uint32_t) disReadDWordByOff(PDISCPUSTATE pCpu, RTUINTPTR off) 459 453 { 460 if (RT_UNLIKELY(off + 2> pCpu->cbCachedInstr))454 if (RT_UNLIKELY(off + 4 > pCpu->cbCachedInstr)) 461 455 return disReadDWordSlow(pCpu, off); 462 456 … … 492 486 DECL_NO_INLINE(static, uint64_t) disReadQWordSlow(PDISCPUSTATE pCpu, RTUINTPTR off) 493 487 { 494 if (RT_UNLIKELY(off + 2> DIS_MAX_INSTR_LENGTH))488 if (RT_UNLIKELY(off + 8 > DIS_MAX_INSTR_LENGTH)) 495 489 { 496 490 Log(("disReadQWord: too long instruction...\n")); … … 517 511 } 518 512 519 if (off + 2 < pCpu->cbCachedInstr) 520 disReadMore(pCpu, off, 2); 521 513 disReadMore(pCpu, off, 8); 522 514 #ifdef DIS_HOST_UNALIGNED_ACCESS_OK 523 515 return *(uint64_t const *)&pCpu->abInstr[off]; … … 538 530 DECLINLINE(uint64_t) disReadQWordByOff(PDISCPUSTATE pCpu, RTUINTPTR off) 539 531 { 540 if (RT_UNLIKELY(off + 2> pCpu->cbCachedInstr))532 if (RT_UNLIKELY(off + 8 > pCpu->cbCachedInstr)) 541 533 return disReadQWordSlow(pCpu, off); 542 534
Note:
See TracChangeset
for help on using the changeset viewer.