You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I modified some code to be able to compile and execute ChaKraCore in AArch64 Linux.
Currently, I run the following simple code in interpreter mode, but occur argument passing error when calling into function test(num)
function test(num) {
return num;
}
var sum = 1;
for (var step = 0; step < 500000; step++) {
sum += test(step);
}
In this case, because of the parameter number is less than 6, thus just passing them by register in arm64_CallFunction()
// ARM64 calling convention is:
// x0 parameter 1 = function
// x1 parameter 2 = info
// x2 values[0]
// x3 values[1]
but entryPoint function as InterpreterStackFrame::InterpreterThunk(), use MACRO ARGUMENTS to get the arguments but expect the parameters are located in the stack.
// At entry of JavascriptMethod the stack layout is:
// [Return Address] [function] [callInfo] [arg0] [arg1] ...
Js::Var* va = _get_va(_AddressOfReturnAddress(), n);
my question is whether the parameters should be stored in the stack before enter the entrypoint?
The text was updated successfully, but these errors were encountered:
I modified some code to be able to compile and execute ChaKraCore in AArch64 Linux.
Currently, I run the following simple code in interpreter mode, but occur argument passing error when calling into function test(num)
function test(num) {
return num;
}
var sum = 1;
for (var step = 0; step < 500000; step++) {
sum += test(step);
}
In this case, because of the parameter number is less than 6, thus just passing them by register in arm64_CallFunction()
// ARM64 calling convention is:
// x0 parameter 1 = function
// x1 parameter 2 = info
// x2 values[0]
// x3 values[1]
but entryPoint function as InterpreterStackFrame::InterpreterThunk(), use MACRO ARGUMENTS to get the arguments but expect the parameters are located in the stack.
// At entry of JavascriptMethod the stack layout is:
// [Return Address] [function] [callInfo] [arg0] [arg1] ...
Js::Var* va = _get_va(_AddressOfReturnAddress(), n);
my question is whether the parameters should be stored in the stack before enter the entrypoint?
The text was updated successfully, but these errors were encountered: