1 Current ASM-INT(GHCC)/Fast-Stub(WebKit_jscc) set different FrameType to distinguish with CallingConv.It's more friendly to add callingConv flag in CallSignature class.
2 Fast-Stub/Aot CallingConv is WebKit_jscc while LLVM Backend don't support it on arm32. we'll add padding paramets to JS-Relative paramter is placed on stack.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZYPN?from=project-issue
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
Change-Id: I93df6c1d605692941b1aa362ad4e07a202d76241
description: fix getresumemode stub handle error
solution:
1.load offset error, should be GetIntptr;
2.get value from bitfield error because of lack of lsr;
3.set acc value error, should be build tagged.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZOD5
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: I96a35d134d5441f040cbf42d4e8ab2be208f166f
description: fix asm definefunc stub module error
solution: Due to missing action to update module in definefunc stub, it makes a problem in StoreModuleValue. So add updating module to asm definefunc stub.
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZBX0
Signed-off-by: wanghuan <wanghuan80@huawei.com>
Change-Id: Ifbe8daf4541210f77317898cfd40170fef7dd060
1. add HandleOverflow in unused positions of bcHandlers
2. add bytecode helper at the end of bcHandlers
3. Refactor Dispatch
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4YIQG?from=project-issue
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Id51d1f2cc3c86f8fa1a59f6e79024bef406f7a21
Refactor ID definition and callSignature initialization mechanism of runtime stub,
optimizer stub and bytecode handler stub,
reduce amount and complexity of macro used in calling those stubs.
Add stubDes struct to classify stubs both in AOT file generation phase
and AOT file loading phase.
Fix some circular dependency problems in including header files.
Fix certain inline function declaration and definition format problems, which could lead to
compiling errors.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VMLD?from=project-issue
Test: stubTest(unit test), richards with asm interpreter enabled
Signed-off-by: luochuhao <luochuhao@huawei.com>
Change-Id: Ibd5fcd963347b97f8dec227f3245d2064463b0b0
Change several structures for call stub.
Related issue: #I4XK12
Signed-off-by: lichenshuai <lichenshuai@huawei.com>
Change-Id: Ie7389ff96c619451304a3f0d352b271310c4b73e
Description:
FastMul convert Int into Double, and lead to the result
call the double constructor of JSTaggedValue
Solution:
add Int Case for FastMul
Issue: #I4XK3U
Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
Delete the existing module implementation and
re implement the module function according to the ECMA 2018 specification
issue: #I4NZQT [https://gitee.com/openharmony/ark_ts2abc/issues/I4NZQT]
Signed-off-by: y00576111 <yaojian16@huawei.com>
Change-Id: I8d381db7f8bf2f3d6b2a5c21cbc3cbab1aef0b9b
This PR refactors the design of JSThread by introducing aligned struct,
which is more friendly for ASM-Interpreter and Compiler IRs. Meanwhile,
to facilitate debugging, a macro enable_bytrace is introduced to control
the lib dependencies of ark-js-runtime.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4X0TG
Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: I56835deec5d372d7c827ded26544a87766f29002
In debug mode, print stub name of asm interpreter stub to
help us find which stub exists the problem
Add new DebugPrint format to support print int32 value
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Iae39213572de99cc4089a172092184399ba8c5d0
Modifications:
1 rewrite Add/Stub2Dyn
2 bytecode Inc/Dec use .rodata store a float 1.0 and crashed on amd64.
close double label for Inc/Dec on amd64
Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
Modifications:
* Rename StubMachineType to VariableType
* Remove the information about signed/unsigned
* VariableType is a class that bundled MachineType and GateType (not an enumerator anymore)
Signed-off-by: Mingliang Zeng <zengmingliang1@huawei.com>
Description:
a Use two Bridge function, "InvokeJSFunctionEntry" and "CallRuntimeTrampoline" to Adapter the calling convention of Aot JSFunction & Runtime Stub, then Construct the Entry Frame in "InvokeJSFunctionEntry", Leave Frame in "CallRuntimeTrampoline"
b modify LLVM Calling Conversion, prologue push callee-saved gpr registers --> callee-saved fp/simd/SVE regs --> prev_fp, prev_lr .finally update x29 pointer to prev_fp
issue:https://gitee.com/openharmony/ark_js_runtime/pulls/630
Change-Id: I1df498f411e03c9887c4cad97bf82371c0b5f01a
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
MachineType::ARCH is equal to MachineType::I32 on 32 bits platform and
MachineType::I64 on 64 bits platform
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I41dfc96c5dacc0b2108dc90730500f2bc51ecd24
1. Add machineType when return type is FLEX
2. Cmp ops should have the same op type
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I3c0e417b8f9cd7f792e3ff909bf1fab8afabb238
Use Stub to impl handlers of bytecodes and use tail call to impl
dispatch of handlers of bytecodes
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: I7afabdc40ddfa11345aa1029059514aa4f55b9f8