github.com/tencent/goom@v1.0.1/internal/arch/arm64asm/condition.go (about) 1 // Generated by ARM internal tool 2 // DO NOT EDIT 3 4 // Copyright 2017 The Go Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in the LICENSE file. 7 8 package arm64asm 9 10 // Following functions are used as the predicator: canDecode of according instruction 11 // Refer to instFormat inside decode.go for more details 12 13 func at_sys_cr_system_cond(instr uint32) bool { 14 return sys_op_4((instr>>16)&0x7, 0x7, 0x8, (instr>>5)&0x7) == Sys_AT 15 } 16 17 func bfi_bfm_32m_bitfield_cond(instr uint32) bool { 18 return (instr>>5)&0x1f != 0x1f && uint8((instr>>10)&0x3f) < uint8((instr>>16)&0x3f) 19 } 20 21 func bfi_bfm_64m_bitfield_cond(instr uint32) bool { 22 return (instr>>5)&0x1f != 0x1f && uint8((instr>>10)&0x3f) < uint8((instr>>16)&0x3f) 23 } 24 25 func bfxil_bfm_32m_bitfield_cond(instr uint32) bool { 26 return uint8((instr>>10)&0x3f) >= uint8((instr>>16)&0x3f) 27 } 28 29 func bfxil_bfm_64m_bitfield_cond(instr uint32) bool { 30 return uint8((instr>>10)&0x3f) >= uint8((instr>>16)&0x3f) 31 } 32 33 func cinc_csinc_32_condsel_cond(instr uint32) bool { 34 return instr&0x1f0000 != 0x1f0000 && instr&0xe000 != 0xe000 && 35 instr&0x3e0 != 0x3e0 && (instr>>5)&0x1f == (instr>>16)&0x1f 36 } 37 38 func cinc_csinc_64_condsel_cond(instr uint32) bool { 39 return instr&0x1f0000 != 0x1f0000 && instr&0xe000 != 0xe000 && 40 instr&0x3e0 != 0x3e0 && (instr>>5)&0x1f == (instr>>16)&0x1f 41 } 42 43 func cinv_csinv_32_condsel_cond(instr uint32) bool { 44 return instr&0x1f0000 != 0x1f0000 && instr&0xe000 != 0xe000 && 45 instr&0x3e0 != 0x3e0 && (instr>>5)&0x1f == (instr>>16)&0x1f 46 } 47 48 func cinv_csinv_64_condsel_cond(instr uint32) bool { 49 return instr&0x1f0000 != 0x1f0000 && instr&0xe000 != 0xe000 && 50 instr&0x3e0 != 0x3e0 && (instr>>5)&0x1f == (instr>>16)&0x1f 51 } 52 53 func cneg_csneg_32_condsel_cond(instr uint32) bool { 54 return instr&0xe000 != 0xe000 && (instr>>5)&0x1f == (instr>>16)&0x1f 55 } 56 57 func cneg_csneg_64_condsel_cond(instr uint32) bool { 58 return instr&0xe000 != 0xe000 && (instr>>5)&0x1f == (instr>>16)&0x1f 59 } 60 61 func csinc_general_cond(instr uint32) bool { 62 return instr&0xe000 != 0xe000 63 } 64 func csinv_general_cond(instr uint32) bool { 65 return instr&0xe000 != 0xe000 66 } 67 func dc_sys_cr_system_cond(instr uint32) bool { 68 return sys_op_4((instr>>16)&0x7, 0x7, (instr>>8)&0xf, (instr>>5)&0x7) == Sys_DC 69 } 70 71 func ic_sys_cr_system_cond(instr uint32) bool { 72 return sys_op_4((instr>>16)&0x7, 0x7, (instr>>8)&0xf, (instr>>5)&0x7) == Sys_IC 73 } 74 75 func lsl_ubfm_32m_bitfield_cond(instr uint32) bool { 76 return instr&0xfc00 != 0x7c00 && (instr>>10)&0x3f+1 == (instr>>16)&0x3f 77 } 78 79 func lsl_ubfm_64m_bitfield_cond(instr uint32) bool { 80 return instr&0xfc00 != 0xfc00 && (instr>>10)&0x3f+1 == (instr>>16)&0x3f 81 } 82 83 func mov_orr_32_log_imm_cond(instr uint32) bool { 84 return !move_wide_preferred_4((instr>>31)&0x1, (instr>>22)&0x1, (instr>>10)&0x3f, (instr>>16)&0x3f) 85 } 86 87 func mov_orr_64_log_imm_cond(instr uint32) bool { 88 return !move_wide_preferred_4((instr>>31)&0x1, (instr>>22)&0x1, (instr>>10)&0x3f, (instr>>16)&0x3f) 89 } 90 91 func mov_movn_32_movewide_cond(instr uint32) bool { 92 return !(is_zero((instr>>5)&0xffff) && (instr>>21)&0x3 != 0x0) && !is_ones_n16((instr>>5)&0xffff) 93 } 94 95 func mov_movn_64_movewide_cond(instr uint32) bool { 96 return !(is_zero((instr>>5)&0xffff) && (instr>>21)&0x3 != 0x0) 97 } 98 99 func mov_add_32_addsub_imm_cond(instr uint32) bool { 100 return instr&0x1f == 0x1f || (instr>>5)&0x1f == 0x1f 101 } 102 103 func mov_add_64_addsub_imm_cond(instr uint32) bool { 104 return instr&0x1f == 0x1f || (instr>>5)&0x1f == 0x1f 105 } 106 107 func mov_movz_32_movewide_cond(instr uint32) bool { 108 return !(is_zero((instr>>5)&0xffff) && (instr>>21)&0x3 != 0x0) 109 } 110 111 func mov_movz_64_movewide_cond(instr uint32) bool { 112 return !(is_zero((instr>>5)&0xffff) && (instr>>21)&0x3 != 0x0) 113 } 114 115 func ror_extr_32_extract_cond(instr uint32) bool { 116 return (instr>>5)&0x1f == (instr>>16)&0x1f 117 } 118 119 func ror_extr_64_extract_cond(instr uint32) bool { 120 return (instr>>5)&0x1f == (instr>>16)&0x1f 121 } 122 123 func sbfiz_sbfm_32m_bitfield_cond(instr uint32) bool { 124 return uint8((instr>>10)&0x3f) < uint8((instr>>16)&0x3f) 125 } 126 127 func sbfiz_sbfm_64m_bitfield_cond(instr uint32) bool { 128 return uint8((instr>>10)&0x3f) < uint8((instr>>16)&0x3f) 129 } 130 131 func sbfx_sbfm_32m_bitfield_cond(instr uint32) bool { 132 return bfxpreferred_4((instr>>31)&0x1, extract_bit((instr>>29)&0x3, 1), (instr>>10)&0x3f, (instr>>16)&0x3f) 133 } 134 135 func sbfx_sbfm_64m_bitfield_cond(instr uint32) bool { 136 return bfxpreferred_4((instr>>31)&0x1, extract_bit((instr>>29)&0x3, 1), (instr>>10)&0x3f, (instr>>16)&0x3f) 137 } 138 139 func tlbi_sys_cr_system_cond(instr uint32) bool { 140 return sys_op_4((instr>>16)&0x7, 0x8, (instr>>8)&0xf, (instr>>5)&0x7) == Sys_TLBI 141 } 142 143 func ubfiz_ubfm_32m_bitfield_cond(instr uint32) bool { 144 return uint8((instr>>10)&0x3f) < uint8((instr>>16)&0x3f) 145 } 146 147 func ubfiz_ubfm_64m_bitfield_cond(instr uint32) bool { 148 return uint8((instr>>10)&0x3f) < uint8((instr>>16)&0x3f) 149 } 150 151 func ubfx_ubfm_32m_bitfield_cond(instr uint32) bool { 152 return bfxpreferred_4((instr>>31)&0x1, extract_bit((instr>>29)&0x3, 1), (instr>>10)&0x3f, (instr>>16)&0x3f) 153 } 154 155 func ubfx_ubfm_64m_bitfield_cond(instr uint32) bool { 156 return bfxpreferred_4((instr>>31)&0x1, extract_bit((instr>>29)&0x3, 1), (instr>>10)&0x3f, (instr>>16)&0x3f) 157 } 158 159 func fcvtzs_asisdshf_c_cond(instr uint32) bool { 160 return instr&0x780000 != 0x0 161 } 162 func fcvtzs_asimdshf_c_cond(instr uint32) bool { 163 return instr&0x780000 != 0x0 164 } 165 func fcvtzu_asisdshf_c_cond(instr uint32) bool { 166 return instr&0x780000 != 0x0 167 } 168 func fcvtzu_asimdshf_c_cond(instr uint32) bool { 169 return instr&0x780000 != 0x0 170 } 171 func mov_umov_asimdins_w_w_cond(instr uint32) bool { 172 return ((instr>>16)&0x1f)&0x7 == 0x4 173 } 174 175 func mov_umov_asimdins_x_x_cond(instr uint32) bool { 176 return ((instr>>16)&0x1f)&0xf == 0x8 177 } 178 179 func mov_orr_asimdsame_only_cond(instr uint32) bool { 180 return (instr>>16)&0x1f == (instr>>5)&0x1f 181 } 182 183 func rshrn_asimdshf_n_cond(instr uint32) bool { 184 return instr&0x780000 != 0x0 185 } 186 func scvtf_asisdshf_c_cond(instr uint32) bool { 187 return instr&0x780000 != 0x0 188 } 189 func scvtf_asimdshf_c_cond(instr uint32) bool { 190 return instr&0x780000 != 0x0 191 } 192 func shl_asisdshf_r_cond(instr uint32) bool { 193 return instr&0x780000 != 0x0 194 } 195 func shl_asimdshf_r_cond(instr uint32) bool { 196 return instr&0x780000 != 0x0 197 } 198 func shrn_asimdshf_n_cond(instr uint32) bool { 199 return instr&0x780000 != 0x0 200 } 201 func sli_asisdshf_r_cond(instr uint32) bool { 202 return instr&0x780000 != 0x0 203 } 204 func sli_asimdshf_r_cond(instr uint32) bool { 205 return instr&0x780000 != 0x0 206 } 207 func sqrshrn_asisdshf_n_cond(instr uint32) bool { 208 return instr&0x780000 != 0x0 209 } 210 func sqrshrn_asimdshf_n_cond(instr uint32) bool { 211 return instr&0x780000 != 0x0 212 } 213 func sqrshrun_asisdshf_n_cond(instr uint32) bool { 214 return instr&0x780000 != 0x0 215 } 216 func sqrshrun_asimdshf_n_cond(instr uint32) bool { 217 return instr&0x780000 != 0x0 218 } 219 func sqshl_asisdshf_r_cond(instr uint32) bool { 220 return instr&0x780000 != 0x0 221 } 222 func sqshl_asimdshf_r_cond(instr uint32) bool { 223 return instr&0x780000 != 0x0 224 } 225 func sqshlu_asisdshf_r_cond(instr uint32) bool { 226 return instr&0x780000 != 0x0 227 } 228 func sqshlu_asimdshf_r_cond(instr uint32) bool { 229 return instr&0x780000 != 0x0 230 } 231 func sqshrn_asisdshf_n_cond(instr uint32) bool { 232 return instr&0x780000 != 0x0 233 } 234 func sqshrn_asimdshf_n_cond(instr uint32) bool { 235 return instr&0x780000 != 0x0 236 } 237 func sqshrun_asisdshf_n_cond(instr uint32) bool { 238 return instr&0x780000 != 0x0 239 } 240 func sqshrun_asimdshf_n_cond(instr uint32) bool { 241 return instr&0x780000 != 0x0 242 } 243 func sri_asisdshf_r_cond(instr uint32) bool { 244 return instr&0x780000 != 0x0 245 } 246 func sri_asimdshf_r_cond(instr uint32) bool { 247 return instr&0x780000 != 0x0 248 } 249 func srshr_asisdshf_r_cond(instr uint32) bool { 250 return instr&0x780000 != 0x0 251 } 252 func srshr_asimdshf_r_cond(instr uint32) bool { 253 return instr&0x780000 != 0x0 254 } 255 func srsra_asisdshf_r_cond(instr uint32) bool { 256 return instr&0x780000 != 0x0 257 } 258 func srsra_asimdshf_r_cond(instr uint32) bool { 259 return instr&0x780000 != 0x0 260 } 261 func sshll_asimdshf_l_cond(instr uint32) bool { 262 return instr&0x780000 != 0x0 263 } 264 func sshr_asisdshf_r_cond(instr uint32) bool { 265 return instr&0x780000 != 0x0 266 } 267 func sshr_asimdshf_r_cond(instr uint32) bool { 268 return instr&0x780000 != 0x0 269 } 270 func ssra_asisdshf_r_cond(instr uint32) bool { 271 return instr&0x780000 != 0x0 272 } 273 func ssra_asimdshf_r_cond(instr uint32) bool { 274 return instr&0x780000 != 0x0 275 } 276 func sxtl_sshll_asimdshf_l_cond(instr uint32) bool { 277 return instr&0x780000 != 0x0 && bit_count((instr>>19)&0xf) == 1 278 } 279 280 func ucvtf_asisdshf_c_cond(instr uint32) bool { 281 return instr&0x780000 != 0x0 282 } 283 func ucvtf_asimdshf_c_cond(instr uint32) bool { 284 return instr&0x780000 != 0x0 285 } 286 func uqrshrn_asisdshf_n_cond(instr uint32) bool { 287 return instr&0x780000 != 0x0 288 } 289 func uqrshrn_asimdshf_n_cond(instr uint32) bool { 290 return instr&0x780000 != 0x0 291 } 292 func uqshl_asisdshf_r_cond(instr uint32) bool { 293 return instr&0x780000 != 0x0 294 } 295 func uqshl_asimdshf_r_cond(instr uint32) bool { 296 return instr&0x780000 != 0x0 297 } 298 func uqshrn_asisdshf_n_cond(instr uint32) bool { 299 return instr&0x780000 != 0x0 300 } 301 func uqshrn_asimdshf_n_cond(instr uint32) bool { 302 return instr&0x780000 != 0x0 303 } 304 func urshr_asisdshf_r_cond(instr uint32) bool { 305 return instr&0x780000 != 0x0 306 } 307 func urshr_asimdshf_r_cond(instr uint32) bool { 308 return instr&0x780000 != 0x0 309 } 310 func ursra_asisdshf_r_cond(instr uint32) bool { 311 return instr&0x780000 != 0x0 312 } 313 func ursra_asimdshf_r_cond(instr uint32) bool { 314 return instr&0x780000 != 0x0 315 } 316 func ushll_asimdshf_l_cond(instr uint32) bool { 317 return instr&0x780000 != 0x0 318 } 319 func ushr_asisdshf_r_cond(instr uint32) bool { 320 return instr&0x780000 != 0x0 321 } 322 func ushr_asimdshf_r_cond(instr uint32) bool { 323 return instr&0x780000 != 0x0 324 } 325 func usra_asisdshf_r_cond(instr uint32) bool { 326 return instr&0x780000 != 0x0 327 } 328 func usra_asimdshf_r_cond(instr uint32) bool { 329 return instr&0x780000 != 0x0 330 } 331 func uxtl_ushll_asimdshf_l_cond(instr uint32) bool { 332 return instr&0x780000 != 0x0 && bit_count((instr>>19)&0xf) == 1 333 }