1/* 2 * Copyright (c) 2021 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.type ExecuteImplStub, @function 17.global ExecuteImplStub 18.balign 16 19ExecuteImplStub: 20 .cfi_startproc 21 .cfi_def_cfa rsp, __SIZEOF_POINTER__ 22 // arg0: %rdi: thread 23 // arg1: %rsi: PC 24 // arg2: %rdx: I-frame 25 // arg3: %rcx: impl 26 pushq %rbx 27 .cfi_adjust_cfa_offset 8 28 .cfi_rel_offset %rbx, 0 29 30 /* 31 * using CFI opcode to get the interpreter pc from 32 * saved register with offset. 33 * 34 * 0x16 dw_cfa_val_expression 35 * 0 tempreg 36 * 0x09 size of expression 37 * 0x0c dw_op_const4u 38 * 0x41, 0x45, 0x58, 0x31 magic = "aex1" 39 * 0x13 dw_op_drop 40 * 0x92 dw_op_bregx 41 * 0x03 the register which store interpreter pc 42 * 0 offset 43 */ 44 .cfi_escape 0x16, 0, 0x09, 0x0C, 0x41, 0x45, 0x58, 0x31, 0x13, 0x92, 0x03, 0 45 46 movq %rsi, %rbx 47 call *%rcx 48 49 popq %rbx 50 .cfi_adjust_cfa_offset -8 51 .cfi_restore %rbx 52 ret 53 .cfi_endproc 54 55