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.global ExecuteImplStub 17.type ExecuteImplStub, %function 18.balign 16 19/* parameter: 20 * r0 thread 21 * r1 PC 22 * r2 I-frame 23 * r3 impl 24 */ 25ExecuteImplStub: 26 .cfi_startproc 27 .fnstart 28 29 push {r4, lr} 30 .cfi_adjust_cfa_offset 8 31 .cfi_rel_offset r4, 0 32 .cfi_rel_offset lr, 4 33 34 mov r4, r1 35 /* 36 * Using CFI opcode to get the interpreter PC from 37 * saved register with offset. 38 * 39 * 0x16 DW_CFA_val_expression 40 * 0 tempReg 41 * 0x09 size of expression 42 * 0x0C DW_OP_const4u 43 * 0x41, 0x45, 0x58, 0x31 magic = "AEX1" 44 * 0x13 DW_OP_drop 45 * 0x92 DW_OP_bregx 46 * 4 the register which store interpreter PC 47 * 0 offset 48 */ 49 .cfi_escape 0x16, 0x0, 0x09, 0x0C, 0x41, 0x45, 0x58, 0x31, 0x13, 0x92, 4, 0x0 50 51 blx r3 52 pop {r4, pc} 53 54 .fnend 55 .cfi_endproc 56 57