1# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14intrinsics_namespace: irtoc 15 16# WARNING: 'class_name' field should be `Irtoc` for all Irtoc intrinsics. If it needs to be changed, fix `is_irtoc?` 17# method in `compiler_intrinsics.rb` file 18 19intrinsics: 20- name: SlowPathEntry 21 class_name: Irtoc 22 method_name: 23 space: core 24 static: true 25 builtin: true 26 codegen_arch: [amd64, arm64, arm32] 27 codegen_func: "CreateIrtocIntrinsic" 28 signature: 29 ret: void 30 args: [] 31 description: Invoke slow path of the entrypoint from the irtoc'ed entrypoint 32 clear_flags: [require_state] 33 34- name: SaveRegistersEp 35 class_name: Irtoc 36 method_name: 37 space: core 38 static: true 39 codegen_arch: [amd64, arm64, arm32] 40 codegen_func: "CreateIrtocIntrinsic" 41 signature: 42 ret: void 43 args: [] 44 description: Save registers before native call 45 clear_flags: [require_state] 46 47- name: RestoreRegistersEp 48 class_name: Irtoc 49 method_name: 50 space: core 51 static: true 52 codegen_arch: [amd64, arm64, arm32] 53 codegen_func: "CreateIrtocIntrinsic" 54 signature: 55 ret: void 56 args: [] 57 description: Restore registers after native call 58 clear_flags: [require_state] 59 60- name: Unreachable 61 class_name: Irtoc 62 method_name: 63 space: core 64 static: true 65 codegen_arch: [amd64, arm64, arm32] 66 codegen_func: "CreateIrtocIntrinsic" 67 signature: 68 ret: void 69 args: [] 70 description: Encode trap instruction 71 set_flags: [terminator] 72 clear_flags: [require_state] 73 74- name: TailCall 75 class_name: Irtoc 76 method_name: 77 space: core 78 static: true 79 codegen_arch: [ amd64, arm64, arm32 ] 80 codegen_func: "CreateIrtocIntrinsic" 81 signature: 82 ret: void 83 args: [] 84 description: Make a tail call 85 set_flags: [terminator, no_dst] 86 clear_flags: [require_state] 87 88- name: InterpreterReturn 89 class_name: Irtoc 90 method_name: 91 space: core 92 static: true 93 codegen_arch: [amd64, arm64, arm32] 94 codegen_func: "CreateIrtocIntrinsic" 95 signature: 96 ret: void 97 args: [] 98 clear_flags: [require_state] 99 description: Restore registers on return bytecode 100 101- name: LoadAcquireMarkWordExclusive 102 class_name: Irtoc 103 method_name: 104 space: core 105 static: true 106 builtin: true 107 codegen_arch: [arm64, arm32] 108 codegen_func: "CreateIrtocIntrinsic" 109 signature: 110 ret: void 111 args: [] 112 clear_flags: [runtime_call, require_state] 113 description: Encode load mark word with acquire semantics for exclusive use 114 115- name: StoreReleaseMarkWordExclusive 116 class_name: Irtoc 117 method_name: 118 space: core 119 static: true 120 builtin: true 121 codegen_arch: [arm64, arm32] 122 codegen_func: "CreateIrtocIntrinsic" 123 signature: 124 ret: void 125 args: [] 126 clear_flags: [runtime_call, require_state] 127 description: Encode store mark word that was loaded for exclusive use with release semantics 128 129- name: CompareAndSetMarkWord 130 class_name: Irtoc 131 method_name: 132 space: core 133 static: true 134 builtin: true 135 codegen_arch: [amd64] 136 codegen_func: "CreateIrtocIntrinsic" 137 signature: 138 ret: void 139 args: [] 140 clear_flags: [runtime_call, require_state] 141 description: Encode store mark word using compare and swap 142 143- name: DataMemoryBarrierFull 144 class_name: Irtoc 145 method_name: 146 space: core 147 static: true 148 builtin: true 149 codegen_arch: [arm64, amd64] 150 codegen_func: "CreateIrtocIntrinsic" 151 signature: 152 ret: void 153 args: [] 154 clear_flags: [runtime_call, require_state] 155 description: InnerShareable Full (ACQUIRE + RELEASE) barrier. Ensures the order of memory accesses before and after the barrier. 156 157- name: CompressEightUtf16ToUtf8CharsUsingSimd 158 class_name: Irtoc 159 method_name: 160 space: core 161 static: true 162 builtin: true 163 codegen_arch: [arm64] 164 codegen_func: "CreateIrtocIntrinsic" 165 signature: 166 ret: void 167 args: [] 168 clear_flags: [runtime_call, require_state] 169 description: Compresses eight Utf16 chars (16 bytes) to Utf8 chars (8 bytes) using SIMD instructions 170 171- name: CompressSixteenUtf16ToUtf8CharsUsingSimd 172 class_name: Irtoc 173 method_name: 174 space: core 175 static: true 176 builtin: true 177 codegen_arch: [arm64] 178 codegen_func: "CreateIrtocIntrinsic" 179 signature: 180 ret: void 181 args: [] 182 clear_flags: [runtime_call, require_state] 183 description: Compresses sixteen Utf16 chars (32 bytes) to Utf8 chars (16 bytes) using SIMD instructions 184