github.com/bir3/gocompiler@v0.9.2202/src/xvendor/golang.org/x/arch/arm64/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 && instr&0x3e0 != 0x3e0 && (instr>>5)&0x1f == (instr>>16)&0x1f
    35  }
    36  
    37  func cinc_csinc_64_condsel_cond(instr uint32) bool {
    38  	return instr&0x1f0000 != 0x1f0000 && instr&0xe000 != 0xe000 && instr&0x3e0 != 0x3e0 && (instr>>5)&0x1f == (instr>>16)&0x1f
    39  }
    40  
    41  func cinv_csinv_32_condsel_cond(instr uint32) bool {
    42  	return instr&0x1f0000 != 0x1f0000 && instr&0xe000 != 0xe000 && instr&0x3e0 != 0x3e0 && (instr>>5)&0x1f == (instr>>16)&0x1f
    43  }
    44  
    45  func cinv_csinv_64_condsel_cond(instr uint32) bool {
    46  	return instr&0x1f0000 != 0x1f0000 && instr&0xe000 != 0xe000 && instr&0x3e0 != 0x3e0 && (instr>>5)&0x1f == (instr>>16)&0x1f
    47  }
    48  
    49  func cneg_csneg_32_condsel_cond(instr uint32) bool {
    50  	return instr&0xe000 != 0xe000 && (instr>>5)&0x1f == (instr>>16)&0x1f
    51  }
    52  
    53  func cneg_csneg_64_condsel_cond(instr uint32) bool {
    54  	return instr&0xe000 != 0xe000 && (instr>>5)&0x1f == (instr>>16)&0x1f
    55  }
    56  
    57  func csinc_general_cond(instr uint32) bool {
    58  	return instr&0xe000 != 0xe000
    59  }
    60  func csinv_general_cond(instr uint32) bool {
    61  	return instr&0xe000 != 0xe000
    62  }
    63  func dc_sys_cr_system_cond(instr uint32) bool {
    64  	return sys_op_4((instr>>16)&0x7, 0x7, (instr>>8)&0xf, (instr>>5)&0x7) == sys_DC
    65  }
    66  
    67  func ic_sys_cr_system_cond(instr uint32) bool {
    68  	return sys_op_4((instr>>16)&0x7, 0x7, (instr>>8)&0xf, (instr>>5)&0x7) == sys_IC
    69  }
    70  
    71  func lsl_ubfm_32m_bitfield_cond(instr uint32) bool {
    72  	return instr&0xfc00 != 0x7c00 && (instr>>10)&0x3f+1 == (instr>>16)&0x3f
    73  }
    74  
    75  func lsl_ubfm_64m_bitfield_cond(instr uint32) bool {
    76  	return instr&0xfc00 != 0xfc00 && (instr>>10)&0x3f+1 == (instr>>16)&0x3f
    77  }
    78  
    79  func mov_orr_32_log_imm_cond(instr uint32) bool {
    80  	return !move_wide_preferred_4((instr>>31)&0x1, (instr>>22)&0x1, (instr>>10)&0x3f, (instr>>16)&0x3f)
    81  }
    82  
    83  func mov_orr_64_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_movn_32_movewide_cond(instr uint32) bool {
    88  	return !(is_zero((instr>>5)&0xffff) && (instr>>21)&0x3 != 0x0) && !is_ones_n16((instr>>5)&0xffff)
    89  }
    90  
    91  func mov_movn_64_movewide_cond(instr uint32) bool {
    92  	return !(is_zero((instr>>5)&0xffff) && (instr>>21)&0x3 != 0x0)
    93  }
    94  
    95  func mov_add_32_addsub_imm_cond(instr uint32) bool {
    96  	return instr&0x1f == 0x1f || (instr>>5)&0x1f == 0x1f
    97  }
    98  
    99  func mov_add_64_addsub_imm_cond(instr uint32) bool {
   100  	return instr&0x1f == 0x1f || (instr>>5)&0x1f == 0x1f
   101  }
   102  
   103  func mov_movz_32_movewide_cond(instr uint32) bool {
   104  	return !(is_zero((instr>>5)&0xffff) && (instr>>21)&0x3 != 0x0)
   105  }
   106  
   107  func mov_movz_64_movewide_cond(instr uint32) bool {
   108  	return !(is_zero((instr>>5)&0xffff) && (instr>>21)&0x3 != 0x0)
   109  }
   110  
   111  func ror_extr_32_extract_cond(instr uint32) bool {
   112  	return (instr>>5)&0x1f == (instr>>16)&0x1f
   113  }
   114  
   115  func ror_extr_64_extract_cond(instr uint32) bool {
   116  	return (instr>>5)&0x1f == (instr>>16)&0x1f
   117  }
   118  
   119  func sbfiz_sbfm_32m_bitfield_cond(instr uint32) bool {
   120  	return uint8((instr>>10)&0x3f) < uint8((instr>>16)&0x3f)
   121  }
   122  
   123  func sbfiz_sbfm_64m_bitfield_cond(instr uint32) bool {
   124  	return uint8((instr>>10)&0x3f) < uint8((instr>>16)&0x3f)
   125  }
   126  
   127  func sbfx_sbfm_32m_bitfield_cond(instr uint32) bool {
   128  	return bfxpreferred_4((instr>>31)&0x1, extract_bit((instr>>29)&0x3, 1), (instr>>10)&0x3f, (instr>>16)&0x3f)
   129  }
   130  
   131  func sbfx_sbfm_64m_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 tlbi_sys_cr_system_cond(instr uint32) bool {
   136  	return sys_op_4((instr>>16)&0x7, 0x8, (instr>>8)&0xf, (instr>>5)&0x7) == sys_TLBI
   137  }
   138  
   139  func ubfiz_ubfm_32m_bitfield_cond(instr uint32) bool {
   140  	return uint8((instr>>10)&0x3f) < uint8((instr>>16)&0x3f)
   141  }
   142  
   143  func ubfiz_ubfm_64m_bitfield_cond(instr uint32) bool {
   144  	return uint8((instr>>10)&0x3f) < uint8((instr>>16)&0x3f)
   145  }
   146  
   147  func ubfx_ubfm_32m_bitfield_cond(instr uint32) bool {
   148  	return bfxpreferred_4((instr>>31)&0x1, extract_bit((instr>>29)&0x3, 1), (instr>>10)&0x3f, (instr>>16)&0x3f)
   149  }
   150  
   151  func ubfx_ubfm_64m_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 fcvtzs_asisdshf_c_cond(instr uint32) bool {
   156  	return instr&0x780000 != 0x0
   157  }
   158  func fcvtzs_asimdshf_c_cond(instr uint32) bool {
   159  	return instr&0x780000 != 0x0
   160  }
   161  func fcvtzu_asisdshf_c_cond(instr uint32) bool {
   162  	return instr&0x780000 != 0x0
   163  }
   164  func fcvtzu_asimdshf_c_cond(instr uint32) bool {
   165  	return instr&0x780000 != 0x0
   166  }
   167  func mov_umov_asimdins_w_w_cond(instr uint32) bool {
   168  	return ((instr>>16)&0x1f)&0x7 == 0x4
   169  }
   170  
   171  func mov_umov_asimdins_x_x_cond(instr uint32) bool {
   172  	return ((instr>>16)&0x1f)&0xf == 0x8
   173  }
   174  
   175  func mov_orr_asimdsame_only_cond(instr uint32) bool {
   176  	return (instr>>16)&0x1f == (instr>>5)&0x1f
   177  }
   178  
   179  func rshrn_asimdshf_n_cond(instr uint32) bool {
   180  	return instr&0x780000 != 0x0
   181  }
   182  func scvtf_asisdshf_c_cond(instr uint32) bool {
   183  	return instr&0x780000 != 0x0
   184  }
   185  func scvtf_asimdshf_c_cond(instr uint32) bool {
   186  	return instr&0x780000 != 0x0
   187  }
   188  func shl_asisdshf_r_cond(instr uint32) bool {
   189  	return instr&0x780000 != 0x0
   190  }
   191  func shl_asimdshf_r_cond(instr uint32) bool {
   192  	return instr&0x780000 != 0x0
   193  }
   194  func shrn_asimdshf_n_cond(instr uint32) bool {
   195  	return instr&0x780000 != 0x0
   196  }
   197  func sli_asisdshf_r_cond(instr uint32) bool {
   198  	return instr&0x780000 != 0x0
   199  }
   200  func sli_asimdshf_r_cond(instr uint32) bool {
   201  	return instr&0x780000 != 0x0
   202  }
   203  func sqrshrn_asisdshf_n_cond(instr uint32) bool {
   204  	return instr&0x780000 != 0x0
   205  }
   206  func sqrshrn_asimdshf_n_cond(instr uint32) bool {
   207  	return instr&0x780000 != 0x0
   208  }
   209  func sqrshrun_asisdshf_n_cond(instr uint32) bool {
   210  	return instr&0x780000 != 0x0
   211  }
   212  func sqrshrun_asimdshf_n_cond(instr uint32) bool {
   213  	return instr&0x780000 != 0x0
   214  }
   215  func sqshl_asisdshf_r_cond(instr uint32) bool {
   216  	return instr&0x780000 != 0x0
   217  }
   218  func sqshl_asimdshf_r_cond(instr uint32) bool {
   219  	return instr&0x780000 != 0x0
   220  }
   221  func sqshlu_asisdshf_r_cond(instr uint32) bool {
   222  	return instr&0x780000 != 0x0
   223  }
   224  func sqshlu_asimdshf_r_cond(instr uint32) bool {
   225  	return instr&0x780000 != 0x0
   226  }
   227  func sqshrn_asisdshf_n_cond(instr uint32) bool {
   228  	return instr&0x780000 != 0x0
   229  }
   230  func sqshrn_asimdshf_n_cond(instr uint32) bool {
   231  	return instr&0x780000 != 0x0
   232  }
   233  func sqshrun_asisdshf_n_cond(instr uint32) bool {
   234  	return instr&0x780000 != 0x0
   235  }
   236  func sqshrun_asimdshf_n_cond(instr uint32) bool {
   237  	return instr&0x780000 != 0x0
   238  }
   239  func sri_asisdshf_r_cond(instr uint32) bool {
   240  	return instr&0x780000 != 0x0
   241  }
   242  func sri_asimdshf_r_cond(instr uint32) bool {
   243  	return instr&0x780000 != 0x0
   244  }
   245  func srshr_asisdshf_r_cond(instr uint32) bool {
   246  	return instr&0x780000 != 0x0
   247  }
   248  func srshr_asimdshf_r_cond(instr uint32) bool {
   249  	return instr&0x780000 != 0x0
   250  }
   251  func srsra_asisdshf_r_cond(instr uint32) bool {
   252  	return instr&0x780000 != 0x0
   253  }
   254  func srsra_asimdshf_r_cond(instr uint32) bool {
   255  	return instr&0x780000 != 0x0
   256  }
   257  func sshll_asimdshf_l_cond(instr uint32) bool {
   258  	return instr&0x780000 != 0x0
   259  }
   260  func sshr_asisdshf_r_cond(instr uint32) bool {
   261  	return instr&0x780000 != 0x0
   262  }
   263  func sshr_asimdshf_r_cond(instr uint32) bool {
   264  	return instr&0x780000 != 0x0
   265  }
   266  func ssra_asisdshf_r_cond(instr uint32) bool {
   267  	return instr&0x780000 != 0x0
   268  }
   269  func ssra_asimdshf_r_cond(instr uint32) bool {
   270  	return instr&0x780000 != 0x0
   271  }
   272  func sxtl_sshll_asimdshf_l_cond(instr uint32) bool {
   273  	return instr&0x780000 != 0x0 && bit_count((instr>>19)&0xf) == 1
   274  }
   275  
   276  func ucvtf_asisdshf_c_cond(instr uint32) bool {
   277  	return instr&0x780000 != 0x0
   278  }
   279  func ucvtf_asimdshf_c_cond(instr uint32) bool {
   280  	return instr&0x780000 != 0x0
   281  }
   282  func uqrshrn_asisdshf_n_cond(instr uint32) bool {
   283  	return instr&0x780000 != 0x0
   284  }
   285  func uqrshrn_asimdshf_n_cond(instr uint32) bool {
   286  	return instr&0x780000 != 0x0
   287  }
   288  func uqshl_asisdshf_r_cond(instr uint32) bool {
   289  	return instr&0x780000 != 0x0
   290  }
   291  func uqshl_asimdshf_r_cond(instr uint32) bool {
   292  	return instr&0x780000 != 0x0
   293  }
   294  func uqshrn_asisdshf_n_cond(instr uint32) bool {
   295  	return instr&0x780000 != 0x0
   296  }
   297  func uqshrn_asimdshf_n_cond(instr uint32) bool {
   298  	return instr&0x780000 != 0x0
   299  }
   300  func urshr_asisdshf_r_cond(instr uint32) bool {
   301  	return instr&0x780000 != 0x0
   302  }
   303  func urshr_asimdshf_r_cond(instr uint32) bool {
   304  	return instr&0x780000 != 0x0
   305  }
   306  func ursra_asisdshf_r_cond(instr uint32) bool {
   307  	return instr&0x780000 != 0x0
   308  }
   309  func ursra_asimdshf_r_cond(instr uint32) bool {
   310  	return instr&0x780000 != 0x0
   311  }
   312  func ushll_asimdshf_l_cond(instr uint32) bool {
   313  	return instr&0x780000 != 0x0
   314  }
   315  func ushr_asisdshf_r_cond(instr uint32) bool {
   316  	return instr&0x780000 != 0x0
   317  }
   318  func ushr_asimdshf_r_cond(instr uint32) bool {
   319  	return instr&0x780000 != 0x0
   320  }
   321  func usra_asisdshf_r_cond(instr uint32) bool {
   322  	return instr&0x780000 != 0x0
   323  }
   324  func usra_asimdshf_r_cond(instr uint32) bool {
   325  	return instr&0x780000 != 0x0
   326  }
   327  func uxtl_ushll_asimdshf_l_cond(instr uint32) bool {
   328  	return instr&0x780000 != 0x0 && bit_count((instr>>19)&0xf) == 1
   329  }