mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
fix ARM64 OffsetPromise::value
I must have done a search-and-replace from 4 to TargetBytesPerWord earlier, but in this case it should have been the instruction size (4), not the word size.
This commit is contained in:
parent
98a1fefefc
commit
e3f50e6d67
@ -981,6 +981,8 @@ class MyAssembler : public Assembler {
|
||||
|
||||
bool jump = needJump(b);
|
||||
if (jump) {
|
||||
expect(&con, TargetBytesPerWord == 4);
|
||||
|
||||
write4(dst + dstOffset,
|
||||
isa::b((poolSize + TargetBytesPerWord - 8) >> 2));
|
||||
}
|
||||
|
@ -12,6 +12,12 @@
|
||||
#include "fixup.h"
|
||||
#include "block.h"
|
||||
|
||||
namespace {
|
||||
|
||||
const unsigned InstructionSize = 4;
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace avian {
|
||||
namespace codegen {
|
||||
namespace arm {
|
||||
@ -39,7 +45,7 @@ int64_t OffsetPromise::value()
|
||||
|
||||
unsigned o = offset - block->offset;
|
||||
return block->start
|
||||
+ padding(block, forTrace ? o - vm::TargetBytesPerWord : o) + o;
|
||||
+ padding(block, forTrace ? o - InstructionSize : o) + o;
|
||||
}
|
||||
|
||||
Promise* offsetPromise(Context* con, bool forTrace)
|
||||
@ -115,7 +121,7 @@ void* updateOffset(vm::System* s, uint8_t* instruction, int64_t value)
|
||||
|
||||
*p = (v & mask) | ((~mask) & *p);
|
||||
|
||||
return instruction + 4;
|
||||
return instruction + InstructionSize;
|
||||
}
|
||||
|
||||
ConstantPoolEntry::ConstantPoolEntry(Context* con,
|
||||
|
Loading…
Reference in New Issue
Block a user