fix offset calculations in arm.cpp and powerpc.cpp

This commit is contained in:
Joel Dice
2011-09-30 18:25:44 -06:00
parent 5f05110f33
commit ed6945dec7
2 changed files with 7 additions and 5 deletions

View File

@ -2413,12 +2413,13 @@ class MyAssembler: public Assembler {
poolSize += TargetBytesPerWord;
}
if (needJump(b)) {
bool jump = needJump(b);
if (jump) {
write4
(dst + dstOffset, ::b((poolSize + TargetBytesPerWord - 8) >> 2));
}
dstOffset += poolSize + TargetBytesPerWord;
dstOffset += poolSize + (jump ? TargetBytesPerWord : 0);
}
unsigned size = b->size - blockOffset;