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