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 14.record A { 15 u1 kek 16} 17 18.function A A.init() { 19 newobj v0, A 20 lda.obj v0 21 22 return.obj 23} 24 25.function u1 g() { 26 mov v0, v1 27 mov.64 v2, v3 28 mov.obj v4, v5 29 30 movi v0, -1 31 movi.64 v0, 2 32 fmovi.64 v0, 3.01 33 34 lda v1 35 lda.64 v0 36 lda.obj v1 37 38 ldai 1 39 ldai.64 2 40 fldai.64 3.01 41 lda.str "kek" 42 lda.type A 43 lda.null 44 45 sta v0 46 sta.64 v1 47 sta.obj v2 48 49 label: 50 jmp label 51 52 jeq v1, check_v1_eq 53 ldai 1 54 jmp check_v1_done 55 check_v1_eq: 56 ldai 0 57 check_v1_done: 58 cmp.64 v1 59 ucmp v2 60 ucmp.64 v3 61 62 fcmpl.64 v1 63 fcmpg.64 v1 64 65 jeqz label 66 jnez label 67 jltz label 68 jgtz label 69 jlez label 70 jgez label 71 72 jeq v2, label 73 jne v2, label 74 jlt v2, label 75 jgt v2, label 76 jle v2, label 77 jge v2, label 78 79 fadd2.64 v1 80 fsub2.64 v1 81 fmul2.64 v1 82 fdiv2.64 v1 83 fmod2.64 v1 84 85 add2 v2 86 add2.64 v2 87 sub2 v2 88 sub2.64 v2 89 mul2 v2 90 mul2.64 v2 91 and2 v2 92 and2.64 v2 93 or2 v2 94 or2.64 v2 95 xor2 v2 96 xor2.64 v2 97 shl2 v2 98 shl2.64 v2 99 shr2 v2 100 shr2.64 v2 101 ashr2 v2 102 ashr2.64 v2 103 div2 v2 104 div2.64 v2 105 mod2 v2 106 mod2.64 v2 107 divu2 v2 108 divu2.64 v2 109 modu2 v2 110 modu2.64 v2 111 112 add v1, v2 113 sub v1, v2 114 mul v1, v2 115 and v1, v2 116 or v1, v2 117 xor v1, v2 118 shl v1, v2 119 shr v1, v2 120 ashr v1, v2 121 div v1, v2 122 mod v1, v2 123 124 addi 1 125 subi 1 126 muli 1 127 andi 1 128 ori 1 129 xori 1 130 shli 1 131 shri 1 132 ashri 1 133 divi 1 134 modi 1 135 136 neg 137 neg.64 138 not 139 not.64 140 141 i32tof64 142 u32tof64 143 i64tof64 144 u64tof64 145 f64toi32 146 f64toi64 147 f64tou32 148 f64tou64 149 i32toi64 150 i64toi32 151 u32toi64 152 153 ldarr.8 v1 154 ldarru.8 v2 155 ldarr.16 v1 156 ldarru.16 v1 157 ldarr v1 158 ldarr.64 v1 159 fldarr.32 v1 160 fldarr.64 v1 161 ldarr.obj v1 162 163 starr.8 v1, v2 164 starr.16 v1, v2 165 starr v1, v2 166 starr.64 v1, v2 167 fstarr.32 v1, v2 168 fstarr.64 v1, v2 169 starr.obj v1, v2 170 171 newobj v6, A 172 lda.obj v6 173 174 initobj A.init 175 176 ldobj v0, A.kek 177 ldobj.64 v0, A.kek 178 ldobj.obj v0, A.kek 179 180 stobj v1, A.kek 181 stobj.64 v1, A.kek 182 stobj.obj v1, A.kek 183 184 ldstatic A.kek 185 ldstatic.64 A.kek 186 ldstatic.obj A.kek 187 188 ststatic A.kek 189 ststatic.64 A.kek 190 ststatic.obj A.kek 191 192 checkcast A 193 isinstance A 194} 195