|
Lines 613-620
Link Here
|
| 613 |
} |
613 |
} |
| 614 |
// determine instruction byte length |
614 |
// determine instruction byte length |
| 615 |
BigInteger instrLength= null; |
615 |
BigInteger instrLength= null; |
| 616 |
if (j < instructions.length - 1) { |
616 |
if (instruction.getSize() != null) { |
| 617 |
instrLength= instructions[j+1].getAdress().subtract(instruction.getAdress()).abs(); |
617 |
instrLength= new BigInteger(instruction.getSize().toString()); |
|
|
618 |
} else { |
| 619 |
if (j < instructions.length - 1) { |
| 620 |
instrLength= instructions[j+1].getAdress().subtract(instruction.getAdress()).abs(); |
| 621 |
} |
| 618 |
} |
622 |
} |
| 619 |
if (instrLength == null) { |
623 |
if (instrLength == null) { |
| 620 |
// cannot determine length of last instruction |
624 |
// cannot determine length of last instruction |
|
Lines 730-749
Link Here
|
| 730 |
} |
734 |
} |
| 731 |
// determine instruction byte length |
735 |
// determine instruction byte length |
| 732 |
BigInteger instrLength= null; |
736 |
BigInteger instrLength= null; |
| 733 |
if (j < instructions.length - 1) { |
737 |
if (instruction.getSize() != null) { |
| 734 |
instrLength= instructions[j+1].getAdress().subtract(instruction.getAdress()).abs(); |
738 |
instrLength= new BigInteger(instruction.getSize().toString()); |
| 735 |
} else if (i < mixedInstructions.length - 1) { |
739 |
} else { |
| 736 |
int nextSrcLineIdx= i+1; |
740 |
if (j < instructions.length - 1) { |
| 737 |
while (nextSrcLineIdx < mixedInstructions.length) { |
741 |
instrLength= instructions[j+1].getAdress().subtract(instruction.getAdress()).abs(); |
| 738 |
IInstruction[] nextInstrs= mixedInstructions[nextSrcLineIdx].getInstructions(); |
742 |
} else if (i < mixedInstructions.length - 1) { |
| 739 |
if (nextInstrs.length > 0) { |
743 |
int nextSrcLineIdx= i+1; |
| 740 |
instrLength= nextInstrs[0].getAdress().subtract(instruction.getAdress()).abs(); |
744 |
while (nextSrcLineIdx < mixedInstructions.length) { |
|
|
745 |
IInstruction[] nextInstrs= mixedInstructions[nextSrcLineIdx].getInstructions(); |
| 746 |
if (nextInstrs.length > 0) { |
| 747 |
instrLength= nextInstrs[0].getAdress().subtract(instruction.getAdress()).abs(); |
| 748 |
break; |
| 749 |
} |
| 750 |
++nextSrcLineIdx; |
| 751 |
} |
| 752 |
if (nextSrcLineIdx >= mixedInstructions.length) { |
| 741 |
break; |
753 |
break; |
| 742 |
} |
754 |
} |
| 743 |
++nextSrcLineIdx; |
|
|
| 744 |
} |
| 745 |
if (nextSrcLineIdx >= mixedInstructions.length) { |
| 746 |
break; |
| 747 |
} |
755 |
} |
| 748 |
} |
756 |
} |
| 749 |
if (instrLength == null) { |
757 |
if (instrLength == null) { |