mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
fix offset calculations in arm.cpp and powerpc.cpp
This commit is contained in:
parent
5f05110f33
commit
ed6945dec7
@ -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;
|
||||
|
@ -2733,11 +2733,12 @@ class MyAssembler: public Assembler {
|
||||
|
||||
assert(&c, jumpTableSize);
|
||||
|
||||
if (needJump(b)) {
|
||||
bool jump = needJump(b);
|
||||
if (jump) {
|
||||
write4(dst + dstOffset, ::b(jumpTableSize + TargetBytesPerWord));
|
||||
}
|
||||
|
||||
dstOffset += jumpTableSize + TargetBytesPerWord;
|
||||
dstOffset += jumpTableSize + (jump ? TargetBytesPerWord : 0);
|
||||
}
|
||||
|
||||
unsigned size = b->size - blockOffset;
|
||||
@ -2749,7 +2750,7 @@ class MyAssembler: public Assembler {
|
||||
dstOffset += size;
|
||||
}
|
||||
|
||||
unsigned index = c.code.length();
|
||||
unsigned index = dstOffset;
|
||||
assert(&c, index % TargetBytesPerWord == 0);
|
||||
for (ConstantPoolEntry* e = c.constantPool; e; e = e->next) {
|
||||
e->address = dst + index;
|
||||
|
Loading…
Reference in New Issue
Block a user