// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package s390x
import (
"github.com/google/gops/internal/obj"
)
// This file contains utility functions for use when
// assembling vector instructions.
// vop returns the opcode, element size and condition
// setting for the given (possibly extended) mnemonic.
func vop(as obj.As) (opcode, es, cs uint32) {
switch as {
default:
return 0, 0, 0
case AVA:
return op_VA, 0, 0
case AVAB:
return op_VA, 0, 0
case AVAH:
return op_VA, 1, 0
case AVAF:
return op_VA, 2, 0
case AVAG:
return op_VA, 3, 0
case AVAQ:
return op_VA, 4, 0
case AVACC:
return op_VACC, 0, 0
case AVACCB:
return op_VACC, 0, 0
case AVACCH:
return op_VACC, 1, 0
case AVACCF:
return op_VACC, 2, 0
case AVACCG:
return op_VACC, 3, 0
case AVACCQ:
return op_VACC, 4, 0
case AVAC:
return op_VAC, 0, 0
case AVACQ:
return op_VAC, 4, 0
case AVACCC:
return op_VACCC, 0, 0
case AVACCCQ:
return op_VACCC, 4, 0
case AVN:
return op_VN, 0, 0
case AVNC:
return op_VNC, 0, 0
case AVAVG:
return op_VAVG, 0, 0
case AVAVGB:
return op_VAVG, 0, 0
case AVAVGH:
return op_VAVG, 1, 0
case AVAVGF:
return op_VAVG, 2, 0
case AVAVGG:
return op_VAVG, 3, 0
case AVAVGL:
return op_VAVGL, 0, 0
case AVAVGLB:
return op_VAVGL, 0, 0
case AVAVGLH:
return op_VAVGL, 1, 0
case AVAVGLF:
return op_VAVGL, 2, 0
case AVAVGLG:
return op_VAVGL, 3, 0
case AVCKSM:
return op_VCKSM, 0, 0
case AVCEQ:
return op_VCEQ, 0, 0
case AVCEQB:
return op_VCEQ, 0, 0
case AVCEQH:
return op_VCEQ, 1, 0
case AVCEQF:
return op_VCEQ, 2, 0
case AVCEQG:
return op_VCEQ, 3, 0
case AVCEQBS:
return op_VCEQ, 0, 1
case AVCEQHS:
return op_VCEQ, 1, 1
case AVCEQFS:
return op_VCEQ, 2, 1
case AVCEQGS:
return op_VCEQ, 3, 1
case AVCH:
return op_VCH, 0, 0
case AVCHB:
return op_VCH, 0, 0
case AVCHH:
return op_VCH, 1, 0
case AVCHF:
return op_VCH, 2, 0
case AVCHG:
return op_VCH, 3, 0
case AVCHBS:
return op_VCH, 0, 1
case AVCHHS:
return op_VCH, 1, 1
case AVCHFS