github.com/gocuntian/go@v0.0.0-20160610041250-fee02d270bf8/src/cmd/asm/internal/arch/amd64.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  // This file encapsulates some of the odd characteristics of the
     6  // AMD64 instruction set, to minimize its interaction
     7  // with the core of the assembler.
     8  
     9  package arch
    10  
    11  import (
    12  	"cmd/internal/obj"
    13  	"cmd/internal/obj/x86"
    14  )
    15  
    16  // IsAMD4OP reports whether the op (as defined by an ppc64.A* constant) is
    17  // The FMADD-like instructions behave similarly.
    18  func IsAMD4OP(op obj.As) bool {
    19  	switch op {
    20  	case x86.AVPERM2F128,
    21  		x86.AVPALIGNR,
    22  		x86.AVPERM2I128,
    23  		x86.AVINSERTI128,
    24  		x86.AVPBLENDD:
    25  		return true
    26  	}
    27  	return false
    28  }