Add thumb-specific code for invoke stub.
On LLVM-based compiler, we are compiling the invoke stubs
into Thumb2 instruction set. Thus, we should take care
of the thumb offset for invoke stub as well.
Change-Id: Ifc0b0099f2f035a64e89350086d6435e733224b8
diff --git a/src/common_test.h b/src/common_test.h
index a9bd139..cdcac24 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -231,7 +231,9 @@
} else {
const std::vector<uint8_t>& invoke_stub = compiled_invoke_stub->GetCode();
MakeExecutable(invoke_stub);
- method_invoke_stub = reinterpret_cast<const Method::InvokeStub*>(&invoke_stub[0]);
+ method_invoke_stub = reinterpret_cast<const Method::InvokeStub*>(
+ CompiledCode::CodePointer(&invoke_stub[0],
+ compiled_invoke_stub->GetInstructionSet()));
}
LOG(INFO) << "MakeExecutable " << PrettyMethod(method)