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