1/** 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16#define xlr x30 17 18.global ExecuteImplStub 19.type ExecuteImplStub, %function 20/* parameter: 21 * x0 thread 22 * x1 PC 23 * x2 I-frame 24 * x3 jump_to_eh 25 * x4 impl 26 */ 27ExecuteImplStub: 28 .cfi_startproc 29 stp x20, xlr, [sp, #-16]! 30 .cfi_adjust_cfa_offset 16 31 .cfi_rel_offset x20, 0 32 .cfi_rel_offset xlr, 8 33 /* 34 * Using CFI opcode to get the interpreter PC from 35 * saved register with offset. 36 * 37 * 0x16 DW_CFA_val_expression 38 * 0 tempReg 39 * 0x09 size of expression 40 * 0x0C DW_OP_const4u 41 * 0x41, 0x45, 0x58, 0x31 magic = "AEX1" 42 * 0x13 DW_OP_drop 43 * 0x92 DW_OP_bregx 44 * 20 the register which store interpreter PC 45 * 0 offset 46 */ 47 .cfi_escape 0x16, 0, 0x09, 0x0C, 0x41, 0x45, 0x58, 0x31, 0x13, 0x92, 20, 0 48 49 mov x20, x1 50 blr x4 51 52 ldp x20, xlr, [sp], #16 53 .cfi_restore x20 54 .cfi_restore xlr 55 .cfi_adjust_cfa_offset -16 56 ret 57 .cfi_endproc 58 59#undefine xlr 60