github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/cmd/obj/s390x/vector.go (about)

     1  // Copyright 2016 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package s390x
     6  
     7  import (
     8  	"github.com/go-asm/go/cmd/obj"
     9  )
    10  
    11  // This file contains utility functions for use when
    12  // assembling vector instructions.
    13  
    14  // vop returns the opcode, element size and condition
    15  // setting for the given (possibly extended) mnemonic.
    16  func vop(as obj.As) (opcode, es, cs uint32) {
    17  	switch as {
    18  	default:
    19  		return 0, 0, 0
    20  	case AVA:
    21  		return op_VA, 0, 0
    22  	case AVAB:
    23  		return op_VA, 0, 0
    24  	case AVAH:
    25  		return op_VA, 1, 0
    26  	case AVAF:
    27  		return op_VA, 2, 0
    28  	case AVAG:
    29  		return op_VA, 3, 0
    30  	case AVAQ:
    31  		return op_VA, 4, 0
    32  	case AVACC:
    33  		return op_VACC, 0, 0
    34  	case AVACCB:
    35  		return op_VACC, 0, 0
    36  	case AVACCH:
    37  		return op_VACC, 1, 0
    38  	case AVACCF:
    39  		return op_VACC, 2, 0
    40  	case AVACCG:
    41  		return op_VACC, 3, 0
    42  	case AVACCQ:
    43  		return op_VACC, 4, 0
    44  	case AVAC:
    45  		return op_VAC, 0, 0
    46  	case AVACQ:
    47  		return op_VAC, 4, 0
    48  	case AVMSLG, AVMSLEG, AVMSLOG, AVMSLEOG:
    49  		return op_VMSL, 3, 0
    50  	case AVACCC:
    51  		return op_VACCC, 0, 0
    52  	case AVACCCQ:
    53  		return op_VACCC, 4, 0
    54  	case AVN:
    55  		return op_VN, 0, 0
    56  	case AVNC:
    57  		return op_VNC, 0, 0
    58  	case AVAVG:
    59  		return op_VAVG, 0, 0
    60  	case AVAVGB:
    61  		return op_VAVG, 0, 0
    62  	case AVAVGH:
    63  		return op_VAVG, 1, 0
    64  	case AVAVGF:
    65  		return op_VAVG, 2, 0
    66  	case AVAVGG:
    67  		return op_VAVG, 3, 0
    68  	case AVAVGL:
    69  		return op_VAVGL, 0, 0
    70  	case AVAVGLB:
    71  		return op_VAVGL, 0, 0
    72  	case AVAVGLH:
    73  		return op_VAVGL, 1, 0
    74  	case AVAVGLF:
    75  		return op_VAVGL, 2, 0
    76  	case AVAVGLG:
    77  		return op_VAVGL, 3, 0
    78  	case AVCKSM:
    79  		return op_VCKSM, 0, 0
    80  	case AVCEQ:
    81  		return op_VCEQ, 0, 0
    82  	case AVCEQB:
    83  		return op_VCEQ, 0, 0
    84  	case AVCEQH:
    85  		return op_VCEQ, 1, 0
    86  	case AVCEQF:
    87  		return op_VCEQ, 2, 0
    88  	case AVCEQG:
    89  		return op_VCEQ, 3, 0
    90  	case AVCEQBS:
    91  		return op_VCEQ, 0, 1
    92  	case AVCEQHS:
    93  		return op_VCEQ, 1, 1
    94  	case AVCEQFS:
    95  		return op_VCEQ, 2, 1
    96  	case AVCEQGS:
    97  		return op_VCEQ, 3, 1
    98  	case AVCH:
    99  		return op_VCH, 0, 0
   100  	case AVCHB:
   101  		return op_VCH, 0, 0
   102  	case AVCHH:
   103  		return op_VCH, 1, 0
   104  	case AVCHF:
   105  		return op_VCH, 2, 0
   106  	case AVCHG:
   107  		return op_VCH, 3, 0
   108  	case AVCHBS:
   109  		return op_VCH, 0, 1
   110  	case AVCHHS:
   111  		return op_VCH, 1, 1
   112  	case AVCHFS:
   113  		return op_VCH, 2, 1
   114  	case AVCHGS:
   115  		return op_VCH, 3, 1
   116  	case AVCHL:
   117  		return op_VCHL, 0, 0
   118  	case AVCHLB:
   119  		return op_VCHL, 0, 0
   120  	case AVCHLH:
   121  		return op_VCHL, 1, 0
   122  	case AVCHLF:
   123  		return op_VCHL, 2, 0
   124  	case AVCHLG:
   125  		return op_VCHL, 3, 0
   126  	case AVCHLBS:
   127  		return op_VCHL, 0, 1
   128  	case AVCHLHS:
   129  		return op_VCHL, 1, 1
   130  	case AVCHLFS:
   131  		return op_VCHL, 2, 1
   132  	case AVCHLGS:
   133  		return op_VCHL, 3, 1
   134  	case AVCLZ:
   135  		return op_VCLZ, 0, 0
   136  	case AVCLZB:
   137  		return op_VCLZ, 0, 0
   138  	case AVCLZH:
   139  		return op_VCLZ, 1, 0
   140  	case AVCLZF:
   141  		return op_VCLZ, 2, 0
   142  	case AVCLZG:
   143  		return op_VCLZ, 3, 0
   144  	case AVCTZ:
   145  		return op_VCTZ, 0, 0
   146  	case AVCTZB:
   147  		return op_VCTZ, 0, 0
   148  	case AVCTZH:
   149  		return op_VCTZ, 1, 0
   150  	case AVCTZF:
   151  		return op_VCTZ, 2, 0
   152  	case AVCTZG:
   153  		return op_VCTZ, 3, 0
   154  	case AVEC:
   155  		return op_VEC, 0, 0
   156  	case AVECB:
   157  		return op_VEC, 0, 0
   158  	case AVECH:
   159  		return op_VEC, 1, 0
   160  	case AVECF:
   161  		return op_VEC, 2, 0
   162  	case AVECG:
   163  		return op_VEC, 3, 0
   164  	case AVECL:
   165  		return op_VECL, 0, 0
   166  	case AVECLB:
   167  		return op_VECL, 0, 0
   168  	case AVECLH:
   169  		return op_VECL, 1, 0
   170  	case AVECLF:
   171  		return op_VECL, 2, 0
   172  	case AVECLG:
   173  		return op_VECL, 3, 0
   174  	case AVERIM:
   175  		return op_VERIM, 0, 0
   176  	case AVERIMB:
   177  		return op_VERIM, 0, 0
   178  	case AVERIMH:
   179  		return op_VERIM, 1, 0
   180  	case AVERIMF:
   181  		return op_VERIM, 2, 0
   182  	case AVERIMG:
   183  		return op_VERIM, 3, 0
   184  	case AVERLL:
   185  		return op_VERLL, 0, 0
   186  	case AVERLLB:
   187  		return op_VERLL, 0, 0
   188  	case AVERLLH:
   189  		return op_VERLL, 1, 0
   190  	case AVERLLF:
   191  		return op_VERLL, 2, 0
   192  	case AVERLLG:
   193  		return op_VERLL, 3, 0
   194  	case AVERLLV:
   195  		return op_VERLLV, 0, 0
   196  	case AVERLLVB:
   197  		return op_VERLLV, 0, 0
   198  	case AVERLLVH:
   199  		return op_VERLLV, 1, 0
   200  	case AVERLLVF:
   201  		return op_VERLLV, 2, 0
   202  	case AVERLLVG:
   203  		return op_VERLLV, 3, 0
   204  	case AVESLV:
   205  		return op_VESLV, 0, 0
   206  	case AVESLVB:
   207  		return op_VESLV, 0, 0
   208  	case AVESLVH:
   209  		return op_VESLV, 1, 0
   210  	case AVESLVF:
   211  		return op_VESLV, 2, 0
   212  	case AVESLVG:
   213  		return op_VESLV, 3, 0
   214  	case AVESL:
   215  		return op_VESL, 0, 0
   216  	case AVESLB:
   217  		return op_VESL, 0, 0
   218  	case AVESLH:
   219  		return op_VESL, 1, 0
   220  	case AVESLF:
   221  		return op_VESL, 2, 0
   222  	case AVESLG:
   223  		return op_VESL, 3, 0
   224  	case AVESRA:
   225  		return op_VESRA, 0, 0
   226  	case AVESRAB:
   227  		return op_VESRA, 0, 0
   228  	case AVESRAH:
   229  		return op_VESRA, 1, 0
   230  	case AVESRAF:
   231  		return op_VESRA, 2, 0
   232  	case AVESRAG:
   233  		return op_VESRA, 3, 0
   234  	case AVESRAV:
   235  		return op_VESRAV, 0, 0
   236  	case AVESRAVB:
   237  		return op_VESRAV, 0, 0
   238  	case AVESRAVH:
   239  		return op_VESRAV, 1, 0
   240  	case AVESRAVF:
   241  		return op_VESRAV, 2, 0
   242  	case AVESRAVG:
   243  		return op_VESRAV, 3, 0
   244  	case AVESRL:
   245  		return op_VESRL, 0, 0
   246  	case AVESRLB:
   247  		return op_VESRL, 0, 0
   248  	case AVESRLH:
   249  		return op_VESRL, 1, 0
   250  	case AVESRLF:
   251  		return op_VESRL, 2, 0
   252  	case AVESRLG:
   253  		return op_VESRL, 3, 0
   254  	case AVESRLV:
   255  		return op_VESRLV, 0, 0
   256  	case AVESRLVB:
   257  		return op_VESRLV, 0, 0
   258  	case AVESRLVH:
   259  		return op_VESRLV, 1, 0
   260  	case AVESRLVF:
   261  		return op_VESRLV, 2, 0
   262  	case AVESRLVG:
   263  		return op_VESRLV, 3, 0
   264  	case AVX:
   265  		return op_VX, 0, 0
   266  	case AVFAE:
   267  		return op_VFAE, 0, 0
   268  	case AVFAEB:
   269  		return op_VFAE, 0, 0
   270  	case AVFAEH:
   271  		return op_VFAE, 1, 0
   272  	case AVFAEF:
   273  		return op_VFAE, 2, 0
   274  	case AVFAEBS:
   275  		return op_VFAE, 0, 1
   276  	case AVFAEHS:
   277  		return op_VFAE, 1, 1
   278  	case AVFAEFS:
   279  		return op_VFAE, 2, 1
   280  	case AVFAEZB:
   281  		return op_VFAE, 0, 2
   282  	case AVFAEZH:
   283  		return op_VFAE, 1, 2
   284  	case AVFAEZF:
   285  		return op_VFAE, 2, 2
   286  	case AVFAEZBS:
   287  		return op_VFAE, 0, 3
   288  	case AVFAEZHS:
   289  		return op_VFAE, 1, 3
   290  	case AVFAEZFS:
   291  		return op_VFAE, 2, 3
   292  	case AVFEE:
   293  		return op_VFEE, 0, 0
   294  	case AVFEEB:
   295  		return op_VFEE, 0, 0
   296  	case AVFEEH:
   297  		return op_VFEE, 1, 0
   298  	case AVFEEF:
   299  		return op_VFEE, 2, 0
   300  	case AVFEEBS:
   301  		return op_VFEE, 0, 1
   302  	case AVFEEHS:
   303  		return op_VFEE, 1, 1
   304  	case AVFEEFS:
   305  		return op_VFEE, 2, 1
   306  	case AVFEEZB:
   307  		return op_VFEE, 0, 2
   308  	case AVFEEZH:
   309  		return op_VFEE, 1, 2
   310  	case AVFEEZF:
   311  		return op_VFEE, 2, 2
   312  	case AVFEEZBS:
   313  		return op_VFEE, 0, 3
   314  	case AVFEEZHS:
   315  		return op_VFEE, 1, 3
   316  	case AVFEEZFS:
   317  		return op_VFEE, 2, 3
   318  	case AVFENE:
   319  		return op_VFENE, 0, 0
   320  	case AVFENEB:
   321  		return op_VFENE, 0, 0
   322  	case AVFENEH:
   323  		return op_VFENE, 1, 0
   324  	case AVFENEF:
   325  		return op_VFENE, 2, 0
   326  	case AVFENEBS:
   327  		return op_VFENE, 0, 1
   328  	case AVFENEHS:
   329  		return op_VFENE, 1, 1
   330  	case AVFENEFS:
   331  		return op_VFENE, 2, 1
   332  	case AVFENEZB:
   333  		return op_VFENE, 0, 2
   334  	case AVFENEZH:
   335  		return op_VFENE, 1, 2
   336  	case AVFENEZF:
   337  		return op_VFENE, 2, 2
   338  	case AVFENEZBS:
   339  		return op_VFENE, 0, 3
   340  	case AVFENEZHS:
   341  		return op_VFENE, 1, 3
   342  	case AVFENEZFS:
   343  		return op_VFENE, 2, 3
   344  	case AVFA:
   345  		return op_VFA, 0, 0
   346  	case AVFADB:
   347  		return op_VFA, 3, 0
   348  	case AWFADB:
   349  		return op_VFA, 3, 0
   350  	case AWFK:
   351  		return op_WFK, 0, 0
   352  	case AWFKDB:
   353  		return op_WFK, 3, 0
   354  	case AVFCE:
   355  		return op_VFCE, 0, 0
   356  	case AVFCEDB:
   357  		return op_VFCE, 3, 0
   358  	case AVFCEDBS:
   359  		return op_VFCE, 3, 1
   360  	case AWFCEDB:
   361  		return op_VFCE, 3, 0
   362  	case AWFCEDBS:
   363  		return op_VFCE, 3, 1
   364  	case AVFCH:
   365  		return op_VFCH, 0, 0
   366  	case AVFCHDB:
   367  		return op_VFCH, 3, 0
   368  	case AVFCHDBS:
   369  		return op_VFCH, 3, 1
   370  	case AWFCHDB:
   371  		return op_VFCH, 3, 0
   372  	case AWFCHDBS:
   373  		return op_VFCH, 3, 1
   374  	case AVFCHE:
   375  		return op_VFCHE, 0, 0
   376  	case AVFCHEDB:
   377  		return op_VFCHE, 3, 0
   378  	case AVFCHEDBS:
   379  		return op_VFCHE, 3, 1
   380  	case AWFCHEDB:
   381  		return op_VFCHE, 3, 0
   382  	case AWFCHEDBS:
   383  		return op_VFCHE, 3, 1
   384  	case AWFC:
   385  		return op_WFC, 0, 0
   386  	case AWFCDB:
   387  		return op_WFC, 3, 0
   388  	case AVCDG:
   389  		return op_VCDG, 0, 0
   390  	case AVCDGB:
   391  		return op_VCDG, 3, 0
   392  	case AWCDGB:
   393  		return op_VCDG, 3, 0
   394  	case AVCDLG:
   395  		return op_VCDLG, 0, 0
   396  	case AVCDLGB:
   397  		return op_VCDLG, 3, 0
   398  	case AWCDLGB:
   399  		return op_VCDLG, 3, 0
   400  	case AVCGD:
   401  		return op_VCGD, 0, 0
   402  	case AVCGDB:
   403  		return op_VCGD, 3, 0
   404  	case AWCGDB:
   405  		return op_VCGD, 3, 0
   406  	case AVCLGD:
   407  		return op_VCLGD, 0, 0
   408  	case AVCLGDB:
   409  		return op_VCLGD, 3, 0
   410  	case AWCLGDB:
   411  		return op_VCLGD, 3, 0
   412  	case AVFD:
   413  		return op_VFD, 0, 0
   414  	case AVFDDB:
   415  		return op_VFD, 3, 0
   416  	case AWFDDB:
   417  		return op_VFD, 3, 0
   418  	case AVLDE:
   419  		return op_VLDE, 0, 0
   420  	case AVLDEB:
   421  		return op_VLDE, 2, 0
   422  	case AWLDEB:
   423  		return op_VLDE, 2, 0
   424  	case AVLED:
   425  		return op_VLED, 0, 0
   426  	case AVLEDB:
   427  		return op_VLED, 3, 0
   428  	case AWLEDB:
   429  		return op_VLED, 3, 0
   430  	case AVFM:
   431  		return op_VFM, 0, 0
   432  	case AVFMDB:
   433  		return op_VFM, 3, 0
   434  	case AWFMDB:
   435  		return op_VFM, 3, 0
   436  	case AVFMA:
   437  		return op_VFMA, 0, 0
   438  	case AVFMADB:
   439  		return op_VFMA, 3, 0
   440  	case AWFMADB:
   441  		return op_VFMA, 3, 0
   442  	case AVFMS:
   443  		return op_VFMS, 0, 0
   444  	case AVFMSDB:
   445  		return op_VFMS, 3, 0
   446  	case AWFMSDB:
   447  		return op_VFMS, 3, 0
   448  	case AVFPSO:
   449  		return op_VFPSO, 0, 0
   450  	case AVFPSODB:
   451  		return op_VFPSO, 3, 0
   452  	case AWFPSODB:
   453  		return op_VFPSO, 3, 0
   454  	case AVFLCDB:
   455  		return op_VFPSO, 3, 0
   456  	case AWFLCDB:
   457  		return op_VFPSO, 3, 0
   458  	case AVFLNDB:
   459  		return op_VFPSO, 3, 1
   460  	case AWFLNDB:
   461  		return op_VFPSO, 3, 1
   462  	case AVFLPDB:
   463  		return op_VFPSO, 3, 2
   464  	case AWFLPDB:
   465  		return op_VFPSO, 3, 2
   466  	case AVFSQ:
   467  		return op_VFSQ, 0, 0
   468  	case AVFSQDB:
   469  		return op_VFSQ, 3, 0
   470  	case AWFSQDB:
   471  		return op_VFSQ, 3, 0
   472  	case AVFS:
   473  		return op_VFS, 0, 0
   474  	case AVFSDB:
   475  		return op_VFS, 3, 0
   476  	case AWFSDB:
   477  		return op_VFS, 3, 0
   478  	case AVFTCI:
   479  		return op_VFTCI, 0, 0
   480  	case AVFTCIDB:
   481  		return op_VFTCI, 3, 0
   482  	case AWFTCIDB:
   483  		return op_VFTCI, 3, 0
   484  	case AVGFM:
   485  		return op_VGFM, 0, 0
   486  	case AVGFMB:
   487  		return op_VGFM, 0, 0
   488  	case AVGFMH:
   489  		return op_VGFM, 1, 0
   490  	case AVGFMF:
   491  		return op_VGFM, 2, 0
   492  	case AVGFMG:
   493  		return op_VGFM, 3, 0
   494  	case AVGFMA:
   495  		return op_VGFMA, 0, 0
   496  	case AVGFMAB:
   497  		return op_VGFMA, 0, 0
   498  	case AVGFMAH:
   499  		return op_VGFMA, 1, 0
   500  	case AVGFMAF:
   501  		return op_VGFMA, 2, 0
   502  	case AVGFMAG:
   503  		return op_VGFMA, 3, 0
   504  	case AVGEF:
   505  		return op_VGEF, 0, 0
   506  	case AVGEG:
   507  		return op_VGEG, 0, 0
   508  	case AVGBM:
   509  		return op_VGBM, 0, 0
   510  	case AVZERO:
   511  		return op_VGBM, 0, 0
   512  	case AVONE:
   513  		return op_VGBM, 0, 0
   514  	case AVGM:
   515  		return op_VGM, 0, 0
   516  	case AVGMB:
   517  		return op_VGM, 0, 0
   518  	case AVGMH:
   519  		return op_VGM, 1, 0
   520  	case AVGMF:
   521  		return op_VGM, 2, 0
   522  	case AVGMG:
   523  		return op_VGM, 3, 0
   524  	case AVISTR:
   525  		return op_VISTR, 0, 0
   526  	case AVISTRB:
   527  		return op_VISTR, 0, 0
   528  	case AVISTRH:
   529  		return op_VISTR, 1, 0
   530  	case AVISTRF:
   531  		return op_VISTR, 2, 0
   532  	case AVISTRBS:
   533  		return op_VISTR, 0, 1
   534  	case AVISTRHS:
   535  		return op_VISTR, 1, 1
   536  	case AVISTRFS:
   537  		return op_VISTR, 2, 1
   538  	case AVL:
   539  		return op_VL, 0, 0
   540  	case AVLR:
   541  		return op_VLR, 0, 0
   542  	case AVLREP:
   543  		return op_VLREP, 0, 0
   544  	case AVLREPB:
   545  		return op_VLREP, 0, 0
   546  	case AVLREPH:
   547  		return op_VLREP, 1, 0
   548  	case AVLREPF:
   549  		return op_VLREP, 2, 0
   550  	case AVLREPG:
   551  		return op_VLREP, 3, 0
   552  	case AVLC:
   553  		return op_VLC, 0, 0
   554  	case AVLCB:
   555  		return op_VLC, 0, 0
   556  	case AVLCH:
   557  		return op_VLC, 1, 0
   558  	case AVLCF:
   559  		return op_VLC, 2, 0
   560  	case AVLCG:
   561  		return op_VLC, 3, 0
   562  	case AVLEH:
   563  		return op_VLEH, 0, 0
   564  	case AVLEF:
   565  		return op_VLEF, 0, 0
   566  	case AVLEG:
   567  		return op_VLEG, 0, 0
   568  	case AVLEB:
   569  		return op_VLEB, 0, 0
   570  	case AVLEIH:
   571  		return op_VLEIH, 0, 0
   572  	case AVLEIF:
   573  		return op_VLEIF, 0, 0
   574  	case AVLEIG:
   575  		return op_VLEIG, 0, 0
   576  	case AVLEIB:
   577  		return op_VLEIB, 0, 0
   578  	case AVFI:
   579  		return op_VFI, 0, 0
   580  	case AVFIDB:
   581  		return op_VFI, 3, 0
   582  	case AWFIDB:
   583  		return op_VFI, 3, 0
   584  	case AVLGV:
   585  		return op_VLGV, 0, 0
   586  	case AVLGVB:
   587  		return op_VLGV, 0, 0
   588  	case AVLGVH:
   589  		return op_VLGV, 1, 0
   590  	case AVLGVF:
   591  		return op_VLGV, 2, 0
   592  	case AVLGVG:
   593  		return op_VLGV, 3, 0
   594  	case AVLLEZ:
   595  		return op_VLLEZ, 0, 0
   596  	case AVLLEZB:
   597  		return op_VLLEZ, 0, 0
   598  	case AVLLEZH:
   599  		return op_VLLEZ, 1, 0
   600  	case AVLLEZF:
   601  		return op_VLLEZ, 2, 0
   602  	case AVLLEZG:
   603  		return op_VLLEZ, 3, 0
   604  	case AVLM:
   605  		return op_VLM, 0, 0
   606  	case AVLP:
   607  		return op_VLP, 0, 0
   608  	case AVLPB:
   609  		return op_VLP, 0, 0
   610  	case AVLPH:
   611  		return op_VLP, 1, 0
   612  	case AVLPF:
   613  		return op_VLP, 2, 0
   614  	case AVLPG:
   615  		return op_VLP, 3, 0
   616  	case AVLBB:
   617  		return op_VLBB, 0, 0
   618  	case AVLVG:
   619  		return op_VLVG, 0, 0
   620  	case AVLVGB:
   621  		return op_VLVG, 0, 0
   622  	case AVLVGH:
   623  		return op_VLVG, 1, 0
   624  	case AVLVGF:
   625  		return op_VLVG, 2, 0
   626  	case AVLVGG:
   627  		return op_VLVG, 3, 0
   628  	case AVLVGP:
   629  		return op_VLVGP, 0, 0
   630  	case AVLL:
   631  		return op_VLL, 0, 0
   632  	case AVMX:
   633  		return op_VMX, 0, 0
   634  	case AVMXB:
   635  		return op_VMX, 0, 0
   636  	case AVMXH:
   637  		return op_VMX, 1, 0
   638  	case AVMXF:
   639  		return op_VMX, 2, 0
   640  	case AVMXG:
   641  		return op_VMX, 3, 0
   642  	case AVMXL:
   643  		return op_VMXL, 0, 0
   644  	case AVMXLB:
   645  		return op_VMXL, 0, 0
   646  	case AVMXLH:
   647  		return op_VMXL, 1, 0
   648  	case AVMXLF:
   649  		return op_VMXL, 2, 0
   650  	case AVMXLG:
   651  		return op_VMXL, 3, 0
   652  	case AVMRH:
   653  		return op_VMRH, 0, 0
   654  	case AVMRHB:
   655  		return op_VMRH, 0, 0
   656  	case AVMRHH:
   657  		return op_VMRH, 1, 0
   658  	case AVMRHF:
   659  		return op_VMRH, 2, 0
   660  	case AVMRHG:
   661  		return op_VMRH, 3, 0
   662  	case AVMRL:
   663  		return op_VMRL, 0, 0
   664  	case AVMRLB:
   665  		return op_VMRL, 0, 0
   666  	case AVMRLH:
   667  		return op_VMRL, 1, 0
   668  	case AVMRLF:
   669  		return op_VMRL, 2, 0
   670  	case AVMRLG:
   671  		return op_VMRL, 3, 0
   672  	case AVMN:
   673  		return op_VMN, 0, 0
   674  	case AVMNB:
   675  		return op_VMN, 0, 0
   676  	case AVMNH:
   677  		return op_VMN, 1, 0
   678  	case AVMNF:
   679  		return op_VMN, 2, 0
   680  	case AVMNG:
   681  		return op_VMN, 3, 0
   682  	case AVMNL:
   683  		return op_VMNL, 0, 0
   684  	case AVMNLB:
   685  		return op_VMNL, 0, 0
   686  	case AVMNLH:
   687  		return op_VMNL, 1, 0
   688  	case AVMNLF:
   689  		return op_VMNL, 2, 0
   690  	case AVMNLG:
   691  		return op_VMNL, 3, 0
   692  	case AVMAE:
   693  		return op_VMAE, 0, 0
   694  	case AVMAEB:
   695  		return op_VMAE, 0, 0
   696  	case AVMAEH:
   697  		return op_VMAE, 1, 0
   698  	case AVMAEF:
   699  		return op_VMAE, 2, 0
   700  	case AVMAH:
   701  		return op_VMAH, 0, 0
   702  	case AVMAHB:
   703  		return op_VMAH, 0, 0
   704  	case AVMAHH:
   705  		return op_VMAH, 1, 0
   706  	case AVMAHF:
   707  		return op_VMAH, 2, 0
   708  	case AVMALE:
   709  		return op_VMALE, 0, 0
   710  	case AVMALEB:
   711  		return op_VMALE, 0, 0
   712  	case AVMALEH:
   713  		return op_VMALE, 1, 0
   714  	case AVMALEF:
   715  		return op_VMALE, 2, 0
   716  	case AVMALH:
   717  		return op_VMALH, 0, 0
   718  	case AVMALHB:
   719  		return op_VMALH, 0, 0
   720  	case AVMALHH:
   721  		return op_VMALH, 1, 0
   722  	case AVMALHF:
   723  		return op_VMALH, 2, 0
   724  	case AVMALO:
   725  		return op_VMALO, 0, 0
   726  	case AVMALOB:
   727  		return op_VMALO, 0, 0
   728  	case AVMALOH:
   729  		return op_VMALO, 1, 0
   730  	case AVMALOF:
   731  		return op_VMALO, 2, 0
   732  	case AVMAL:
   733  		return op_VMAL, 0, 0
   734  	case AVMALB:
   735  		return op_VMAL, 0, 0
   736  	case AVMALHW:
   737  		return op_VMAL, 1, 0
   738  	case AVMALF:
   739  		return op_VMAL, 2, 0
   740  	case AVMAO:
   741  		return op_VMAO, 0, 0
   742  	case AVMAOB:
   743  		return op_VMAO, 0, 0
   744  	case AVMAOH:
   745  		return op_VMAO, 1, 0
   746  	case AVMAOF:
   747  		return op_VMAO, 2, 0
   748  	case AVME:
   749  		return op_VME, 0, 0
   750  	case AVMEB:
   751  		return op_VME, 0, 0
   752  	case AVMEH:
   753  		return op_VME, 1, 0
   754  	case AVMEF:
   755  		return op_VME, 2, 0
   756  	case AVMH:
   757  		return op_VMH, 0, 0
   758  	case AVMHB:
   759  		return op_VMH, 0, 0
   760  	case AVMHH:
   761  		return op_VMH, 1, 0
   762  	case AVMHF:
   763  		return op_VMH, 2, 0
   764  	case AVMLE:
   765  		return op_VMLE, 0, 0
   766  	case AVMLEB:
   767  		return op_VMLE, 0, 0
   768  	case AVMLEH:
   769  		return op_VMLE, 1, 0
   770  	case AVMLEF:
   771  		return op_VMLE, 2, 0
   772  	case AVMLH:
   773  		return op_VMLH, 0, 0
   774  	case AVMLHB:
   775  		return op_VMLH, 0, 0
   776  	case AVMLHH:
   777  		return op_VMLH, 1, 0
   778  	case AVMLHF:
   779  		return op_VMLH, 2, 0
   780  	case AVMLO:
   781  		return op_VMLO, 0, 0
   782  	case AVMLOB:
   783  		return op_VMLO, 0, 0
   784  	case AVMLOH:
   785  		return op_VMLO, 1, 0
   786  	case AVMLOF:
   787  		return op_VMLO, 2, 0
   788  	case AVML:
   789  		return op_VML, 0, 0
   790  	case AVMLB:
   791  		return op_VML, 0, 0
   792  	case AVMLHW:
   793  		return op_VML, 1, 0
   794  	case AVMLF:
   795  		return op_VML, 2, 0
   796  	case AVMO:
   797  		return op_VMO, 0, 0
   798  	case AVMOB:
   799  		return op_VMO, 0, 0
   800  	case AVMOH:
   801  		return op_VMO, 1, 0
   802  	case AVMOF:
   803  		return op_VMO, 2, 0
   804  	case AVNO:
   805  		return op_VNO, 0, 0
   806  	case AVNOT:
   807  		return op_VNO, 0, 0
   808  	case AVO:
   809  		return op_VO, 0, 0
   810  	case AVPK:
   811  		return op_VPK, 0, 0
   812  	case AVPKH:
   813  		return op_VPK, 1, 0
   814  	case AVPKF:
   815  		return op_VPK, 2, 0
   816  	case AVPKG:
   817  		return op_VPK, 3, 0
   818  	case AVPKLS:
   819  		return op_VPKLS, 0, 0
   820  	case AVPKLSH:
   821  		return op_VPKLS, 1, 0
   822  	case AVPKLSF:
   823  		return op_VPKLS, 2, 0
   824  	case AVPKLSG:
   825  		return op_VPKLS, 3, 0
   826  	case AVPKLSHS:
   827  		return op_VPKLS, 1, 1
   828  	case AVPKLSFS:
   829  		return op_VPKLS, 2, 1
   830  	case AVPKLSGS:
   831  		return op_VPKLS, 3, 1
   832  	case AVPKS:
   833  		return op_VPKS, 0, 0
   834  	case AVPKSH:
   835  		return op_VPKS, 1, 0
   836  	case AVPKSF:
   837  		return op_VPKS, 2, 0
   838  	case AVPKSG:
   839  		return op_VPKS, 3, 0
   840  	case AVPKSHS:
   841  		return op_VPKS, 1, 1
   842  	case AVPKSFS:
   843  		return op_VPKS, 2, 1
   844  	case AVPKSGS:
   845  		return op_VPKS, 3, 1
   846  	case AVPERM:
   847  		return op_VPERM, 0, 0
   848  	case AVPDI:
   849  		return op_VPDI, 0, 0
   850  	case AVPOPCT:
   851  		return op_VPOPCT, 0, 0
   852  	case AVREP:
   853  		return op_VREP, 0, 0
   854  	case AVREPB:
   855  		return op_VREP, 0, 0
   856  	case AVREPH:
   857  		return op_VREP, 1, 0
   858  	case AVREPF:
   859  		return op_VREP, 2, 0
   860  	case AVREPG:
   861  		return op_VREP, 3, 0
   862  	case AVREPI:
   863  		return op_VREPI, 0, 0
   864  	case AVREPIB:
   865  		return op_VREPI, 0, 0
   866  	case AVREPIH:
   867  		return op_VREPI, 1, 0
   868  	case AVREPIF:
   869  		return op_VREPI, 2, 0
   870  	case AVREPIG:
   871  		return op_VREPI, 3, 0
   872  	case AVSCEF:
   873  		return op_VSCEF, 0, 0
   874  	case AVSCEG:
   875  		return op_VSCEG, 0, 0
   876  	case AVSEL:
   877  		return op_VSEL, 0, 0
   878  	case AVSL:
   879  		return op_VSL, 0, 0
   880  	case AVSLB:
   881  		return op_VSLB, 0, 0
   882  	case AVSLDB:
   883  		return op_VSLDB, 0, 0
   884  	case AVSRA:
   885  		return op_VSRA, 0, 0
   886  	case AVSRAB:
   887  		return op_VSRAB, 0, 0
   888  	case AVSRL:
   889  		return op_VSRL, 0, 0
   890  	case AVSRLB:
   891  		return op_VSRLB, 0, 0
   892  	case AVSEG:
   893  		return op_VSEG, 0, 0
   894  	case AVSEGB:
   895  		return op_VSEG, 0, 0
   896  	case AVSEGH:
   897  		return op_VSEG, 1, 0
   898  	case AVSEGF:
   899  		return op_VSEG, 2, 0
   900  	case AVST:
   901  		return op_VST, 0, 0
   902  	case AVSTEH:
   903  		return op_VSTEH, 0, 0
   904  	case AVSTEF:
   905  		return op_VSTEF, 0, 0
   906  	case AVSTEG:
   907  		return op_VSTEG, 0, 0
   908  	case AVSTEB:
   909  		return op_VSTEB, 0, 0
   910  	case AVSTM:
   911  		return op_VSTM, 0, 0
   912  	case AVSTL:
   913  		return op_VSTL, 0, 0
   914  	case AVSTRC:
   915  		return op_VSTRC, 0, 0
   916  	case AVSTRCB:
   917  		return op_VSTRC, 0, 0
   918  	case AVSTRCH:
   919  		return op_VSTRC, 1, 0
   920  	case AVSTRCF:
   921  		return op_VSTRC, 2, 0
   922  	case AVSTRCBS:
   923  		return op_VSTRC, 0, 1
   924  	case AVSTRCHS:
   925  		return op_VSTRC, 1, 1
   926  	case AVSTRCFS:
   927  		return op_VSTRC, 2, 1
   928  	case AVSTRCZB:
   929  		return op_VSTRC, 0, 2
   930  	case AVSTRCZH:
   931  		return op_VSTRC, 1, 2
   932  	case AVSTRCZF:
   933  		return op_VSTRC, 2, 2
   934  	case AVSTRCZBS:
   935  		return op_VSTRC, 0, 3
   936  	case AVSTRCZHS:
   937  		return op_VSTRC, 1, 3
   938  	case AVSTRCZFS:
   939  		return op_VSTRC, 2, 3
   940  	case AVS:
   941  		return op_VS, 0, 0
   942  	case AVSB:
   943  		return op_VS, 0, 0
   944  	case AVSH:
   945  		return op_VS, 1, 0
   946  	case AVSF:
   947  		return op_VS, 2, 0
   948  	case AVSG:
   949  		return op_VS, 3, 0
   950  	case AVSQ:
   951  		return op_VS, 4, 0
   952  	case AVSCBI:
   953  		return op_VSCBI, 0, 0
   954  	case AVSCBIB:
   955  		return op_VSCBI, 0, 0
   956  	case AVSCBIH:
   957  		return op_VSCBI, 1, 0
   958  	case AVSCBIF:
   959  		return op_VSCBI, 2, 0
   960  	case AVSCBIG:
   961  		return op_VSCBI, 3, 0
   962  	case AVSCBIQ:
   963  		return op_VSCBI, 4, 0
   964  	case AVSBCBI:
   965  		return op_VSBCBI, 0, 0
   966  	case AVSBCBIQ:
   967  		return op_VSBCBI, 4, 0
   968  	case AVSBI:
   969  		return op_VSBI, 0, 0
   970  	case AVSBIQ:
   971  		return op_VSBI, 4, 0
   972  	case AVSUMG:
   973  		return op_VSUMG, 0, 0
   974  	case AVSUMGH:
   975  		return op_VSUMG, 1, 0
   976  	case AVSUMGF:
   977  		return op_VSUMG, 2, 0
   978  	case AVSUMQ:
   979  		return op_VSUMQ, 0, 0
   980  	case AVSUMQF:
   981  		return op_VSUMQ, 2, 0
   982  	case AVSUMQG:
   983  		return op_VSUMQ, 3, 0
   984  	case AVSUM:
   985  		return op_VSUM, 0, 0
   986  	case AVSUMB:
   987  		return op_VSUM, 0, 0
   988  	case AVSUMH:
   989  		return op_VSUM, 1, 0
   990  	case AVTM:
   991  		return op_VTM, 0, 0
   992  	case AVUPH:
   993  		return op_VUPH, 0, 0
   994  	case AVUPHB:
   995  		return op_VUPH, 0, 0
   996  	case AVUPHH:
   997  		return op_VUPH, 1, 0
   998  	case AVUPHF:
   999  		return op_VUPH, 2, 0
  1000  	case AVUPLH:
  1001  		return op_VUPLH, 0, 0
  1002  	case AVUPLHB:
  1003  		return op_VUPLH, 0, 0
  1004  	case AVUPLHH:
  1005  		return op_VUPLH, 1, 0
  1006  	case AVUPLHF:
  1007  		return op_VUPLH, 2, 0
  1008  	case AVUPLL:
  1009  		return op_VUPLL, 0, 0
  1010  	case AVUPLLB:
  1011  		return op_VUPLL, 0, 0
  1012  	case AVUPLLH:
  1013  		return op_VUPLL, 1, 0
  1014  	case AVUPLLF:
  1015  		return op_VUPLL, 2, 0
  1016  	case AVUPL:
  1017  		return op_VUPL, 0, 0
  1018  	case AVUPLB:
  1019  		return op_VUPL, 0, 0
  1020  	case AVUPLHW:
  1021  		return op_VUPL, 1, 0
  1022  	case AVUPLF:
  1023  		return op_VUPL, 2, 0
  1024  	}
  1025  }
  1026  
  1027  // singleElementMask returns the single element mask bits required for the
  1028  // given instruction.
  1029  func singleElementMask(as obj.As) uint32 {
  1030  	switch as {
  1031  	case AWFADB,
  1032  		AWFK,
  1033  		AWFKDB,
  1034  		AWFCEDB,
  1035  		AWFCEDBS,
  1036  		AWFCHDB,
  1037  		AWFCHDBS,
  1038  		AWFCHEDB,
  1039  		AWFCHEDBS,
  1040  		AWFC,
  1041  		AWFCDB,
  1042  		AWCDGB,
  1043  		AWCDLGB,
  1044  		AWCGDB,
  1045  		AWCLGDB,
  1046  		AWFDDB,
  1047  		AWLDEB,
  1048  		AWLEDB,
  1049  		AWFMDB,
  1050  		AWFMADB,
  1051  		AWFMSDB,
  1052  		AWFPSODB,
  1053  		AWFLCDB,
  1054  		AWFLNDB,
  1055  		AWFLPDB,
  1056  		AWFSQDB,
  1057  		AWFSDB,
  1058  		AWFTCIDB,
  1059  		AWFIDB:
  1060  		return 8
  1061  	case AVMSLEG:
  1062  		return 8
  1063  	case AVMSLOG:
  1064  		return 4
  1065  	case AVMSLEOG:
  1066  		return 12
  1067  	}
  1068  	return 0
  1069  }