PPC: Fix offset calculation on AIX when not using a
function descriptor Change-Id: I439bac759cb363f35f6aa23a699b6ef1d9079684 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1925027 Reviewed-by: Junliang Yan <jyan@ca.ibm.com> Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com> Cr-Commit-Position: refs/heads/master@{#65052}
This commit is contained in:
parent
e927764216
commit
c940bd89af
@ -1940,6 +1940,7 @@ void TurboAssembler::CallCFunctionHelper(Register function,
|
||||
LoadP(ip, MemOperand(function, 0));
|
||||
dest = ip;
|
||||
} else if (ABI_CALL_VIA_IP) {
|
||||
// pLinux and Simualtor, not AIX
|
||||
Move(ip, function);
|
||||
dest = ip;
|
||||
}
|
||||
|
@ -1031,17 +1031,18 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
Label start_call;
|
||||
bool isWasmCapiFunction =
|
||||
linkage()->GetIncomingDescriptor()->IsWasmCapiFunction();
|
||||
int offset = 9 * kInstrSize;
|
||||
#if defined(_AIX)
|
||||
// AIX/PPC64BE Linux uses a function descriptor
|
||||
int kNumParametersMask = kHasFunctionDescriptorBitMask - 1;
|
||||
num_parameters = kNumParametersMask & misc_field;
|
||||
has_function_descriptor =
|
||||
(misc_field & kHasFunctionDescriptorBitMask) != 0;
|
||||
// AIX emits 2 extra Load instructions under CallCFunctionHelper
|
||||
// AIX may emit 2 extra Load instructions under CallCFunctionHelper
|
||||
// due to having function descriptor.
|
||||
constexpr int offset = 11 * kInstrSize;
|
||||
#else
|
||||
constexpr int offset = 9 * kInstrSize;
|
||||
if (has_function_descriptor) {
|
||||
offset = 11 * kInstrSize;
|
||||
}
|
||||
#endif
|
||||
if (isWasmCapiFunction) {
|
||||
__ mflr(r0);
|
||||
|
Loading…
Reference in New Issue
Block a user