17552 lines
412 KiB
Go
17552 lines
412 KiB
Go
// Code generated by command: avogen -output zctors.go ctors. DO NOT EDIT.
|
|
|
|
package x86
|
|
|
|
import (
|
|
"github.com/mmcloughlin/avo"
|
|
"github.com/mmcloughlin/avo/operand"
|
|
)
|
|
|
|
// ADCB: Add with Carry.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADCB imm8 al
|
|
// ADCB imm8 r8
|
|
// ADCB r8 r8
|
|
// ADCB m8 r8
|
|
// ADCB imm8 m8
|
|
// ADCB r8 m8
|
|
func ADCB(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imr) && operand.IsAl(amr):
|
|
case operand.IsImm8(imr) && operand.IsR8(amr):
|
|
case operand.IsR8(imr) && operand.IsR8(amr):
|
|
case operand.IsM8(imr) && operand.IsR8(amr):
|
|
case operand.IsImm8(imr) && operand.IsM8(amr):
|
|
case operand.IsR8(imr) && operand.IsM8(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADCL: Add with Carry.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADCL imm32 eax
|
|
// ADCL imm8 r32
|
|
// ADCL imm32 r32
|
|
// ADCL r32 r32
|
|
// ADCL m32 r32
|
|
// ADCL imm8 m32
|
|
// ADCL imm32 m32
|
|
// ADCL r32 m32
|
|
func ADCL(imr, emr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsEax(emr):
|
|
case operand.IsImm8(imr) && operand.IsR32(emr):
|
|
case operand.IsImm32(imr) && operand.IsR32(emr):
|
|
case operand.IsR32(imr) && operand.IsR32(emr):
|
|
case operand.IsM32(imr) && operand.IsR32(emr):
|
|
case operand.IsImm8(imr) && operand.IsM32(emr):
|
|
case operand.IsImm32(imr) && operand.IsM32(emr):
|
|
case operand.IsR32(imr) && operand.IsM32(emr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADCQ: Add with Carry.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADCQ imm32 rax
|
|
// ADCQ imm8 r64
|
|
// ADCQ imm32 r64
|
|
// ADCQ r64 r64
|
|
// ADCQ m64 r64
|
|
// ADCQ imm8 m64
|
|
// ADCQ imm32 m64
|
|
// ADCQ r64 m64
|
|
func ADCQ(imr, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsRax(mr):
|
|
case operand.IsImm8(imr) && operand.IsR64(mr):
|
|
case operand.IsImm32(imr) && operand.IsR64(mr):
|
|
case operand.IsR64(imr) && operand.IsR64(mr):
|
|
case operand.IsM64(imr) && operand.IsR64(mr):
|
|
case operand.IsImm8(imr) && operand.IsM64(mr):
|
|
case operand.IsImm32(imr) && operand.IsM64(mr):
|
|
case operand.IsR64(imr) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADCW: Add with Carry.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADCW imm16 ax
|
|
// ADCW imm8 r16
|
|
// ADCW imm16 r16
|
|
// ADCW r16 r16
|
|
// ADCW m16 r16
|
|
// ADCW imm8 m16
|
|
// ADCW imm16 m16
|
|
// ADCW r16 m16
|
|
func ADCW(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(imr) && operand.IsAx(amr):
|
|
case operand.IsImm8(imr) && operand.IsR16(amr):
|
|
case operand.IsImm16(imr) && operand.IsR16(amr):
|
|
case operand.IsR16(imr) && operand.IsR16(amr):
|
|
case operand.IsM16(imr) && operand.IsR16(amr):
|
|
case operand.IsImm8(imr) && operand.IsM16(amr):
|
|
case operand.IsImm16(imr) && operand.IsM16(amr):
|
|
case operand.IsR16(imr) && operand.IsM16(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADCXL: Unsigned Integer Addition of Two Operands with Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADCXL r32 r32
|
|
// ADCXL m32 r32
|
|
func ADCXL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADCXQ: Unsigned Integer Addition of Two Operands with Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADCXQ r64 r64
|
|
// ADCXQ m64 r64
|
|
func ADCXQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADDB: Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADDB imm8 al
|
|
// ADDB imm8 r8
|
|
// ADDB r8 r8
|
|
// ADDB m8 r8
|
|
// ADDB imm8 m8
|
|
// ADDB r8 m8
|
|
func ADDB(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imr) && operand.IsAl(amr):
|
|
case operand.IsImm8(imr) && operand.IsR8(amr):
|
|
case operand.IsR8(imr) && operand.IsR8(amr):
|
|
case operand.IsM8(imr) && operand.IsR8(amr):
|
|
case operand.IsImm8(imr) && operand.IsM8(amr):
|
|
case operand.IsR8(imr) && operand.IsM8(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADDL: Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADDL imm32 eax
|
|
// ADDL imm8 r32
|
|
// ADDL imm32 r32
|
|
// ADDL r32 r32
|
|
// ADDL m32 r32
|
|
// ADDL imm8 m32
|
|
// ADDL imm32 m32
|
|
// ADDL r32 m32
|
|
func ADDL(imr, emr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsEax(emr):
|
|
case operand.IsImm8(imr) && operand.IsR32(emr):
|
|
case operand.IsImm32(imr) && operand.IsR32(emr):
|
|
case operand.IsR32(imr) && operand.IsR32(emr):
|
|
case operand.IsM32(imr) && operand.IsR32(emr):
|
|
case operand.IsImm8(imr) && operand.IsM32(emr):
|
|
case operand.IsImm32(imr) && operand.IsM32(emr):
|
|
case operand.IsR32(imr) && operand.IsM32(emr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADDPD: Add Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADDPD xmm xmm
|
|
// ADDPD m128 xmm
|
|
func ADDPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADDPS: Add Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADDPS xmm xmm
|
|
// ADDPS m128 xmm
|
|
func ADDPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADDQ: Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADDQ imm32 rax
|
|
// ADDQ imm8 r64
|
|
// ADDQ imm32 r64
|
|
// ADDQ r64 r64
|
|
// ADDQ m64 r64
|
|
// ADDQ imm8 m64
|
|
// ADDQ imm32 m64
|
|
// ADDQ r64 m64
|
|
func ADDQ(imr, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsRax(mr):
|
|
case operand.IsImm8(imr) && operand.IsR64(mr):
|
|
case operand.IsImm32(imr) && operand.IsR64(mr):
|
|
case operand.IsR64(imr) && operand.IsR64(mr):
|
|
case operand.IsM64(imr) && operand.IsR64(mr):
|
|
case operand.IsImm8(imr) && operand.IsM64(mr):
|
|
case operand.IsImm32(imr) && operand.IsM64(mr):
|
|
case operand.IsR64(imr) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADDSD: Add Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADDSD xmm xmm
|
|
// ADDSD m64 xmm
|
|
func ADDSD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADDSS: Add Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADDSS xmm xmm
|
|
// ADDSS m32 xmm
|
|
func ADDSS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADDSUBPD: Packed Double-FP Add/Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADDSUBPD xmm xmm
|
|
// ADDSUBPD m128 xmm
|
|
func ADDSUBPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADDSUBPS: Packed Single-FP Add/Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADDSUBPS xmm xmm
|
|
// ADDSUBPS m128 xmm
|
|
func ADDSUBPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADDW: Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADDW imm16 ax
|
|
// ADDW imm8 r16
|
|
// ADDW imm16 r16
|
|
// ADDW r16 r16
|
|
// ADDW m16 r16
|
|
// ADDW imm8 m16
|
|
// ADDW imm16 m16
|
|
// ADDW r16 m16
|
|
func ADDW(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(imr) && operand.IsAx(amr):
|
|
case operand.IsImm8(imr) && operand.IsR16(amr):
|
|
case operand.IsImm16(imr) && operand.IsR16(amr):
|
|
case operand.IsR16(imr) && operand.IsR16(amr):
|
|
case operand.IsM16(imr) && operand.IsR16(amr):
|
|
case operand.IsImm8(imr) && operand.IsM16(amr):
|
|
case operand.IsImm16(imr) && operand.IsM16(amr):
|
|
case operand.IsR16(imr) && operand.IsM16(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADOXL: Unsigned Integer Addition of Two Operands with Overflow Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADOXL r32 r32
|
|
// ADOXL m32 r32
|
|
func ADOXL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ADOXQ: Unsigned Integer Addition of Two Operands with Overflow Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ADOXQ r64 r64
|
|
// ADOXQ m64 r64
|
|
func ADOXQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// AESDEC: Perform One Round of an AES Decryption Flow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// AESDEC xmm xmm
|
|
// AESDEC m128 xmm
|
|
func AESDEC(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// AESDECLAST: Perform Last Round of an AES Decryption Flow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// AESDECLAST xmm xmm
|
|
// AESDECLAST m128 xmm
|
|
func AESDECLAST(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// AESENC: Perform One Round of an AES Encryption Flow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// AESENC xmm xmm
|
|
// AESENC m128 xmm
|
|
func AESENC(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// AESENCLAST: Perform Last Round of an AES Encryption Flow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// AESENCLAST xmm xmm
|
|
// AESENCLAST m128 xmm
|
|
func AESENCLAST(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// AESIMC: Perform the AES InvMixColumn Transformation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// AESIMC xmm xmm
|
|
// AESIMC m128 xmm
|
|
func AESIMC(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// AESKEYGENASSIST: AES Round Key Generation Assist.
|
|
//
|
|
// Forms:
|
|
//
|
|
// AESKEYGENASSIST imm8 xmm xmm
|
|
// AESKEYGENASSIST imm8 m128 xmm
|
|
func AESKEYGENASSIST(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ANDB: Logical AND.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ANDB imm8 al
|
|
// ANDB imm8 r8
|
|
// ANDB r8 r8
|
|
// ANDB m8 r8
|
|
// ANDB imm8 m8
|
|
// ANDB r8 m8
|
|
func ANDB(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imr) && operand.IsAl(amr):
|
|
case operand.IsImm8(imr) && operand.IsR8(amr):
|
|
case operand.IsR8(imr) && operand.IsR8(amr):
|
|
case operand.IsM8(imr) && operand.IsR8(amr):
|
|
case operand.IsImm8(imr) && operand.IsM8(amr):
|
|
case operand.IsR8(imr) && operand.IsM8(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ANDL: Logical AND.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ANDL imm32 eax
|
|
// ANDL imm8 r32
|
|
// ANDL imm32 r32
|
|
// ANDL r32 r32
|
|
// ANDL m32 r32
|
|
// ANDL imm8 m32
|
|
// ANDL imm32 m32
|
|
// ANDL r32 m32
|
|
func ANDL(imr, emr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsEax(emr):
|
|
case operand.IsImm8(imr) && operand.IsR32(emr):
|
|
case operand.IsImm32(imr) && operand.IsR32(emr):
|
|
case operand.IsR32(imr) && operand.IsR32(emr):
|
|
case operand.IsM32(imr) && operand.IsR32(emr):
|
|
case operand.IsImm8(imr) && operand.IsM32(emr):
|
|
case operand.IsImm32(imr) && operand.IsM32(emr):
|
|
case operand.IsR32(imr) && operand.IsM32(emr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ANDNL: Logical AND NOT.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ANDNL r32 r32 r32
|
|
// ANDNL m32 r32 r32
|
|
func ANDNL(mr, r, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r) && operand.IsR32(r1):
|
|
case operand.IsM32(mr) && operand.IsR32(r) && operand.IsR32(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ANDNPD: Bitwise Logical AND NOT of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ANDNPD xmm xmm
|
|
// ANDNPD m128 xmm
|
|
func ANDNPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ANDNPS: Bitwise Logical AND NOT of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ANDNPS xmm xmm
|
|
// ANDNPS m128 xmm
|
|
func ANDNPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ANDNQ: Logical AND NOT.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ANDNQ r64 r64 r64
|
|
// ANDNQ m64 r64 r64
|
|
func ANDNQ(mr, r, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r) && operand.IsR64(r1):
|
|
case operand.IsM64(mr) && operand.IsR64(r) && operand.IsR64(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ANDPD: Bitwise Logical AND of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ANDPD xmm xmm
|
|
// ANDPD m128 xmm
|
|
func ANDPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ANDPS: Bitwise Logical AND of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ANDPS xmm xmm
|
|
// ANDPS m128 xmm
|
|
func ANDPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ANDQ: Logical AND.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ANDQ imm32 rax
|
|
// ANDQ imm8 r64
|
|
// ANDQ imm32 r64
|
|
// ANDQ r64 r64
|
|
// ANDQ m64 r64
|
|
// ANDQ imm8 m64
|
|
// ANDQ imm32 m64
|
|
// ANDQ r64 m64
|
|
func ANDQ(imr, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsRax(mr):
|
|
case operand.IsImm8(imr) && operand.IsR64(mr):
|
|
case operand.IsImm32(imr) && operand.IsR64(mr):
|
|
case operand.IsR64(imr) && operand.IsR64(mr):
|
|
case operand.IsM64(imr) && operand.IsR64(mr):
|
|
case operand.IsImm8(imr) && operand.IsM64(mr):
|
|
case operand.IsImm32(imr) && operand.IsM64(mr):
|
|
case operand.IsR64(imr) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ANDW: Logical AND.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ANDW imm16 ax
|
|
// ANDW imm8 r16
|
|
// ANDW imm16 r16
|
|
// ANDW r16 r16
|
|
// ANDW m16 r16
|
|
// ANDW imm8 m16
|
|
// ANDW imm16 m16
|
|
// ANDW r16 m16
|
|
func ANDW(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(imr) && operand.IsAx(amr):
|
|
case operand.IsImm8(imr) && operand.IsR16(amr):
|
|
case operand.IsImm16(imr) && operand.IsR16(amr):
|
|
case operand.IsR16(imr) && operand.IsR16(amr):
|
|
case operand.IsM16(imr) && operand.IsR16(amr):
|
|
case operand.IsImm8(imr) && operand.IsM16(amr):
|
|
case operand.IsImm16(imr) && operand.IsM16(amr):
|
|
case operand.IsR16(imr) && operand.IsM16(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BEXTRL: Bit Field Extract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BEXTRL r32 r32 r32
|
|
// BEXTRL r32 m32 r32
|
|
func BEXTRL(r, mr, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r) && operand.IsR32(mr) && operand.IsR32(r1):
|
|
case operand.IsR32(r) && operand.IsM32(mr) && operand.IsR32(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BEXTRQ: Bit Field Extract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BEXTRQ r64 r64 r64
|
|
// BEXTRQ r64 m64 r64
|
|
func BEXTRQ(r, mr, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r) && operand.IsR64(mr) && operand.IsR64(r1):
|
|
case operand.IsR64(r) && operand.IsM64(mr) && operand.IsR64(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BLENDPD: Blend Packed Double Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BLENDPD imm8 xmm xmm
|
|
// BLENDPD imm8 m128 xmm
|
|
func BLENDPD(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BLENDPS: Blend Packed Single Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BLENDPS imm8 xmm xmm
|
|
// BLENDPS imm8 m128 xmm
|
|
func BLENDPS(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BLENDVPD: Variable Blend Packed Double Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BLENDVPD xmm0 xmm xmm
|
|
// BLENDVPD xmm0 m128 xmm
|
|
func BLENDVPD(x, mx, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm0(x) && operand.IsXmm(mx) && operand.IsXmm(x1):
|
|
case operand.IsXmm0(x) && operand.IsM128(mx) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BLENDVPS: Variable Blend Packed Single Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BLENDVPS xmm0 xmm xmm
|
|
// BLENDVPS xmm0 m128 xmm
|
|
func BLENDVPS(x, mx, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm0(x) && operand.IsXmm(mx) && operand.IsXmm(x1):
|
|
case operand.IsXmm0(x) && operand.IsM128(mx) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BLSIL: Isolate Lowest Set Bit.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BLSIL r32 r32
|
|
// BLSIL m32 r32
|
|
func BLSIL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BLSIQ: Isolate Lowest Set Bit.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BLSIQ r64 r64
|
|
// BLSIQ m64 r64
|
|
func BLSIQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BLSMSKL: Mask From Lowest Set Bit.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BLSMSKL r32 r32
|
|
// BLSMSKL m32 r32
|
|
func BLSMSKL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BLSMSKQ: Mask From Lowest Set Bit.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BLSMSKQ r64 r64
|
|
// BLSMSKQ m64 r64
|
|
func BLSMSKQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BLSRL: Reset Lowest Set Bit.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BLSRL r32 r32
|
|
// BLSRL m32 r32
|
|
func BLSRL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BLSRQ: Reset Lowest Set Bit.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BLSRQ r64 r64
|
|
// BLSRQ m64 r64
|
|
func BLSRQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BSFL: Bit Scan Forward.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BSFL r32 r32
|
|
// BSFL m32 r32
|
|
func BSFL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BSFQ: Bit Scan Forward.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BSFQ r64 r64
|
|
// BSFQ m64 r64
|
|
func BSFQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BSFW: Bit Scan Forward.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BSFW r16 r16
|
|
// BSFW m16 r16
|
|
func BSFW(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BSRL: Bit Scan Reverse.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BSRL r32 r32
|
|
// BSRL m32 r32
|
|
func BSRL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BSRQ: Bit Scan Reverse.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BSRQ r64 r64
|
|
// BSRQ m64 r64
|
|
func BSRQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BSRW: Bit Scan Reverse.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BSRW r16 r16
|
|
// BSRW m16 r16
|
|
func BSRW(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BSWAPL: Byte Swap.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BSWAPL r32
|
|
func BSWAPL(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BSWAPQ: Byte Swap.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BSWAPQ r64
|
|
func BSWAPQ(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTCL: Bit Test and Complement.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTCL imm8 r32
|
|
// BTCL r32 r32
|
|
// BTCL imm8 m32
|
|
// BTCL r32 m32
|
|
func BTCL(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR32(mr):
|
|
case operand.IsR32(ir) && operand.IsR32(mr):
|
|
case operand.IsImm8(ir) && operand.IsM32(mr):
|
|
case operand.IsR32(ir) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTCQ: Bit Test and Complement.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTCQ imm8 r64
|
|
// BTCQ r64 r64
|
|
// BTCQ imm8 m64
|
|
// BTCQ r64 m64
|
|
func BTCQ(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR64(mr):
|
|
case operand.IsR64(ir) && operand.IsR64(mr):
|
|
case operand.IsImm8(ir) && operand.IsM64(mr):
|
|
case operand.IsR64(ir) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTCW: Bit Test and Complement.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTCW imm8 r16
|
|
// BTCW r16 r16
|
|
// BTCW imm8 m16
|
|
// BTCW r16 m16
|
|
func BTCW(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR16(mr):
|
|
case operand.IsR16(ir) && operand.IsR16(mr):
|
|
case operand.IsImm8(ir) && operand.IsM16(mr):
|
|
case operand.IsR16(ir) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTL: Bit Test.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTL imm8 r32
|
|
// BTL r32 r32
|
|
// BTL imm8 m32
|
|
// BTL r32 m32
|
|
func BTL(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR32(mr):
|
|
case operand.IsR32(ir) && operand.IsR32(mr):
|
|
case operand.IsImm8(ir) && operand.IsM32(mr):
|
|
case operand.IsR32(ir) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTQ: Bit Test.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTQ imm8 r64
|
|
// BTQ r64 r64
|
|
// BTQ imm8 m64
|
|
// BTQ r64 m64
|
|
func BTQ(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR64(mr):
|
|
case operand.IsR64(ir) && operand.IsR64(mr):
|
|
case operand.IsImm8(ir) && operand.IsM64(mr):
|
|
case operand.IsR64(ir) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTRL: Bit Test and Reset.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTRL imm8 r32
|
|
// BTRL r32 r32
|
|
// BTRL imm8 m32
|
|
// BTRL r32 m32
|
|
func BTRL(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR32(mr):
|
|
case operand.IsR32(ir) && operand.IsR32(mr):
|
|
case operand.IsImm8(ir) && operand.IsM32(mr):
|
|
case operand.IsR32(ir) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTRQ: Bit Test and Reset.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTRQ imm8 r64
|
|
// BTRQ r64 r64
|
|
// BTRQ imm8 m64
|
|
// BTRQ r64 m64
|
|
func BTRQ(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR64(mr):
|
|
case operand.IsR64(ir) && operand.IsR64(mr):
|
|
case operand.IsImm8(ir) && operand.IsM64(mr):
|
|
case operand.IsR64(ir) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTRW: Bit Test and Reset.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTRW imm8 r16
|
|
// BTRW r16 r16
|
|
// BTRW imm8 m16
|
|
// BTRW r16 m16
|
|
func BTRW(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR16(mr):
|
|
case operand.IsR16(ir) && operand.IsR16(mr):
|
|
case operand.IsImm8(ir) && operand.IsM16(mr):
|
|
case operand.IsR16(ir) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTSL: Bit Test and Set.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTSL imm8 r32
|
|
// BTSL r32 r32
|
|
// BTSL imm8 m32
|
|
// BTSL r32 m32
|
|
func BTSL(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR32(mr):
|
|
case operand.IsR32(ir) && operand.IsR32(mr):
|
|
case operand.IsImm8(ir) && operand.IsM32(mr):
|
|
case operand.IsR32(ir) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTSQ: Bit Test and Set.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTSQ imm8 r64
|
|
// BTSQ r64 r64
|
|
// BTSQ imm8 m64
|
|
// BTSQ r64 m64
|
|
func BTSQ(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR64(mr):
|
|
case operand.IsR64(ir) && operand.IsR64(mr):
|
|
case operand.IsImm8(ir) && operand.IsM64(mr):
|
|
case operand.IsR64(ir) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTSW: Bit Test and Set.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTSW imm8 r16
|
|
// BTSW r16 r16
|
|
// BTSW imm8 m16
|
|
// BTSW r16 m16
|
|
func BTSW(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR16(mr):
|
|
case operand.IsR16(ir) && operand.IsR16(mr):
|
|
case operand.IsImm8(ir) && operand.IsM16(mr):
|
|
case operand.IsR16(ir) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BTW: Bit Test.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BTW imm8 r16
|
|
// BTW r16 r16
|
|
// BTW imm8 m16
|
|
// BTW r16 m16
|
|
func BTW(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsR16(mr):
|
|
case operand.IsR16(ir) && operand.IsR16(mr):
|
|
case operand.IsImm8(ir) && operand.IsM16(mr):
|
|
case operand.IsR16(ir) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BZHIL: Zero High Bits Starting with Specified Bit Position.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BZHIL r32 r32 r32
|
|
// BZHIL r32 m32 r32
|
|
func BZHIL(r, mr, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r) && operand.IsR32(mr) && operand.IsR32(r1):
|
|
case operand.IsR32(r) && operand.IsM32(mr) && operand.IsR32(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// BZHIQ: Zero High Bits Starting with Specified Bit Position.
|
|
//
|
|
// Forms:
|
|
//
|
|
// BZHIQ r64 r64 r64
|
|
// BZHIQ r64 m64 r64
|
|
func BZHIQ(r, mr, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r) && operand.IsR64(mr) && operand.IsR64(r1):
|
|
case operand.IsR64(r) && operand.IsM64(mr) && operand.IsR64(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CALL: Call Procedure.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CALL rel32
|
|
func CALL(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CBW: Convert Byte to Word.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CBW
|
|
func CBW() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// CDQ: Convert Doubleword to Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CDQ
|
|
func CDQ() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// CDQE: Convert Doubleword to Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CDQE
|
|
func CDQE() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// CLC: Clear Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CLC
|
|
func CLC() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// CLD: Clear Direction Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CLD
|
|
func CLD() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// CLFLUSH: Flush Cache Line.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CLFLUSH m8
|
|
func CLFLUSH(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM8(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CLFLUSHOPT: Flush Cache Line Optimized.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CLFLUSHOPT m8
|
|
func CLFLUSHOPT(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM8(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMC: Complement Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMC
|
|
func CMC() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLCC: Move if above or equal (CF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLCC r32 r32
|
|
// CMOVLCC m32 r32
|
|
func CMOVLCC(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLCS: Move if below (CF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLCS r32 r32
|
|
// CMOVLCS m32 r32
|
|
func CMOVLCS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLEQ: Move if equal (ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLEQ r32 r32
|
|
// CMOVLEQ m32 r32
|
|
func CMOVLEQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLGE: Move if greater or equal (SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLGE r32 r32
|
|
// CMOVLGE m32 r32
|
|
func CMOVLGE(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLGT: Move if greater (ZF == 0 and SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLGT r32 r32
|
|
// CMOVLGT m32 r32
|
|
func CMOVLGT(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLHI: Move if above (CF == 0 and ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLHI r32 r32
|
|
// CMOVLHI m32 r32
|
|
func CMOVLHI(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLLE: Move if less or equal (ZF == 1 or SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLLE r32 r32
|
|
// CMOVLLE m32 r32
|
|
func CMOVLLE(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLLS: Move if below or equal (CF == 1 or ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLLS r32 r32
|
|
// CMOVLLS m32 r32
|
|
func CMOVLLS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLLT: Move if less (SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLLT r32 r32
|
|
// CMOVLLT m32 r32
|
|
func CMOVLLT(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLMI: Move if sign (SF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLMI r32 r32
|
|
// CMOVLMI m32 r32
|
|
func CMOVLMI(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLNE: Move if not equal (ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLNE r32 r32
|
|
// CMOVLNE m32 r32
|
|
func CMOVLNE(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLOC: Move if not overflow (OF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLOC r32 r32
|
|
// CMOVLOC m32 r32
|
|
func CMOVLOC(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLOS: Move if overflow (OF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLOS r32 r32
|
|
// CMOVLOS m32 r32
|
|
func CMOVLOS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLPC: Move if not parity (PF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLPC r32 r32
|
|
// CMOVLPC m32 r32
|
|
func CMOVLPC(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLPL: Move if not sign (SF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLPL r32 r32
|
|
// CMOVLPL m32 r32
|
|
func CMOVLPL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVLPS: Move if parity (PF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVLPS r32 r32
|
|
// CMOVLPS m32 r32
|
|
func CMOVLPS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQCC: Move if above or equal (CF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQCC r64 r64
|
|
// CMOVQCC m64 r64
|
|
func CMOVQCC(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQCS: Move if below (CF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQCS r64 r64
|
|
// CMOVQCS m64 r64
|
|
func CMOVQCS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQEQ: Move if equal (ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQEQ r64 r64
|
|
// CMOVQEQ m64 r64
|
|
func CMOVQEQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQGE: Move if greater or equal (SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQGE r64 r64
|
|
// CMOVQGE m64 r64
|
|
func CMOVQGE(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQGT: Move if greater (ZF == 0 and SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQGT r64 r64
|
|
// CMOVQGT m64 r64
|
|
func CMOVQGT(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQHI: Move if above (CF == 0 and ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQHI r64 r64
|
|
// CMOVQHI m64 r64
|
|
func CMOVQHI(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQLE: Move if less or equal (ZF == 1 or SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQLE r64 r64
|
|
// CMOVQLE m64 r64
|
|
func CMOVQLE(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQLS: Move if below or equal (CF == 1 or ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQLS r64 r64
|
|
// CMOVQLS m64 r64
|
|
func CMOVQLS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQLT: Move if less (SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQLT r64 r64
|
|
// CMOVQLT m64 r64
|
|
func CMOVQLT(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQMI: Move if sign (SF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQMI r64 r64
|
|
// CMOVQMI m64 r64
|
|
func CMOVQMI(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQNE: Move if not equal (ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQNE r64 r64
|
|
// CMOVQNE m64 r64
|
|
func CMOVQNE(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQOC: Move if not overflow (OF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQOC r64 r64
|
|
// CMOVQOC m64 r64
|
|
func CMOVQOC(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQOS: Move if overflow (OF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQOS r64 r64
|
|
// CMOVQOS m64 r64
|
|
func CMOVQOS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQPC: Move if not parity (PF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQPC r64 r64
|
|
// CMOVQPC m64 r64
|
|
func CMOVQPC(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQPL: Move if not sign (SF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQPL r64 r64
|
|
// CMOVQPL m64 r64
|
|
func CMOVQPL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVQPS: Move if parity (PF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVQPS r64 r64
|
|
// CMOVQPS m64 r64
|
|
func CMOVQPS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWCC: Move if above or equal (CF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWCC r16 r16
|
|
// CMOVWCC m16 r16
|
|
func CMOVWCC(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWCS: Move if below (CF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWCS r16 r16
|
|
// CMOVWCS m16 r16
|
|
func CMOVWCS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWEQ: Move if equal (ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWEQ r16 r16
|
|
// CMOVWEQ m16 r16
|
|
func CMOVWEQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWGE: Move if greater or equal (SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWGE r16 r16
|
|
// CMOVWGE m16 r16
|
|
func CMOVWGE(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWGT: Move if greater (ZF == 0 and SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWGT r16 r16
|
|
// CMOVWGT m16 r16
|
|
func CMOVWGT(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWHI: Move if above (CF == 0 and ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWHI r16 r16
|
|
// CMOVWHI m16 r16
|
|
func CMOVWHI(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWLE: Move if less or equal (ZF == 1 or SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWLE r16 r16
|
|
// CMOVWLE m16 r16
|
|
func CMOVWLE(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWLS: Move if below or equal (CF == 1 or ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWLS r16 r16
|
|
// CMOVWLS m16 r16
|
|
func CMOVWLS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWLT: Move if less (SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWLT r16 r16
|
|
// CMOVWLT m16 r16
|
|
func CMOVWLT(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWMI: Move if sign (SF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWMI r16 r16
|
|
// CMOVWMI m16 r16
|
|
func CMOVWMI(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWNE: Move if not equal (ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWNE r16 r16
|
|
// CMOVWNE m16 r16
|
|
func CMOVWNE(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWOC: Move if not overflow (OF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWOC r16 r16
|
|
// CMOVWOC m16 r16
|
|
func CMOVWOC(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWOS: Move if overflow (OF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWOS r16 r16
|
|
// CMOVWOS m16 r16
|
|
func CMOVWOS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWPC: Move if not parity (PF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWPC r16 r16
|
|
// CMOVWPC m16 r16
|
|
func CMOVWPC(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWPL: Move if not sign (SF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWPL r16 r16
|
|
// CMOVWPL m16 r16
|
|
func CMOVWPL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMOVWPS: Move if parity (PF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMOVWPS r16 r16
|
|
// CMOVWPS m16 r16
|
|
func CMOVWPS(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPB: Compare Two Operands.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPB al imm8
|
|
// CMPB r8 imm8
|
|
// CMPB r8 r8
|
|
// CMPB r8 m8
|
|
// CMPB m8 imm8
|
|
// CMPB m8 r8
|
|
func CMPB(amr, imr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsAl(amr) && operand.IsImm8(imr):
|
|
case operand.IsR8(amr) && operand.IsImm8(imr):
|
|
case operand.IsR8(amr) && operand.IsR8(imr):
|
|
case operand.IsR8(amr) && operand.IsM8(imr):
|
|
case operand.IsM8(amr) && operand.IsImm8(imr):
|
|
case operand.IsM8(amr) && operand.IsR8(imr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPL: Compare Two Operands.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPL eax imm32
|
|
// CMPL r32 imm8
|
|
// CMPL r32 imm32
|
|
// CMPL r32 r32
|
|
// CMPL r32 m32
|
|
// CMPL m32 imm8
|
|
// CMPL m32 imm32
|
|
// CMPL m32 r32
|
|
func CMPL(emr, imr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsEax(emr) && operand.IsImm32(imr):
|
|
case operand.IsR32(emr) && operand.IsImm8(imr):
|
|
case operand.IsR32(emr) && operand.IsImm32(imr):
|
|
case operand.IsR32(emr) && operand.IsR32(imr):
|
|
case operand.IsR32(emr) && operand.IsM32(imr):
|
|
case operand.IsM32(emr) && operand.IsImm8(imr):
|
|
case operand.IsM32(emr) && operand.IsImm32(imr):
|
|
case operand.IsM32(emr) && operand.IsR32(imr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPPD: Compare Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPPD xmm xmm imm8
|
|
// CMPPD m128 xmm imm8
|
|
func CMPPD(mx, x, i avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsImm8(i):
|
|
case operand.IsM128(mx) && operand.IsXmm(x) && operand.IsImm8(i):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPPS: Compare Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPPS xmm xmm imm8
|
|
// CMPPS m128 xmm imm8
|
|
func CMPPS(mx, x, i avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsImm8(i):
|
|
case operand.IsM128(mx) && operand.IsXmm(x) && operand.IsImm8(i):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPQ: Compare Two Operands.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPQ rax imm32
|
|
// CMPQ r64 imm8
|
|
// CMPQ r64 imm32
|
|
// CMPQ r64 r64
|
|
// CMPQ r64 m64
|
|
// CMPQ m64 imm8
|
|
// CMPQ m64 imm32
|
|
// CMPQ m64 r64
|
|
func CMPQ(mr, imr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRax(mr) && operand.IsImm32(imr):
|
|
case operand.IsR64(mr) && operand.IsImm8(imr):
|
|
case operand.IsR64(mr) && operand.IsImm32(imr):
|
|
case operand.IsR64(mr) && operand.IsR64(imr):
|
|
case operand.IsR64(mr) && operand.IsM64(imr):
|
|
case operand.IsM64(mr) && operand.IsImm8(imr):
|
|
case operand.IsM64(mr) && operand.IsImm32(imr):
|
|
case operand.IsM64(mr) && operand.IsR64(imr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPSD: Compare Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPSD xmm xmm imm8
|
|
// CMPSD m64 xmm imm8
|
|
func CMPSD(mx, x, i avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsImm8(i):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsImm8(i):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPSS: Compare Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPSS xmm xmm imm8
|
|
// CMPSS m32 xmm imm8
|
|
func CMPSS(mx, x, i avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsImm8(i):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsImm8(i):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPW: Compare Two Operands.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPW ax imm16
|
|
// CMPW r16 imm8
|
|
// CMPW r16 imm16
|
|
// CMPW r16 r16
|
|
// CMPW r16 m16
|
|
// CMPW m16 imm8
|
|
// CMPW m16 imm16
|
|
// CMPW m16 r16
|
|
func CMPW(amr, imr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsAx(amr) && operand.IsImm16(imr):
|
|
case operand.IsR16(amr) && operand.IsImm8(imr):
|
|
case operand.IsR16(amr) && operand.IsImm16(imr):
|
|
case operand.IsR16(amr) && operand.IsR16(imr):
|
|
case operand.IsR16(amr) && operand.IsM16(imr):
|
|
case operand.IsM16(amr) && operand.IsImm8(imr):
|
|
case operand.IsM16(amr) && operand.IsImm16(imr):
|
|
case operand.IsM16(amr) && operand.IsR16(imr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPXCHG16B: Compare and Exchange 16 Bytes.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPXCHG16B m128
|
|
func CMPXCHG16B(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPXCHG8B: Compare and Exchange 8 Bytes.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPXCHG8B m64
|
|
func CMPXCHG8B(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM64(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPXCHGB: Compare and Exchange.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPXCHGB r8 r8
|
|
// CMPXCHGB r8 m8
|
|
func CMPXCHGB(r, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(r) && operand.IsR8(mr):
|
|
case operand.IsR8(r) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPXCHGL: Compare and Exchange.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPXCHGL r32 r32
|
|
// CMPXCHGL r32 m32
|
|
func CMPXCHGL(r, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r) && operand.IsR32(mr):
|
|
case operand.IsR32(r) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPXCHGQ: Compare and Exchange.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPXCHGQ r64 r64
|
|
// CMPXCHGQ r64 m64
|
|
func CMPXCHGQ(r, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r) && operand.IsR64(mr):
|
|
case operand.IsR64(r) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CMPXCHGW: Compare and Exchange.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CMPXCHGW r16 r16
|
|
// CMPXCHGW r16 m16
|
|
func CMPXCHGW(r, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(r) && operand.IsR16(mr):
|
|
case operand.IsR16(r) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// COMISD: Compare Scalar Ordered Double-Precision Floating-Point Values and Set EFLAGS.
|
|
//
|
|
// Forms:
|
|
//
|
|
// COMISD xmm xmm
|
|
// COMISD m64 xmm
|
|
func COMISD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// COMISS: Compare Scalar Ordered Single-Precision Floating-Point Values and Set EFLAGS.
|
|
//
|
|
// Forms:
|
|
//
|
|
// COMISS xmm xmm
|
|
// COMISS m32 xmm
|
|
func COMISS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CPUID: CPU Identification.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CPUID
|
|
func CPUID() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// CQO: Convert Quadword to Octaword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CQO
|
|
func CQO() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// CRC32B: Accumulate CRC32 Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CRC32B r8 r32
|
|
// CRC32B m8 r32
|
|
// CRC32B r8 r64
|
|
// CRC32B m8 r64
|
|
func CRC32B(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr) && operand.IsR32(r):
|
|
case operand.IsM8(mr) && operand.IsR32(r):
|
|
case operand.IsR8(mr) && operand.IsR64(r):
|
|
case operand.IsM8(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CRC32L: Accumulate CRC32 Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CRC32L r32 r32
|
|
// CRC32L m32 r32
|
|
func CRC32L(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CRC32Q: Accumulate CRC32 Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CRC32Q r64 r64
|
|
// CRC32Q m64 r64
|
|
func CRC32Q(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CRC32W: Accumulate CRC32 Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CRC32W r16 r32
|
|
// CRC32W m16 r32
|
|
func CRC32W(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR32(r):
|
|
case operand.IsM16(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTPD2PL: Convert Packed Double-Precision FP Values to Packed Dword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTPD2PL xmm xmm
|
|
// CVTPD2PL m128 xmm
|
|
func CVTPD2PL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTPD2PS: Convert Packed Double-Precision FP Values to Packed Single-Precision FP Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTPD2PS xmm xmm
|
|
// CVTPD2PS m128 xmm
|
|
func CVTPD2PS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTPL2PD: Convert Packed Dword Integers to Packed Double-Precision FP Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTPL2PD xmm xmm
|
|
// CVTPL2PD m64 xmm
|
|
// CVTPL2PD m64 xmm
|
|
func CVTPL2PD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTPL2PS: Convert Packed Dword Integers to Packed Single-Precision FP Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTPL2PS xmm xmm
|
|
// CVTPL2PS m128 xmm
|
|
func CVTPL2PS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTPS2PD: Convert Packed Single-Precision FP Values to Packed Double-Precision FP Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTPS2PD xmm xmm
|
|
// CVTPS2PD m64 xmm
|
|
func CVTPS2PD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTPS2PL: Convert Packed Single-Precision FP Values to Packed Dword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTPS2PL xmm xmm
|
|
// CVTPS2PL m128 xmm
|
|
func CVTPS2PL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTSD2SL: Convert Scalar Double-Precision FP Value to Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTSD2SL xmm r32
|
|
// CVTSD2SL m64 r32
|
|
// CVTSD2SL xmm r64
|
|
// CVTSD2SL m64 r64
|
|
func CVTSD2SL(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR32(r):
|
|
case operand.IsM64(mx) && operand.IsR32(r):
|
|
case operand.IsXmm(mx) && operand.IsR64(r):
|
|
case operand.IsM64(mx) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTSD2SS: Convert Scalar Double-Precision FP Value to Scalar Single-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTSD2SS xmm xmm
|
|
// CVTSD2SS m64 xmm
|
|
func CVTSD2SS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTSL2SD: Convert Dword Integer to Scalar Double-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTSL2SD r32 xmm
|
|
// CVTSL2SD m32 xmm
|
|
func CVTSL2SD(mr, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsXmm(x):
|
|
case operand.IsM32(mr) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTSL2SS: Convert Dword Integer to Scalar Single-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTSL2SS r32 xmm
|
|
// CVTSL2SS m32 xmm
|
|
func CVTSL2SS(mr, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsXmm(x):
|
|
case operand.IsM32(mr) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTSQ2SD: Convert Dword Integer to Scalar Double-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTSQ2SD r64 xmm
|
|
// CVTSQ2SD m64 xmm
|
|
func CVTSQ2SD(mr, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsXmm(x):
|
|
case operand.IsM64(mr) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTSQ2SS: Convert Dword Integer to Scalar Single-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTSQ2SS r64 xmm
|
|
// CVTSQ2SS m64 xmm
|
|
func CVTSQ2SS(mr, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsXmm(x):
|
|
case operand.IsM64(mr) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTSS2SD: Convert Scalar Single-Precision FP Value to Scalar Double-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTSS2SD xmm xmm
|
|
// CVTSS2SD m32 xmm
|
|
func CVTSS2SD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTSS2SL: Convert Scalar Single-Precision FP Value to Dword Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTSS2SL xmm r32
|
|
// CVTSS2SL m32 r32
|
|
// CVTSS2SL xmm r64
|
|
// CVTSS2SL m32 r64
|
|
func CVTSS2SL(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR32(r):
|
|
case operand.IsM32(mx) && operand.IsR32(r):
|
|
case operand.IsXmm(mx) && operand.IsR64(r):
|
|
case operand.IsM32(mx) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTTPD2PL: Convert with Truncation Packed Double-Precision FP Values to Packed Dword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTTPD2PL xmm xmm
|
|
// CVTTPD2PL m128 xmm
|
|
func CVTTPD2PL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTTPS2PL: Convert with Truncation Packed Single-Precision FP Values to Packed Dword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTTPS2PL xmm xmm
|
|
// CVTTPS2PL m128 xmm
|
|
func CVTTPS2PL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTTSD2SL: Convert with Truncation Scalar Double-Precision FP Value to Signed Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTTSD2SL xmm r32
|
|
// CVTTSD2SL m64 r32
|
|
func CVTTSD2SL(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR32(r):
|
|
case operand.IsM64(mx) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTTSD2SQ: Convert with Truncation Scalar Double-Precision FP Value to Signed Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTTSD2SQ xmm r64
|
|
// CVTTSD2SQ m64 r64
|
|
func CVTTSD2SQ(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR64(r):
|
|
case operand.IsM64(mx) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CVTTSS2SL: Convert with Truncation Scalar Single-Precision FP Value to Dword Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CVTTSS2SL xmm r32
|
|
// CVTTSS2SL m32 r32
|
|
// CVTTSS2SL xmm r64
|
|
// CVTTSS2SL m32 r64
|
|
func CVTTSS2SL(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR32(r):
|
|
case operand.IsM32(mx) && operand.IsR32(r):
|
|
case operand.IsXmm(mx) && operand.IsR64(r):
|
|
case operand.IsM32(mx) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// CWD: Convert Word to Doubleword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CWD
|
|
func CWD() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// CWDE: Convert Word to Doubleword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// CWDE
|
|
func CWDE() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// DECB: Decrement by 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DECB r8
|
|
// DECB m8
|
|
func DECB(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DECL: Decrement by 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DECL r32
|
|
// DECL m32
|
|
func DECL(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr):
|
|
case operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DECQ: Decrement by 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DECQ r64
|
|
// DECQ m64
|
|
func DECQ(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr):
|
|
case operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DECW: Decrement by 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DECW r16
|
|
// DECW m16
|
|
func DECW(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr):
|
|
case operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DIVB: Unsigned Divide.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DIVB r8
|
|
// DIVB m8
|
|
func DIVB(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DIVL: Unsigned Divide.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DIVL r32
|
|
// DIVL m32
|
|
func DIVL(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr):
|
|
case operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DIVPD: Divide Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DIVPD xmm xmm
|
|
// DIVPD m128 xmm
|
|
func DIVPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DIVPS: Divide Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DIVPS xmm xmm
|
|
// DIVPS m128 xmm
|
|
func DIVPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DIVQ: Unsigned Divide.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DIVQ r64
|
|
// DIVQ m64
|
|
func DIVQ(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr):
|
|
case operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DIVSD: Divide Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DIVSD xmm xmm
|
|
// DIVSD m64 xmm
|
|
func DIVSD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DIVSS: Divide Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DIVSS xmm xmm
|
|
// DIVSS m32 xmm
|
|
func DIVSS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DIVW: Unsigned Divide.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DIVW r16
|
|
// DIVW m16
|
|
func DIVW(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr):
|
|
case operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DPPD: Dot Product of Packed Double Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DPPD imm8 xmm xmm
|
|
// DPPD imm8 m128 xmm
|
|
func DPPD(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// DPPS: Dot Product of Packed Single Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// DPPS imm8 xmm xmm
|
|
// DPPS imm8 m128 xmm
|
|
func DPPS(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// EXTRACTPS: Extract Packed Single Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// EXTRACTPS imm2u xmm r32
|
|
// EXTRACTPS imm2u xmm m32
|
|
func EXTRACTPS(i, x, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm2u(i) && operand.IsXmm(x) && operand.IsR32(mr):
|
|
case operand.IsImm2u(i) && operand.IsXmm(x) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// HADDPD: Packed Double-FP Horizontal Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// HADDPD xmm xmm
|
|
// HADDPD m128 xmm
|
|
func HADDPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// HADDPS: Packed Single-FP Horizontal Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// HADDPS xmm xmm
|
|
// HADDPS m128 xmm
|
|
func HADDPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// HSUBPD: Packed Double-FP Horizontal Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// HSUBPD xmm xmm
|
|
// HSUBPD m128 xmm
|
|
func HSUBPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// HSUBPS: Packed Single-FP Horizontal Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// HSUBPS xmm xmm
|
|
// HSUBPS m128 xmm
|
|
func HSUBPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IDIVB: Signed Divide.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IDIVB r8
|
|
// IDIVB m8
|
|
func IDIVB(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IDIVL: Signed Divide.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IDIVL r32
|
|
// IDIVL m32
|
|
func IDIVL(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr):
|
|
case operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IDIVQ: Signed Divide.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IDIVQ r64
|
|
// IDIVQ m64
|
|
func IDIVQ(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr):
|
|
case operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IDIVW: Signed Divide.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IDIVW r16
|
|
// IDIVW m16
|
|
func IDIVW(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr):
|
|
case operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IMUL3L: Signed Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IMUL3L imm8 r32 r32
|
|
// IMUL3L imm32 r32 r32
|
|
// IMUL3L imm8 m32 r32
|
|
// IMUL3L imm32 m32 r32
|
|
func IMUL3L(i, mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsImm32(i) && operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsImm8(i) && operand.IsM32(mr) && operand.IsR32(r):
|
|
case operand.IsImm32(i) && operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IMUL3Q: Signed Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IMUL3Q imm8 r64 r64
|
|
// IMUL3Q imm32 r64 r64
|
|
// IMUL3Q imm8 m64 r64
|
|
// IMUL3Q imm32 m64 r64
|
|
func IMUL3Q(i, mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsImm32(i) && operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsImm8(i) && operand.IsM64(mr) && operand.IsR64(r):
|
|
case operand.IsImm32(i) && operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IMUL3W: Signed Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IMUL3W imm8 r16 r16
|
|
// IMUL3W imm16 r16 r16
|
|
// IMUL3W imm8 m16 r16
|
|
// IMUL3W imm16 m16 r16
|
|
func IMUL3W(i, mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsImm16(i) && operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsImm8(i) && operand.IsM16(mr) && operand.IsR16(r):
|
|
case operand.IsImm16(i) && operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IMULB: Signed Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IMULB r8
|
|
// IMULB m8
|
|
func IMULB(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IMULL: Signed Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IMULL r32
|
|
// IMULL m32
|
|
// IMULL r32 r32
|
|
// IMULL m32 r32
|
|
func IMULL(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 1 && operand.IsR32(ops[0]):
|
|
case len(ops) == 1 && operand.IsM32(ops[0]):
|
|
case len(ops) == 2 && operand.IsR32(ops[0]) && operand.IsR32(ops[1]):
|
|
case len(ops) == 2 && operand.IsM32(ops[0]) && operand.IsR32(ops[1]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IMULQ: Signed Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IMULQ r64
|
|
// IMULQ m64
|
|
// IMULQ r64 r64
|
|
// IMULQ m64 r64
|
|
func IMULQ(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 1 && operand.IsR64(ops[0]):
|
|
case len(ops) == 1 && operand.IsM64(ops[0]):
|
|
case len(ops) == 2 && operand.IsR64(ops[0]) && operand.IsR64(ops[1]):
|
|
case len(ops) == 2 && operand.IsM64(ops[0]) && operand.IsR64(ops[1]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// IMULW: Signed Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// IMULW r16
|
|
// IMULW m16
|
|
// IMULW r16 r16
|
|
// IMULW m16 r16
|
|
func IMULW(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 1 && operand.IsR16(ops[0]):
|
|
case len(ops) == 1 && operand.IsM16(ops[0]):
|
|
case len(ops) == 2 && operand.IsR16(ops[0]) && operand.IsR16(ops[1]):
|
|
case len(ops) == 2 && operand.IsM16(ops[0]) && operand.IsR16(ops[1]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// INCB: Increment by 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// INCB r8
|
|
// INCB m8
|
|
func INCB(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// INCL: Increment by 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// INCL r32
|
|
// INCL m32
|
|
func INCL(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr):
|
|
case operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// INCQ: Increment by 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// INCQ r64
|
|
// INCQ m64
|
|
func INCQ(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr):
|
|
case operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// INCW: Increment by 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// INCW r16
|
|
// INCW m16
|
|
func INCW(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr):
|
|
case operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// INSERTPS: Insert Packed Single Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// INSERTPS imm8 xmm xmm
|
|
// INSERTPS imm8 m32 xmm
|
|
func INSERTPS(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// INT: Call to Interrupt Procedure.
|
|
//
|
|
// Forms:
|
|
//
|
|
// INT 3
|
|
// INT imm8
|
|
func INT(i avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is3(i):
|
|
case operand.IsImm8(i):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JA: Jump if above (CF == 0 and ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JA rel8
|
|
// JA rel32
|
|
// JA rel8
|
|
// JA rel32
|
|
func JA(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JAE: Jump if above or equal (CF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JAE rel8
|
|
// JAE rel32
|
|
// JAE rel8
|
|
// JAE rel32
|
|
// JAE rel8
|
|
// JAE rel32
|
|
func JAE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JB: Jump if below (CF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JB rel8
|
|
// JB rel32
|
|
// JB rel8
|
|
// JB rel32
|
|
// JB rel8
|
|
// JB rel32
|
|
func JB(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JBE: Jump if below or equal (CF == 1 or ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JBE rel8
|
|
// JBE rel32
|
|
// JBE rel8
|
|
// JBE rel32
|
|
func JBE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JC: Jump if below (CF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JC rel8
|
|
// JC rel32
|
|
// JC rel8
|
|
// JC rel32
|
|
// JC rel8
|
|
// JC rel32
|
|
func JC(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JCC: Jump if above or equal (CF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JCC rel8
|
|
// JCC rel32
|
|
// JCC rel8
|
|
// JCC rel32
|
|
// JCC rel8
|
|
// JCC rel32
|
|
func JCC(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JCS: Jump if below (CF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JCS rel8
|
|
// JCS rel32
|
|
// JCS rel8
|
|
// JCS rel32
|
|
// JCS rel8
|
|
// JCS rel32
|
|
func JCS(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JCXZL: Jump if ECX register is 0.
|
|
//
|
|
// Forms:
|
|
//
|
|
// JCXZL rel8
|
|
func JCXZL(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JCXZQ: Jump if RCX register is 0.
|
|
//
|
|
// Forms:
|
|
//
|
|
// JCXZQ rel8
|
|
func JCXZQ(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JE: Jump if equal (ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JE rel8
|
|
// JE rel32
|
|
// JE rel8
|
|
// JE rel32
|
|
func JE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JEQ: Jump if equal (ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JEQ rel8
|
|
// JEQ rel32
|
|
// JEQ rel8
|
|
// JEQ rel32
|
|
func JEQ(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JG: Jump if greater (ZF == 0 and SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JG rel8
|
|
// JG rel32
|
|
// JG rel8
|
|
// JG rel32
|
|
func JG(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JGE: Jump if greater or equal (SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JGE rel8
|
|
// JGE rel32
|
|
// JGE rel8
|
|
// JGE rel32
|
|
func JGE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JGT: Jump if greater (ZF == 0 and SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JGT rel8
|
|
// JGT rel32
|
|
// JGT rel8
|
|
// JGT rel32
|
|
func JGT(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JHI: Jump if above (CF == 0 and ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JHI rel8
|
|
// JHI rel32
|
|
// JHI rel8
|
|
// JHI rel32
|
|
func JHI(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JHS: Jump if above or equal (CF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JHS rel8
|
|
// JHS rel32
|
|
// JHS rel8
|
|
// JHS rel32
|
|
// JHS rel8
|
|
// JHS rel32
|
|
func JHS(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JL: Jump if less (SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JL rel8
|
|
// JL rel32
|
|
// JL rel8
|
|
// JL rel32
|
|
func JL(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JLE: Jump if less or equal (ZF == 1 or SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JLE rel8
|
|
// JLE rel32
|
|
// JLE rel8
|
|
// JLE rel32
|
|
func JLE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JLO: Jump if below (CF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JLO rel8
|
|
// JLO rel32
|
|
// JLO rel8
|
|
// JLO rel32
|
|
// JLO rel8
|
|
// JLO rel32
|
|
func JLO(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JLS: Jump if below or equal (CF == 1 or ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JLS rel8
|
|
// JLS rel32
|
|
// JLS rel8
|
|
// JLS rel32
|
|
func JLS(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JLT: Jump if less (SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JLT rel8
|
|
// JLT rel32
|
|
// JLT rel8
|
|
// JLT rel32
|
|
func JLT(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JMI: Jump if sign (SF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JMI rel8
|
|
// JMI rel32
|
|
func JMI(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JMP: Jump Unconditionally.
|
|
//
|
|
// Forms:
|
|
//
|
|
// JMP rel8
|
|
// JMP rel32
|
|
// JMP r64
|
|
// JMP m64
|
|
func JMP(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(mr):
|
|
case operand.IsRel32(mr):
|
|
case operand.IsR64(mr):
|
|
case operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNA: Jump if below or equal (CF == 1 or ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNA rel8
|
|
// JNA rel32
|
|
// JNA rel8
|
|
// JNA rel32
|
|
func JNA(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNAE: Jump if below (CF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNAE rel8
|
|
// JNAE rel32
|
|
// JNAE rel8
|
|
// JNAE rel32
|
|
// JNAE rel8
|
|
// JNAE rel32
|
|
func JNAE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNB: Jump if above or equal (CF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNB rel8
|
|
// JNB rel32
|
|
// JNB rel8
|
|
// JNB rel32
|
|
// JNB rel8
|
|
// JNB rel32
|
|
func JNB(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNBE: Jump if above (CF == 0 and ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNBE rel8
|
|
// JNBE rel32
|
|
// JNBE rel8
|
|
// JNBE rel32
|
|
func JNBE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNC: Jump if above or equal (CF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNC rel8
|
|
// JNC rel32
|
|
// JNC rel8
|
|
// JNC rel32
|
|
// JNC rel8
|
|
// JNC rel32
|
|
func JNC(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNE: Jump if not equal (ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNE rel8
|
|
// JNE rel32
|
|
// JNE rel8
|
|
// JNE rel32
|
|
func JNE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNG: Jump if less or equal (ZF == 1 or SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNG rel8
|
|
// JNG rel32
|
|
// JNG rel8
|
|
// JNG rel32
|
|
func JNG(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNGE: Jump if less (SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNGE rel8
|
|
// JNGE rel32
|
|
// JNGE rel8
|
|
// JNGE rel32
|
|
func JNGE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNL: Jump if greater or equal (SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNL rel8
|
|
// JNL rel32
|
|
// JNL rel8
|
|
// JNL rel32
|
|
func JNL(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNLE: Jump if greater (ZF == 0 and SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNLE rel8
|
|
// JNLE rel32
|
|
// JNLE rel8
|
|
// JNLE rel32
|
|
func JNLE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNO: Jump if not overflow (OF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNO rel8
|
|
// JNO rel32
|
|
func JNO(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNP: Jump if not parity (PF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNP rel8
|
|
// JNP rel32
|
|
// JNP rel8
|
|
// JNP rel32
|
|
func JNP(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNS: Jump if not sign (SF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNS rel8
|
|
// JNS rel32
|
|
func JNS(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JNZ: Jump if not equal (ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JNZ rel8
|
|
// JNZ rel32
|
|
// JNZ rel8
|
|
// JNZ rel32
|
|
func JNZ(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JO: Jump if overflow (OF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JO rel8
|
|
// JO rel32
|
|
func JO(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JOC: Jump if not overflow (OF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JOC rel8
|
|
// JOC rel32
|
|
func JOC(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JOS: Jump if overflow (OF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JOS rel8
|
|
// JOS rel32
|
|
func JOS(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JP: Jump if parity (PF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JP rel8
|
|
// JP rel32
|
|
// JP rel8
|
|
// JP rel32
|
|
func JP(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JPC: Jump if not parity (PF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JPC rel8
|
|
// JPC rel32
|
|
// JPC rel8
|
|
// JPC rel32
|
|
func JPC(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JPE: Jump if parity (PF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JPE rel8
|
|
// JPE rel32
|
|
// JPE rel8
|
|
// JPE rel32
|
|
func JPE(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JPL: Jump if not sign (SF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JPL rel8
|
|
// JPL rel32
|
|
func JPL(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JPO: Jump if not parity (PF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JPO rel8
|
|
// JPO rel32
|
|
// JPO rel8
|
|
// JPO rel32
|
|
func JPO(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JPS: Jump if parity (PF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JPS rel8
|
|
// JPS rel32
|
|
// JPS rel8
|
|
// JPS rel32
|
|
func JPS(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JS: Jump if sign (SF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JS rel8
|
|
// JS rel32
|
|
func JS(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// JZ: Jump if equal (ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// JZ rel8
|
|
// JZ rel32
|
|
// JZ rel8
|
|
// JZ rel32
|
|
func JZ(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
case operand.IsRel8(r):
|
|
case operand.IsRel32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// LDDQU: Load Unaligned Integer 128 Bits.
|
|
//
|
|
// Forms:
|
|
//
|
|
// LDDQU m128 xmm
|
|
func LDDQU(m, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(m) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// LDMXCSR: Load MXCSR Register.
|
|
//
|
|
// Forms:
|
|
//
|
|
// LDMXCSR m32
|
|
func LDMXCSR(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM32(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// LEAL: Load Effective Address.
|
|
//
|
|
// Forms:
|
|
//
|
|
// LEAL m r32
|
|
func LEAL(m, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM(m) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// LEAQ: Load Effective Address.
|
|
//
|
|
// Forms:
|
|
//
|
|
// LEAQ m r64
|
|
func LEAQ(m, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM(m) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// LEAW: Load Effective Address.
|
|
//
|
|
// Forms:
|
|
//
|
|
// LEAW m r16
|
|
func LEAW(m, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM(m) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// LFENCE: Load Fence.
|
|
//
|
|
// Forms:
|
|
//
|
|
// LFENCE
|
|
func LFENCE() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// LZCNTL: Count the Number of Leading Zero Bits.
|
|
//
|
|
// Forms:
|
|
//
|
|
// LZCNTL r32 r32
|
|
// LZCNTL m32 r32
|
|
func LZCNTL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// LZCNTQ: Count the Number of Leading Zero Bits.
|
|
//
|
|
// Forms:
|
|
//
|
|
// LZCNTQ r64 r64
|
|
// LZCNTQ m64 r64
|
|
func LZCNTQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// LZCNTW: Count the Number of Leading Zero Bits.
|
|
//
|
|
// Forms:
|
|
//
|
|
// LZCNTW r16 r16
|
|
// LZCNTW m16 r16
|
|
func LZCNTW(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MASKMOVDQU: Store Selected Bytes of Double Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MASKMOVDQU xmm xmm
|
|
func MASKMOVDQU(x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MASKMOVOU: Store Selected Bytes of Double Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MASKMOVOU xmm xmm
|
|
func MASKMOVOU(x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MAXPD: Return Maximum Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MAXPD xmm xmm
|
|
// MAXPD m128 xmm
|
|
func MAXPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MAXPS: Return Maximum Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MAXPS xmm xmm
|
|
// MAXPS m128 xmm
|
|
func MAXPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MAXSD: Return Maximum Scalar Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MAXSD xmm xmm
|
|
// MAXSD m64 xmm
|
|
func MAXSD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MAXSS: Return Maximum Scalar Single-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MAXSS xmm xmm
|
|
// MAXSS m32 xmm
|
|
func MAXSS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MFENCE: Memory Fence.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MFENCE
|
|
func MFENCE() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// MINPD: Return Minimum Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MINPD xmm xmm
|
|
// MINPD m128 xmm
|
|
func MINPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MINPS: Return Minimum Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MINPS xmm xmm
|
|
// MINPS m128 xmm
|
|
func MINPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MINSD: Return Minimum Scalar Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MINSD xmm xmm
|
|
// MINSD m64 xmm
|
|
func MINSD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MINSS: Return Minimum Scalar Single-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MINSS xmm xmm
|
|
// MINSS m32 xmm
|
|
func MINSS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MONITOR: Monitor a Linear Address Range.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MONITOR
|
|
func MONITOR() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVAPD: Move Aligned Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVAPD xmm xmm
|
|
// MOVAPD m128 xmm
|
|
// MOVAPD xmm m128
|
|
func MOVAPD(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(mx1):
|
|
case operand.IsM128(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM128(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVAPS: Move Aligned Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVAPS xmm xmm
|
|
// MOVAPS m128 xmm
|
|
// MOVAPS xmm m128
|
|
func MOVAPS(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(mx1):
|
|
case operand.IsM128(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM128(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVB: Move.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVB imm8 r8
|
|
// MOVB r8 r8
|
|
// MOVB m8 r8
|
|
// MOVB imm8 m8
|
|
// MOVB r8 m8
|
|
func MOVB(imr, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imr) && operand.IsR8(mr):
|
|
case operand.IsR8(imr) && operand.IsR8(mr):
|
|
case operand.IsM8(imr) && operand.IsR8(mr):
|
|
case operand.IsImm8(imr) && operand.IsM8(mr):
|
|
case operand.IsR8(imr) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVBELL: Move Data After Swapping Bytes.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVBELL m32 r32
|
|
// MOVBELL r32 m32
|
|
func MOVBELL(mr, mr1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM32(mr) && operand.IsR32(mr1):
|
|
case operand.IsR32(mr) && operand.IsM32(mr1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVBEQQ: Move Data After Swapping Bytes.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVBEQQ m64 r64
|
|
// MOVBEQQ r64 m64
|
|
func MOVBEQQ(mr, mr1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM64(mr) && operand.IsR64(mr1):
|
|
case operand.IsR64(mr) && operand.IsM64(mr1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVBEWW: Move Data After Swapping Bytes.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVBEWW m16 r16
|
|
// MOVBEWW r16 m16
|
|
func MOVBEWW(mr, mr1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM16(mr) && operand.IsR16(mr1):
|
|
case operand.IsR16(mr) && operand.IsM16(mr1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVBLSX: Move with Sign-Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVBLSX r8 r32
|
|
// MOVBLSX m8 r32
|
|
func MOVBLSX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr) && operand.IsR32(r):
|
|
case operand.IsM8(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVBLZX: Move with Zero-Extend.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVBLZX r8 r32
|
|
// MOVBLZX m8 r32
|
|
func MOVBLZX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr) && operand.IsR32(r):
|
|
case operand.IsM8(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVBQSX: Move with Sign-Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVBQSX r8 r64
|
|
// MOVBQSX m8 r64
|
|
func MOVBQSX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr) && operand.IsR64(r):
|
|
case operand.IsM8(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVBQZX: Move with Zero-Extend.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVBQZX r8 r64
|
|
// MOVBQZX m8 r64
|
|
func MOVBQZX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr) && operand.IsR64(r):
|
|
case operand.IsM8(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVBWSX: Move with Sign-Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVBWSX r8 r16
|
|
// MOVBWSX m8 r16
|
|
func MOVBWSX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr) && operand.IsR16(r):
|
|
case operand.IsM8(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVBWZX: Move with Zero-Extend.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVBWZX r8 r16
|
|
// MOVBWZX m8 r16
|
|
func MOVBWZX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr) && operand.IsR16(r):
|
|
case operand.IsM8(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVD: Move.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVD imm32 r64
|
|
// MOVD imm64 r64
|
|
// MOVD r64 r64
|
|
// MOVD m64 r64
|
|
// MOVD imm32 m64
|
|
// MOVD r64 m64
|
|
// MOVD xmm r64
|
|
// MOVD r64 xmm
|
|
// MOVD xmm xmm
|
|
// MOVD m64 xmm
|
|
// MOVD xmm m64
|
|
func MOVD(imrx, mrx avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imrx) && operand.IsR64(mrx):
|
|
case operand.IsImm64(imrx) && operand.IsR64(mrx):
|
|
case operand.IsR64(imrx) && operand.IsR64(mrx):
|
|
case operand.IsM64(imrx) && operand.IsR64(mrx):
|
|
case operand.IsImm32(imrx) && operand.IsM64(mrx):
|
|
case operand.IsR64(imrx) && operand.IsM64(mrx):
|
|
case operand.IsXmm(imrx) && operand.IsR64(mrx):
|
|
case operand.IsR64(imrx) && operand.IsXmm(mrx):
|
|
case operand.IsXmm(imrx) && operand.IsXmm(mrx):
|
|
case operand.IsM64(imrx) && operand.IsXmm(mrx):
|
|
case operand.IsXmm(imrx) && operand.IsM64(mrx):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVDDUP: Move One Double-FP and Duplicate.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVDDUP xmm xmm
|
|
// MOVDDUP m64 xmm
|
|
func MOVDDUP(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVDQ2Q: Move.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVDQ2Q imm32 r64
|
|
// MOVDQ2Q imm64 r64
|
|
// MOVDQ2Q r64 r64
|
|
// MOVDQ2Q m64 r64
|
|
// MOVDQ2Q imm32 m64
|
|
// MOVDQ2Q r64 m64
|
|
// MOVDQ2Q xmm r64
|
|
// MOVDQ2Q r64 xmm
|
|
// MOVDQ2Q xmm xmm
|
|
// MOVDQ2Q m64 xmm
|
|
// MOVDQ2Q xmm m64
|
|
func MOVDQ2Q(imrx, mrx avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imrx) && operand.IsR64(mrx):
|
|
case operand.IsImm64(imrx) && operand.IsR64(mrx):
|
|
case operand.IsR64(imrx) && operand.IsR64(mrx):
|
|
case operand.IsM64(imrx) && operand.IsR64(mrx):
|
|
case operand.IsImm32(imrx) && operand.IsM64(mrx):
|
|
case operand.IsR64(imrx) && operand.IsM64(mrx):
|
|
case operand.IsXmm(imrx) && operand.IsR64(mrx):
|
|
case operand.IsR64(imrx) && operand.IsXmm(mrx):
|
|
case operand.IsXmm(imrx) && operand.IsXmm(mrx):
|
|
case operand.IsM64(imrx) && operand.IsXmm(mrx):
|
|
case operand.IsXmm(imrx) && operand.IsM64(mrx):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVHLPS: Move Packed Single-Precision Floating-Point Values High to Low.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVHLPS xmm xmm
|
|
func MOVHLPS(x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVHPD: Move High Packed Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVHPD m64 xmm
|
|
// MOVHPD xmm m64
|
|
func MOVHPD(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM64(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM64(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVHPS: Move High Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVHPS m64 xmm
|
|
// MOVHPS xmm m64
|
|
func MOVHPS(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM64(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM64(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVL: Move.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVL imm32 r32
|
|
// MOVL r32 r32
|
|
// MOVL m32 r32
|
|
// MOVL imm32 m32
|
|
// MOVL r32 m32
|
|
func MOVL(imr, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsR32(mr):
|
|
case operand.IsR32(imr) && operand.IsR32(mr):
|
|
case operand.IsM32(imr) && operand.IsR32(mr):
|
|
case operand.IsImm32(imr) && operand.IsM32(mr):
|
|
case operand.IsR32(imr) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVLHPS: Move Packed Single-Precision Floating-Point Values Low to High.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVLHPS xmm xmm
|
|
func MOVLHPS(x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVLPD: Move Low Packed Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVLPD m64 xmm
|
|
// MOVLPD xmm m64
|
|
func MOVLPD(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM64(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM64(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVLPS: Move Low Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVLPS m64 xmm
|
|
// MOVLPS xmm m64
|
|
func MOVLPS(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM64(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM64(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVLQSX: Move Doubleword to Quadword with Sign-Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVLQSX r32 r64
|
|
// MOVLQSX m32 r64
|
|
func MOVLQSX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR64(r):
|
|
case operand.IsM32(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVLQZX: Move with Zero-Extend.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVLQZX m32 r64
|
|
func MOVLQZX(m, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM32(m) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVMSKPD: Extract Packed Double-Precision Floating-Point Sign Mask.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVMSKPD xmm r32
|
|
func MOVMSKPD(x, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVMSKPS: Extract Packed Single-Precision Floating-Point Sign Mask.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVMSKPS xmm r32
|
|
func MOVMSKPS(x, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVNTDQ: Store Double Quadword Using Non-Temporal Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVNTDQ xmm m128
|
|
func MOVNTDQ(x, m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsM128(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVNTDQA: Load Double Quadword Non-Temporal Aligned Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVNTDQA m128 xmm
|
|
func MOVNTDQA(m, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(m) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVNTIL: Store Doubleword Using Non-Temporal Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVNTIL r32 m32
|
|
func MOVNTIL(r, m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r) && operand.IsM32(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVNTIQ: Store Doubleword Using Non-Temporal Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVNTIQ r64 m64
|
|
func MOVNTIQ(r, m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r) && operand.IsM64(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVNTO: Store Double Quadword Using Non-Temporal Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVNTO xmm m128
|
|
func MOVNTO(x, m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsM128(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVNTPD: Store Packed Double-Precision Floating-Point Values Using Non-Temporal Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVNTPD xmm m128
|
|
func MOVNTPD(x, m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsM128(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVNTPS: Store Packed Single-Precision Floating-Point Values Using Non-Temporal Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVNTPS xmm m128
|
|
func MOVNTPS(x, m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsM128(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVO: Move Aligned Double Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVO xmm xmm
|
|
// MOVO m128 xmm
|
|
// MOVO xmm m128
|
|
func MOVO(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(mx1):
|
|
case operand.IsM128(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM128(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVOA: Move Aligned Double Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVOA xmm xmm
|
|
// MOVOA m128 xmm
|
|
// MOVOA xmm m128
|
|
func MOVOA(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(mx1):
|
|
case operand.IsM128(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM128(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVOU: Move Unaligned Double Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVOU xmm xmm
|
|
// MOVOU m128 xmm
|
|
// MOVOU xmm m128
|
|
func MOVOU(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(mx1):
|
|
case operand.IsM128(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM128(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVQ: Move.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVQ imm32 r64
|
|
// MOVQ imm64 r64
|
|
// MOVQ r64 r64
|
|
// MOVQ m64 r64
|
|
// MOVQ imm32 m64
|
|
// MOVQ r64 m64
|
|
// MOVQ xmm r64
|
|
// MOVQ r64 xmm
|
|
// MOVQ xmm xmm
|
|
// MOVQ m64 xmm
|
|
// MOVQ xmm m64
|
|
func MOVQ(imrx, mrx avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imrx) && operand.IsR64(mrx):
|
|
case operand.IsImm64(imrx) && operand.IsR64(mrx):
|
|
case operand.IsR64(imrx) && operand.IsR64(mrx):
|
|
case operand.IsM64(imrx) && operand.IsR64(mrx):
|
|
case operand.IsImm32(imrx) && operand.IsM64(mrx):
|
|
case operand.IsR64(imrx) && operand.IsM64(mrx):
|
|
case operand.IsXmm(imrx) && operand.IsR64(mrx):
|
|
case operand.IsR64(imrx) && operand.IsXmm(mrx):
|
|
case operand.IsXmm(imrx) && operand.IsXmm(mrx):
|
|
case operand.IsM64(imrx) && operand.IsXmm(mrx):
|
|
case operand.IsXmm(imrx) && operand.IsM64(mrx):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVSD: Move Scalar Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVSD xmm xmm
|
|
// MOVSD m64 xmm
|
|
// MOVSD xmm m64
|
|
func MOVSD(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(mx1):
|
|
case operand.IsM64(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM64(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVSHDUP: Move Packed Single-FP High and Duplicate.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVSHDUP xmm xmm
|
|
// MOVSHDUP m128 xmm
|
|
func MOVSHDUP(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVSLDUP: Move Packed Single-FP Low and Duplicate.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVSLDUP xmm xmm
|
|
// MOVSLDUP m128 xmm
|
|
func MOVSLDUP(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVSS: Move Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVSS xmm xmm
|
|
// MOVSS m32 xmm
|
|
// MOVSS xmm m32
|
|
func MOVSS(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(mx1):
|
|
case operand.IsM32(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM32(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVUPD: Move Unaligned Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVUPD xmm xmm
|
|
// MOVUPD m128 xmm
|
|
// MOVUPD xmm m128
|
|
func MOVUPD(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(mx1):
|
|
case operand.IsM128(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM128(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVUPS: Move Unaligned Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVUPS xmm xmm
|
|
// MOVUPS m128 xmm
|
|
// MOVUPS xmm m128
|
|
func MOVUPS(mx, mx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(mx1):
|
|
case operand.IsM128(mx) && operand.IsXmm(mx1):
|
|
case operand.IsXmm(mx) && operand.IsM128(mx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVW: Move.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVW imm16 r16
|
|
// MOVW r16 r16
|
|
// MOVW m16 r16
|
|
// MOVW imm16 m16
|
|
// MOVW r16 m16
|
|
func MOVW(imr, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(imr) && operand.IsR16(mr):
|
|
case operand.IsR16(imr) && operand.IsR16(mr):
|
|
case operand.IsM16(imr) && operand.IsR16(mr):
|
|
case operand.IsImm16(imr) && operand.IsM16(mr):
|
|
case operand.IsR16(imr) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVWLSX: Move with Sign-Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVWLSX r16 r32
|
|
// MOVWLSX m16 r32
|
|
func MOVWLSX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR32(r):
|
|
case operand.IsM16(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVWLZX: Move with Zero-Extend.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVWLZX r16 r32
|
|
// MOVWLZX m16 r32
|
|
func MOVWLZX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR32(r):
|
|
case operand.IsM16(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVWQSX: Move with Sign-Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVWQSX r16 r64
|
|
// MOVWQSX m16 r64
|
|
func MOVWQSX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR64(r):
|
|
case operand.IsM16(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MOVWQZX: Move with Zero-Extend.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MOVWQZX r16 r64
|
|
// MOVWQZX m16 r64
|
|
func MOVWQZX(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR64(r):
|
|
case operand.IsM16(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MPSADBW: Compute Multiple Packed Sums of Absolute Difference.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MPSADBW imm8 xmm xmm
|
|
// MPSADBW imm8 m128 xmm
|
|
func MPSADBW(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MULB: Unsigned Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MULB r8
|
|
// MULB m8
|
|
func MULB(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MULL: Unsigned Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MULL r32
|
|
// MULL m32
|
|
func MULL(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr):
|
|
case operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MULPD: Multiply Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MULPD xmm xmm
|
|
// MULPD m128 xmm
|
|
func MULPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MULPS: Multiply Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MULPS xmm xmm
|
|
// MULPS m128 xmm
|
|
func MULPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MULQ: Unsigned Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MULQ r64
|
|
// MULQ m64
|
|
func MULQ(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr):
|
|
case operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MULSD: Multiply Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MULSD xmm xmm
|
|
// MULSD m64 xmm
|
|
func MULSD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MULSS: Multiply Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MULSS xmm xmm
|
|
// MULSS m32 xmm
|
|
func MULSS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MULW: Unsigned Multiply.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MULW r16
|
|
// MULW m16
|
|
func MULW(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr):
|
|
case operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MULXL: Unsigned Multiply Without Affecting Flags.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MULXL r32 r32 r32
|
|
// MULXL m32 r32 r32
|
|
func MULXL(mr, r, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r) && operand.IsR32(r1):
|
|
case operand.IsM32(mr) && operand.IsR32(r) && operand.IsR32(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MULXQ: Unsigned Multiply Without Affecting Flags.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MULXQ r64 r64 r64
|
|
// MULXQ m64 r64 r64
|
|
func MULXQ(mr, r, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r) && operand.IsR64(r1):
|
|
case operand.IsM64(mr) && operand.IsR64(r) && operand.IsR64(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// MWAIT: Monitor Wait.
|
|
//
|
|
// Forms:
|
|
//
|
|
// MWAIT
|
|
func MWAIT() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// NEGB: Two's Complement Negation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// NEGB r8
|
|
// NEGB m8
|
|
func NEGB(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// NEGL: Two's Complement Negation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// NEGL r32
|
|
// NEGL m32
|
|
func NEGL(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr):
|
|
case operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// NEGQ: Two's Complement Negation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// NEGQ r64
|
|
// NEGQ m64
|
|
func NEGQ(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr):
|
|
case operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// NEGW: Two's Complement Negation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// NEGW r16
|
|
// NEGW m16
|
|
func NEGW(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr):
|
|
case operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// NOP: No Operation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// NOP
|
|
func NOP() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// NOTB: One's Complement Negation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// NOTB r8
|
|
// NOTB m8
|
|
func NOTB(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// NOTL: One's Complement Negation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// NOTL r32
|
|
// NOTL m32
|
|
func NOTL(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr):
|
|
case operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// NOTQ: One's Complement Negation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// NOTQ r64
|
|
// NOTQ m64
|
|
func NOTQ(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr):
|
|
case operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// NOTW: One's Complement Negation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// NOTW r16
|
|
// NOTW m16
|
|
func NOTW(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr):
|
|
case operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ORB: Logical Inclusive OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ORB imm8 al
|
|
// ORB imm8 r8
|
|
// ORB r8 r8
|
|
// ORB m8 r8
|
|
// ORB imm8 m8
|
|
// ORB r8 m8
|
|
func ORB(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imr) && operand.IsAl(amr):
|
|
case operand.IsImm8(imr) && operand.IsR8(amr):
|
|
case operand.IsR8(imr) && operand.IsR8(amr):
|
|
case operand.IsM8(imr) && operand.IsR8(amr):
|
|
case operand.IsImm8(imr) && operand.IsM8(amr):
|
|
case operand.IsR8(imr) && operand.IsM8(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ORL: Logical Inclusive OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ORL imm32 eax
|
|
// ORL imm8 r32
|
|
// ORL imm32 r32
|
|
// ORL r32 r32
|
|
// ORL m32 r32
|
|
// ORL imm8 m32
|
|
// ORL imm32 m32
|
|
// ORL r32 m32
|
|
func ORL(imr, emr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsEax(emr):
|
|
case operand.IsImm8(imr) && operand.IsR32(emr):
|
|
case operand.IsImm32(imr) && operand.IsR32(emr):
|
|
case operand.IsR32(imr) && operand.IsR32(emr):
|
|
case operand.IsM32(imr) && operand.IsR32(emr):
|
|
case operand.IsImm8(imr) && operand.IsM32(emr):
|
|
case operand.IsImm32(imr) && operand.IsM32(emr):
|
|
case operand.IsR32(imr) && operand.IsM32(emr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ORPD: Bitwise Logical OR of Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ORPD xmm xmm
|
|
// ORPD m128 xmm
|
|
func ORPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ORPS: Bitwise Logical OR of Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ORPS xmm xmm
|
|
// ORPS m128 xmm
|
|
func ORPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ORQ: Logical Inclusive OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ORQ imm32 rax
|
|
// ORQ imm8 r64
|
|
// ORQ imm32 r64
|
|
// ORQ r64 r64
|
|
// ORQ m64 r64
|
|
// ORQ imm8 m64
|
|
// ORQ imm32 m64
|
|
// ORQ r64 m64
|
|
func ORQ(imr, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsRax(mr):
|
|
case operand.IsImm8(imr) && operand.IsR64(mr):
|
|
case operand.IsImm32(imr) && operand.IsR64(mr):
|
|
case operand.IsR64(imr) && operand.IsR64(mr):
|
|
case operand.IsM64(imr) && operand.IsR64(mr):
|
|
case operand.IsImm8(imr) && operand.IsM64(mr):
|
|
case operand.IsImm32(imr) && operand.IsM64(mr):
|
|
case operand.IsR64(imr) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ORW: Logical Inclusive OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ORW imm16 ax
|
|
// ORW imm8 r16
|
|
// ORW imm16 r16
|
|
// ORW r16 r16
|
|
// ORW m16 r16
|
|
// ORW imm8 m16
|
|
// ORW imm16 m16
|
|
// ORW r16 m16
|
|
func ORW(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(imr) && operand.IsAx(amr):
|
|
case operand.IsImm8(imr) && operand.IsR16(amr):
|
|
case operand.IsImm16(imr) && operand.IsR16(amr):
|
|
case operand.IsR16(imr) && operand.IsR16(amr):
|
|
case operand.IsM16(imr) && operand.IsR16(amr):
|
|
case operand.IsImm8(imr) && operand.IsM16(amr):
|
|
case operand.IsImm16(imr) && operand.IsM16(amr):
|
|
case operand.IsR16(imr) && operand.IsM16(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PABSB: Packed Absolute Value of Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PABSB xmm xmm
|
|
// PABSB m128 xmm
|
|
func PABSB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PABSD: Packed Absolute Value of Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PABSD xmm xmm
|
|
// PABSD m128 xmm
|
|
func PABSD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PABSW: Packed Absolute Value of Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PABSW xmm xmm
|
|
// PABSW m128 xmm
|
|
func PABSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PACKSSLW: Pack Doublewords into Words with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PACKSSLW xmm xmm
|
|
// PACKSSLW m128 xmm
|
|
func PACKSSLW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PACKSSWB: Pack Words into Bytes with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PACKSSWB xmm xmm
|
|
// PACKSSWB m128 xmm
|
|
func PACKSSWB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PACKUSDW: Pack Doublewords into Words with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PACKUSDW xmm xmm
|
|
// PACKUSDW m128 xmm
|
|
func PACKUSDW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PACKUSWB: Pack Words into Bytes with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PACKUSWB xmm xmm
|
|
// PACKUSWB m128 xmm
|
|
func PACKUSWB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PADDB: Add Packed Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PADDB xmm xmm
|
|
// PADDB m128 xmm
|
|
func PADDB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PADDD: Add Packed Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PADDD xmm xmm
|
|
// PADDD m128 xmm
|
|
func PADDD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PADDL: Add Packed Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PADDL xmm xmm
|
|
// PADDL m128 xmm
|
|
func PADDL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PADDQ: Add Packed Quadword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PADDQ xmm xmm
|
|
// PADDQ m128 xmm
|
|
func PADDQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PADDSB: Add Packed Signed Byte Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PADDSB xmm xmm
|
|
// PADDSB m128 xmm
|
|
func PADDSB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PADDSW: Add Packed Signed Word Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PADDSW xmm xmm
|
|
// PADDSW m128 xmm
|
|
func PADDSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PADDUSB: Add Packed Unsigned Byte Integers with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PADDUSB xmm xmm
|
|
// PADDUSB m128 xmm
|
|
func PADDUSB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PADDUSW: Add Packed Unsigned Word Integers with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PADDUSW xmm xmm
|
|
// PADDUSW m128 xmm
|
|
func PADDUSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PADDW: Add Packed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PADDW xmm xmm
|
|
// PADDW m128 xmm
|
|
func PADDW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PALIGNR: Packed Align Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PALIGNR imm8 xmm xmm
|
|
// PALIGNR imm8 m128 xmm
|
|
func PALIGNR(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PAND: Packed Bitwise Logical AND.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PAND xmm xmm
|
|
// PAND m128 xmm
|
|
func PAND(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PANDN: Packed Bitwise Logical AND NOT.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PANDN xmm xmm
|
|
// PANDN m128 xmm
|
|
func PANDN(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PAUSE: Spin Loop Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PAUSE
|
|
func PAUSE() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// PAVGB: Average Packed Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PAVGB xmm xmm
|
|
// PAVGB m128 xmm
|
|
func PAVGB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PAVGW: Average Packed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PAVGW xmm xmm
|
|
// PAVGW m128 xmm
|
|
func PAVGW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PBLENDVB: Variable Blend Packed Bytes.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PBLENDVB xmm0 xmm xmm
|
|
// PBLENDVB xmm0 m128 xmm
|
|
func PBLENDVB(x, mx, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm0(x) && operand.IsXmm(mx) && operand.IsXmm(x1):
|
|
case operand.IsXmm0(x) && operand.IsM128(mx) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PBLENDW: Blend Packed Words.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PBLENDW imm8 xmm xmm
|
|
// PBLENDW imm8 m128 xmm
|
|
func PBLENDW(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCLMULQDQ: Carry-Less Quadword Multiplication.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCLMULQDQ imm8 xmm xmm
|
|
// PCLMULQDQ imm8 m128 xmm
|
|
func PCLMULQDQ(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPEQB: Compare Packed Byte Data for Equality.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPEQB xmm xmm
|
|
// PCMPEQB m128 xmm
|
|
func PCMPEQB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPEQL: Compare Packed Doubleword Data for Equality.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPEQL xmm xmm
|
|
// PCMPEQL m128 xmm
|
|
func PCMPEQL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPEQQ: Compare Packed Quadword Data for Equality.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPEQQ xmm xmm
|
|
// PCMPEQQ m128 xmm
|
|
func PCMPEQQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPEQW: Compare Packed Word Data for Equality.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPEQW xmm xmm
|
|
// PCMPEQW m128 xmm
|
|
func PCMPEQW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPESTRI: Packed Compare Explicit Length Strings, Return Index.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPESTRI imm8 xmm xmm
|
|
// PCMPESTRI imm8 m128 xmm
|
|
func PCMPESTRI(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPESTRM: Packed Compare Explicit Length Strings, Return Mask.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPESTRM imm8 xmm xmm
|
|
// PCMPESTRM imm8 m128 xmm
|
|
func PCMPESTRM(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPGTB: Compare Packed Signed Byte Integers for Greater Than.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPGTB xmm xmm
|
|
// PCMPGTB m128 xmm
|
|
func PCMPGTB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPGTL: Compare Packed Signed Doubleword Integers for Greater Than.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPGTL xmm xmm
|
|
// PCMPGTL m128 xmm
|
|
func PCMPGTL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPGTQ: Compare Packed Data for Greater Than.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPGTQ xmm xmm
|
|
// PCMPGTQ m128 xmm
|
|
func PCMPGTQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPGTW: Compare Packed Signed Word Integers for Greater Than.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPGTW xmm xmm
|
|
// PCMPGTW m128 xmm
|
|
func PCMPGTW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPISTRI: Packed Compare Implicit Length Strings, Return Index.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPISTRI imm8 xmm xmm
|
|
// PCMPISTRI imm8 m128 xmm
|
|
func PCMPISTRI(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PCMPISTRM: Packed Compare Implicit Length Strings, Return Mask.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PCMPISTRM imm8 xmm xmm
|
|
// PCMPISTRM imm8 m128 xmm
|
|
func PCMPISTRM(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PDEPL: Parallel Bits Deposit.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PDEPL r32 r32 r32
|
|
// PDEPL m32 r32 r32
|
|
func PDEPL(mr, r, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r) && operand.IsR32(r1):
|
|
case operand.IsM32(mr) && operand.IsR32(r) && operand.IsR32(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PDEPQ: Parallel Bits Deposit.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PDEPQ r64 r64 r64
|
|
// PDEPQ m64 r64 r64
|
|
func PDEPQ(mr, r, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r) && operand.IsR64(r1):
|
|
case operand.IsM64(mr) && operand.IsR64(r) && operand.IsR64(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PEXTL: Parallel Bits Extract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PEXTL r32 r32 r32
|
|
// PEXTL m32 r32 r32
|
|
func PEXTL(mr, r, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r) && operand.IsR32(r1):
|
|
case operand.IsM32(mr) && operand.IsR32(r) && operand.IsR32(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PEXTQ: Parallel Bits Extract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PEXTQ r64 r64 r64
|
|
// PEXTQ m64 r64 r64
|
|
func PEXTQ(mr, r, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r) && operand.IsR64(r1):
|
|
case operand.IsM64(mr) && operand.IsR64(r) && operand.IsR64(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PEXTRB: Extract Byte.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PEXTRB imm8 xmm r32
|
|
// PEXTRB imm8 xmm m8
|
|
func PEXTRB(i, x, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsR32(mr):
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PEXTRD: Extract Doubleword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PEXTRD imm8 xmm r32
|
|
// PEXTRD imm8 xmm m32
|
|
func PEXTRD(i, x, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsR32(mr):
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PEXTRQ: Extract Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PEXTRQ imm8 xmm r64
|
|
// PEXTRQ imm8 xmm m64
|
|
func PEXTRQ(i, x, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsR64(mr):
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PEXTRW: Extract Word.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PEXTRW imm8 xmm r32
|
|
// PEXTRW imm8 xmm m16
|
|
func PEXTRW(i, x, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsR32(mr):
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PHADDD: Packed Horizontal Add Doubleword Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PHADDD xmm xmm
|
|
// PHADDD m128 xmm
|
|
func PHADDD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PHADDSW: Packed Horizontal Add Signed Word Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PHADDSW xmm xmm
|
|
// PHADDSW m128 xmm
|
|
func PHADDSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PHADDW: Packed Horizontal Add Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PHADDW xmm xmm
|
|
// PHADDW m128 xmm
|
|
func PHADDW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PHMINPOSUW: Packed Horizontal Minimum of Unsigned Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PHMINPOSUW xmm xmm
|
|
// PHMINPOSUW m128 xmm
|
|
func PHMINPOSUW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PHSUBD: Packed Horizontal Subtract Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PHSUBD xmm xmm
|
|
// PHSUBD m128 xmm
|
|
func PHSUBD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PHSUBSW: Packed Horizontal Subtract Signed Word Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PHSUBSW xmm xmm
|
|
// PHSUBSW m128 xmm
|
|
func PHSUBSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PHSUBW: Packed Horizontal Subtract Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PHSUBW xmm xmm
|
|
// PHSUBW m128 xmm
|
|
func PHSUBW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PINSRB: Insert Byte.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PINSRB imm8 r32 xmm
|
|
// PINSRB imm8 m8 xmm
|
|
func PINSRB(i, mr, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR32(mr) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM8(mr) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PINSRD: Insert Doubleword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PINSRD imm8 r32 xmm
|
|
// PINSRD imm8 m32 xmm
|
|
func PINSRD(i, mr, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR32(mr) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM32(mr) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PINSRQ: Insert Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PINSRQ imm8 r64 xmm
|
|
// PINSRQ imm8 m64 xmm
|
|
func PINSRQ(i, mr, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR64(mr) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM64(mr) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PINSRW: Insert Word.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PINSRW imm8 r32 xmm
|
|
// PINSRW imm8 m16 xmm
|
|
func PINSRW(i, mr, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR32(mr) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM16(mr) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMADDUBSW: Multiply and Add Packed Signed and Unsigned Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMADDUBSW xmm xmm
|
|
// PMADDUBSW m128 xmm
|
|
func PMADDUBSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMADDWL: Multiply and Add Packed Signed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMADDWL xmm xmm
|
|
// PMADDWL m128 xmm
|
|
func PMADDWL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMAXSB: Maximum of Packed Signed Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMAXSB xmm xmm
|
|
// PMAXSB m128 xmm
|
|
func PMAXSB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMAXSD: Maximum of Packed Signed Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMAXSD xmm xmm
|
|
// PMAXSD m128 xmm
|
|
func PMAXSD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMAXSW: Maximum of Packed Signed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMAXSW xmm xmm
|
|
// PMAXSW m128 xmm
|
|
func PMAXSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMAXUB: Maximum of Packed Unsigned Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMAXUB xmm xmm
|
|
// PMAXUB m128 xmm
|
|
func PMAXUB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMAXUD: Maximum of Packed Unsigned Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMAXUD xmm xmm
|
|
// PMAXUD m128 xmm
|
|
func PMAXUD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMAXUW: Maximum of Packed Unsigned Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMAXUW xmm xmm
|
|
// PMAXUW m128 xmm
|
|
func PMAXUW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMINSB: Minimum of Packed Signed Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMINSB xmm xmm
|
|
// PMINSB m128 xmm
|
|
func PMINSB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMINSD: Minimum of Packed Signed Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMINSD xmm xmm
|
|
// PMINSD m128 xmm
|
|
func PMINSD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMINSW: Minimum of Packed Signed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMINSW xmm xmm
|
|
// PMINSW m128 xmm
|
|
func PMINSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMINUB: Minimum of Packed Unsigned Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMINUB xmm xmm
|
|
// PMINUB m128 xmm
|
|
func PMINUB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMINUD: Minimum of Packed Unsigned Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMINUD xmm xmm
|
|
// PMINUD m128 xmm
|
|
func PMINUD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMINUW: Minimum of Packed Unsigned Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMINUW xmm xmm
|
|
// PMINUW m128 xmm
|
|
func PMINUW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVMSKB: Move Byte Mask.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVMSKB xmm r32
|
|
func PMOVMSKB(x, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVSXBD: Move Packed Byte Integers to Doubleword Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVSXBD xmm xmm
|
|
// PMOVSXBD m32 xmm
|
|
func PMOVSXBD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVSXBQ: Move Packed Byte Integers to Quadword Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVSXBQ xmm xmm
|
|
// PMOVSXBQ m16 xmm
|
|
func PMOVSXBQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM16(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVSXBW: Move Packed Byte Integers to Word Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVSXBW xmm xmm
|
|
// PMOVSXBW m64 xmm
|
|
func PMOVSXBW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVSXDQ: Move Packed Doubleword Integers to Quadword Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVSXDQ xmm xmm
|
|
// PMOVSXDQ m64 xmm
|
|
func PMOVSXDQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVSXWD: Move Packed Word Integers to Doubleword Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVSXWD xmm xmm
|
|
// PMOVSXWD m64 xmm
|
|
func PMOVSXWD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVSXWQ: Move Packed Word Integers to Quadword Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVSXWQ xmm xmm
|
|
// PMOVSXWQ m32 xmm
|
|
func PMOVSXWQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVZXBD: Move Packed Byte Integers to Doubleword Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVZXBD xmm xmm
|
|
// PMOVZXBD m32 xmm
|
|
func PMOVZXBD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVZXBQ: Move Packed Byte Integers to Quadword Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVZXBQ xmm xmm
|
|
// PMOVZXBQ m16 xmm
|
|
func PMOVZXBQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM16(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVZXBW: Move Packed Byte Integers to Word Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVZXBW xmm xmm
|
|
// PMOVZXBW m64 xmm
|
|
func PMOVZXBW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVZXDQ: Move Packed Doubleword Integers to Quadword Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVZXDQ xmm xmm
|
|
// PMOVZXDQ m64 xmm
|
|
func PMOVZXDQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVZXWD: Move Packed Word Integers to Doubleword Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVZXWD xmm xmm
|
|
// PMOVZXWD m64 xmm
|
|
func PMOVZXWD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMOVZXWQ: Move Packed Word Integers to Quadword Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMOVZXWQ xmm xmm
|
|
// PMOVZXWQ m32 xmm
|
|
func PMOVZXWQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMULDQ: Multiply Packed Signed Doubleword Integers and Store Quadword Result.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMULDQ xmm xmm
|
|
// PMULDQ m128 xmm
|
|
func PMULDQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMULHRSW: Packed Multiply Signed Word Integers and Store High Result with Round and Scale.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMULHRSW xmm xmm
|
|
// PMULHRSW m128 xmm
|
|
func PMULHRSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMULHUW: Multiply Packed Unsigned Word Integers and Store High Result.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMULHUW xmm xmm
|
|
// PMULHUW m128 xmm
|
|
func PMULHUW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMULHW: Multiply Packed Signed Word Integers and Store High Result.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMULHW xmm xmm
|
|
// PMULHW m128 xmm
|
|
func PMULHW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMULLD: Multiply Packed Signed Doubleword Integers and Store Low Result.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMULLD xmm xmm
|
|
// PMULLD m128 xmm
|
|
func PMULLD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMULLW: Multiply Packed Signed Word Integers and Store Low Result.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMULLW xmm xmm
|
|
// PMULLW m128 xmm
|
|
func PMULLW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PMULULQ: Multiply Packed Unsigned Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PMULULQ xmm xmm
|
|
// PMULULQ m128 xmm
|
|
func PMULULQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// POPCNTL: Count of Number of Bits Set to 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// POPCNTL r32 r32
|
|
// POPCNTL m32 r32
|
|
func POPCNTL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// POPCNTQ: Count of Number of Bits Set to 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// POPCNTQ r64 r64
|
|
// POPCNTQ m64 r64
|
|
func POPCNTQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// POPCNTW: Count of Number of Bits Set to 1.
|
|
//
|
|
// Forms:
|
|
//
|
|
// POPCNTW r16 r16
|
|
// POPCNTW m16 r16
|
|
func POPCNTW(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// POPQ: Pop a Value from the Stack.
|
|
//
|
|
// Forms:
|
|
//
|
|
// POPQ r64
|
|
// POPQ m64
|
|
func POPQ(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr):
|
|
case operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// POPW: Pop a Value from the Stack.
|
|
//
|
|
// Forms:
|
|
//
|
|
// POPW r16
|
|
// POPW m16
|
|
func POPW(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr):
|
|
case operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// POR: Packed Bitwise Logical OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// POR xmm xmm
|
|
// POR m128 xmm
|
|
func POR(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PREFETCHNTA: Prefetch Data Into Caches using NTA Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PREFETCHNTA m8
|
|
func PREFETCHNTA(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM8(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PREFETCHT0: Prefetch Data Into Caches using T0 Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PREFETCHT0 m8
|
|
func PREFETCHT0(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM8(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PREFETCHT1: Prefetch Data Into Caches using T1 Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PREFETCHT1 m8
|
|
func PREFETCHT1(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM8(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PREFETCHT2: Prefetch Data Into Caches using T2 Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PREFETCHT2 m8
|
|
func PREFETCHT2(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM8(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSADBW: Compute Sum of Absolute Differences.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSADBW xmm xmm
|
|
// PSADBW m128 xmm
|
|
func PSADBW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSHUFB: Packed Shuffle Bytes.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSHUFB xmm xmm
|
|
// PSHUFB m128 xmm
|
|
func PSHUFB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSHUFD: Shuffle Packed Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSHUFD imm8 xmm xmm
|
|
// PSHUFD imm8 m128 xmm
|
|
func PSHUFD(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSHUFHW: Shuffle Packed High Words.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSHUFHW imm8 xmm xmm
|
|
// PSHUFHW imm8 m128 xmm
|
|
func PSHUFHW(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSHUFL: Shuffle Packed Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSHUFL imm8 xmm xmm
|
|
// PSHUFL imm8 m128 xmm
|
|
func PSHUFL(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSHUFLW: Shuffle Packed Low Words.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSHUFLW imm8 xmm xmm
|
|
// PSHUFLW imm8 m128 xmm
|
|
func PSHUFLW(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSIGNB: Packed Sign of Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSIGNB xmm xmm
|
|
// PSIGNB m128 xmm
|
|
func PSIGNB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSIGND: Packed Sign of Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSIGND xmm xmm
|
|
// PSIGND m128 xmm
|
|
func PSIGND(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSIGNW: Packed Sign of Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSIGNW xmm xmm
|
|
// PSIGNW m128 xmm
|
|
func PSIGNW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSLLDQ: Shift Packed Double Quadword Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSLLDQ imm8 xmm
|
|
func PSLLDQ(i, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSLLL: Shift Packed Doubleword Data Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSLLL imm8 xmm
|
|
// PSLLL xmm xmm
|
|
// PSLLL m128 xmm
|
|
func PSLLL(imx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(x):
|
|
case operand.IsXmm(imx) && operand.IsXmm(x):
|
|
case operand.IsM128(imx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSLLO: Shift Packed Double Quadword Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSLLO imm8 xmm
|
|
func PSLLO(i, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSLLQ: Shift Packed Quadword Data Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSLLQ imm8 xmm
|
|
// PSLLQ xmm xmm
|
|
// PSLLQ m128 xmm
|
|
func PSLLQ(imx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(x):
|
|
case operand.IsXmm(imx) && operand.IsXmm(x):
|
|
case operand.IsM128(imx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSLLW: Shift Packed Word Data Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSLLW imm8 xmm
|
|
// PSLLW xmm xmm
|
|
// PSLLW m128 xmm
|
|
func PSLLW(imx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(x):
|
|
case operand.IsXmm(imx) && operand.IsXmm(x):
|
|
case operand.IsM128(imx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSRAL: Shift Packed Doubleword Data Right Arithmetic.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSRAL imm8 xmm
|
|
// PSRAL xmm xmm
|
|
// PSRAL m128 xmm
|
|
func PSRAL(imx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(x):
|
|
case operand.IsXmm(imx) && operand.IsXmm(x):
|
|
case operand.IsM128(imx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSRAW: Shift Packed Word Data Right Arithmetic.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSRAW imm8 xmm
|
|
// PSRAW xmm xmm
|
|
// PSRAW m128 xmm
|
|
func PSRAW(imx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(x):
|
|
case operand.IsXmm(imx) && operand.IsXmm(x):
|
|
case operand.IsM128(imx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSRLDQ: Shift Packed Double Quadword Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSRLDQ imm8 xmm
|
|
func PSRLDQ(i, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSRLL: Shift Packed Doubleword Data Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSRLL imm8 xmm
|
|
// PSRLL xmm xmm
|
|
// PSRLL m128 xmm
|
|
func PSRLL(imx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(x):
|
|
case operand.IsXmm(imx) && operand.IsXmm(x):
|
|
case operand.IsM128(imx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSRLO: Shift Packed Double Quadword Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSRLO imm8 xmm
|
|
func PSRLO(i, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSRLQ: Shift Packed Quadword Data Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSRLQ imm8 xmm
|
|
// PSRLQ xmm xmm
|
|
// PSRLQ m128 xmm
|
|
func PSRLQ(imx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(x):
|
|
case operand.IsXmm(imx) && operand.IsXmm(x):
|
|
case operand.IsM128(imx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSRLW: Shift Packed Word Data Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSRLW imm8 xmm
|
|
// PSRLW xmm xmm
|
|
// PSRLW m128 xmm
|
|
func PSRLW(imx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(x):
|
|
case operand.IsXmm(imx) && operand.IsXmm(x):
|
|
case operand.IsM128(imx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSUBB: Subtract Packed Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSUBB xmm xmm
|
|
// PSUBB m128 xmm
|
|
func PSUBB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSUBL: Subtract Packed Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSUBL xmm xmm
|
|
// PSUBL m128 xmm
|
|
func PSUBL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSUBQ: Subtract Packed Quadword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSUBQ xmm xmm
|
|
// PSUBQ m128 xmm
|
|
func PSUBQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSUBSB: Subtract Packed Signed Byte Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSUBSB xmm xmm
|
|
// PSUBSB m128 xmm
|
|
func PSUBSB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSUBSW: Subtract Packed Signed Word Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSUBSW xmm xmm
|
|
// PSUBSW m128 xmm
|
|
func PSUBSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSUBUSB: Subtract Packed Unsigned Byte Integers with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSUBUSB xmm xmm
|
|
// PSUBUSB m128 xmm
|
|
func PSUBUSB(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSUBUSW: Subtract Packed Unsigned Word Integers with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSUBUSW xmm xmm
|
|
// PSUBUSW m128 xmm
|
|
func PSUBUSW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PSUBW: Subtract Packed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PSUBW xmm xmm
|
|
// PSUBW m128 xmm
|
|
func PSUBW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PTEST: Packed Logical Compare.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PTEST xmm xmm
|
|
// PTEST m128 xmm
|
|
func PTEST(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PUNPCKHBW: Unpack and Interleave High-Order Bytes into Words.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PUNPCKHBW xmm xmm
|
|
// PUNPCKHBW m128 xmm
|
|
func PUNPCKHBW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PUNPCKHLQ: Unpack and Interleave High-Order Doublewords into Quadwords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PUNPCKHLQ xmm xmm
|
|
// PUNPCKHLQ m128 xmm
|
|
func PUNPCKHLQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PUNPCKHQDQ: Unpack and Interleave High-Order Quadwords into Double Quadwords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PUNPCKHQDQ xmm xmm
|
|
// PUNPCKHQDQ m128 xmm
|
|
func PUNPCKHQDQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PUNPCKHWL: Unpack and Interleave High-Order Words into Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PUNPCKHWL xmm xmm
|
|
// PUNPCKHWL m128 xmm
|
|
func PUNPCKHWL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PUNPCKLBW: Unpack and Interleave Low-Order Bytes into Words.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PUNPCKLBW xmm xmm
|
|
// PUNPCKLBW m128 xmm
|
|
func PUNPCKLBW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PUNPCKLLQ: Unpack and Interleave Low-Order Doublewords into Quadwords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PUNPCKLLQ xmm xmm
|
|
// PUNPCKLLQ m128 xmm
|
|
func PUNPCKLLQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PUNPCKLQDQ: Unpack and Interleave Low-Order Quadwords into Double Quadwords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PUNPCKLQDQ xmm xmm
|
|
// PUNPCKLQDQ m128 xmm
|
|
func PUNPCKLQDQ(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PUNPCKLWL: Unpack and Interleave Low-Order Words into Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PUNPCKLWL xmm xmm
|
|
// PUNPCKLWL m128 xmm
|
|
func PUNPCKLWL(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PUSHQ: Push Value Onto the Stack.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PUSHQ imm8
|
|
// PUSHQ imm32
|
|
// PUSHQ r64
|
|
// PUSHQ m64
|
|
func PUSHQ(imr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imr):
|
|
case operand.IsImm32(imr):
|
|
case operand.IsR64(imr):
|
|
case operand.IsM64(imr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PUSHW: Push Value Onto the Stack.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PUSHW r16
|
|
// PUSHW m16
|
|
func PUSHW(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr):
|
|
case operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// PXOR: Packed Bitwise Logical Exclusive OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// PXOR xmm xmm
|
|
// PXOR m128 xmm
|
|
func PXOR(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RCLB: Rotate Left through Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RCLB 1 r8
|
|
// RCLB imm8 r8
|
|
// RCLB cl r8
|
|
// RCLB 1 m8
|
|
// RCLB imm8 m8
|
|
// RCLB cl m8
|
|
func RCLB(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR8(mr):
|
|
case operand.IsImm8(ci) && operand.IsR8(mr):
|
|
case operand.IsCl(ci) && operand.IsR8(mr):
|
|
case operand.Is1(ci) && operand.IsM8(mr):
|
|
case operand.IsImm8(ci) && operand.IsM8(mr):
|
|
case operand.IsCl(ci) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RCLL: Rotate Left through Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RCLL 1 r32
|
|
// RCLL imm8 r32
|
|
// RCLL cl r32
|
|
// RCLL 1 m32
|
|
// RCLL imm8 m32
|
|
// RCLL cl m32
|
|
func RCLL(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR32(mr):
|
|
case operand.IsImm8(ci) && operand.IsR32(mr):
|
|
case operand.IsCl(ci) && operand.IsR32(mr):
|
|
case operand.Is1(ci) && operand.IsM32(mr):
|
|
case operand.IsImm8(ci) && operand.IsM32(mr):
|
|
case operand.IsCl(ci) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RCLQ: Rotate Left through Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RCLQ 1 r64
|
|
// RCLQ imm8 r64
|
|
// RCLQ cl r64
|
|
// RCLQ 1 m64
|
|
// RCLQ imm8 m64
|
|
// RCLQ cl m64
|
|
func RCLQ(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR64(mr):
|
|
case operand.IsImm8(ci) && operand.IsR64(mr):
|
|
case operand.IsCl(ci) && operand.IsR64(mr):
|
|
case operand.Is1(ci) && operand.IsM64(mr):
|
|
case operand.IsImm8(ci) && operand.IsM64(mr):
|
|
case operand.IsCl(ci) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RCLW: Rotate Left through Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RCLW 1 r16
|
|
// RCLW imm8 r16
|
|
// RCLW cl r16
|
|
// RCLW 1 m16
|
|
// RCLW imm8 m16
|
|
// RCLW cl m16
|
|
func RCLW(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR16(mr):
|
|
case operand.IsImm8(ci) && operand.IsR16(mr):
|
|
case operand.IsCl(ci) && operand.IsR16(mr):
|
|
case operand.Is1(ci) && operand.IsM16(mr):
|
|
case operand.IsImm8(ci) && operand.IsM16(mr):
|
|
case operand.IsCl(ci) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RCPPS: Compute Approximate Reciprocals of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RCPPS xmm xmm
|
|
// RCPPS m128 xmm
|
|
func RCPPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RCPSS: Compute Approximate Reciprocal of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RCPSS xmm xmm
|
|
// RCPSS m32 xmm
|
|
func RCPSS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RCRB: Rotate Right through Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RCRB 1 r8
|
|
// RCRB imm8 r8
|
|
// RCRB cl r8
|
|
// RCRB 1 m8
|
|
// RCRB imm8 m8
|
|
// RCRB cl m8
|
|
func RCRB(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR8(mr):
|
|
case operand.IsImm8(ci) && operand.IsR8(mr):
|
|
case operand.IsCl(ci) && operand.IsR8(mr):
|
|
case operand.Is1(ci) && operand.IsM8(mr):
|
|
case operand.IsImm8(ci) && operand.IsM8(mr):
|
|
case operand.IsCl(ci) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RCRL: Rotate Right through Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RCRL 1 r32
|
|
// RCRL imm8 r32
|
|
// RCRL cl r32
|
|
// RCRL 1 m32
|
|
// RCRL imm8 m32
|
|
// RCRL cl m32
|
|
func RCRL(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR32(mr):
|
|
case operand.IsImm8(ci) && operand.IsR32(mr):
|
|
case operand.IsCl(ci) && operand.IsR32(mr):
|
|
case operand.Is1(ci) && operand.IsM32(mr):
|
|
case operand.IsImm8(ci) && operand.IsM32(mr):
|
|
case operand.IsCl(ci) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RCRQ: Rotate Right through Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RCRQ 1 r64
|
|
// RCRQ imm8 r64
|
|
// RCRQ cl r64
|
|
// RCRQ 1 m64
|
|
// RCRQ imm8 m64
|
|
// RCRQ cl m64
|
|
func RCRQ(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR64(mr):
|
|
case operand.IsImm8(ci) && operand.IsR64(mr):
|
|
case operand.IsCl(ci) && operand.IsR64(mr):
|
|
case operand.Is1(ci) && operand.IsM64(mr):
|
|
case operand.IsImm8(ci) && operand.IsM64(mr):
|
|
case operand.IsCl(ci) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RCRW: Rotate Right through Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RCRW 1 r16
|
|
// RCRW imm8 r16
|
|
// RCRW cl r16
|
|
// RCRW 1 m16
|
|
// RCRW imm8 m16
|
|
// RCRW cl m16
|
|
func RCRW(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR16(mr):
|
|
case operand.IsImm8(ci) && operand.IsR16(mr):
|
|
case operand.IsCl(ci) && operand.IsR16(mr):
|
|
case operand.Is1(ci) && operand.IsM16(mr):
|
|
case operand.IsImm8(ci) && operand.IsM16(mr):
|
|
case operand.IsCl(ci) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RDRANDL: Read Random Number.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RDRANDL r32
|
|
func RDRANDL(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RDRANDQ: Read Random Number.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RDRANDQ r64
|
|
func RDRANDQ(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RDRANDW: Read Random Number.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RDRANDW r16
|
|
func RDRANDW(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RDSEEDL: Read Random SEED.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RDSEEDL r32
|
|
func RDSEEDL(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RDSEEDQ: Read Random SEED.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RDSEEDQ r64
|
|
func RDSEEDQ(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RDSEEDW: Read Random SEED.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RDSEEDW r16
|
|
func RDSEEDW(r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RDTSC: Read Time-Stamp Counter.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RDTSC
|
|
func RDTSC() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// RDTSCP: Read Time-Stamp Counter and Processor ID.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RDTSCP
|
|
func RDTSCP() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// RET: Return from Procedure.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RET
|
|
func RET() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// RETFL: Return from Procedure.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RETFL imm16
|
|
func RETFL(i avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(i):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RETFQ: Return from Procedure.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RETFQ imm16
|
|
func RETFQ(i avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(i):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RETFW: Return from Procedure.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RETFW imm16
|
|
func RETFW(i avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(i):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ROLB: Rotate Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ROLB 1 r8
|
|
// ROLB imm8 r8
|
|
// ROLB cl r8
|
|
// ROLB 1 m8
|
|
// ROLB imm8 m8
|
|
// ROLB cl m8
|
|
func ROLB(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR8(mr):
|
|
case operand.IsImm8(ci) && operand.IsR8(mr):
|
|
case operand.IsCl(ci) && operand.IsR8(mr):
|
|
case operand.Is1(ci) && operand.IsM8(mr):
|
|
case operand.IsImm8(ci) && operand.IsM8(mr):
|
|
case operand.IsCl(ci) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ROLL: Rotate Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ROLL 1 r32
|
|
// ROLL imm8 r32
|
|
// ROLL cl r32
|
|
// ROLL 1 m32
|
|
// ROLL imm8 m32
|
|
// ROLL cl m32
|
|
func ROLL(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR32(mr):
|
|
case operand.IsImm8(ci) && operand.IsR32(mr):
|
|
case operand.IsCl(ci) && operand.IsR32(mr):
|
|
case operand.Is1(ci) && operand.IsM32(mr):
|
|
case operand.IsImm8(ci) && operand.IsM32(mr):
|
|
case operand.IsCl(ci) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ROLQ: Rotate Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ROLQ 1 r64
|
|
// ROLQ imm8 r64
|
|
// ROLQ cl r64
|
|
// ROLQ 1 m64
|
|
// ROLQ imm8 m64
|
|
// ROLQ cl m64
|
|
func ROLQ(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR64(mr):
|
|
case operand.IsImm8(ci) && operand.IsR64(mr):
|
|
case operand.IsCl(ci) && operand.IsR64(mr):
|
|
case operand.Is1(ci) && operand.IsM64(mr):
|
|
case operand.IsImm8(ci) && operand.IsM64(mr):
|
|
case operand.IsCl(ci) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ROLW: Rotate Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ROLW 1 r16
|
|
// ROLW imm8 r16
|
|
// ROLW cl r16
|
|
// ROLW 1 m16
|
|
// ROLW imm8 m16
|
|
// ROLW cl m16
|
|
func ROLW(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR16(mr):
|
|
case operand.IsImm8(ci) && operand.IsR16(mr):
|
|
case operand.IsCl(ci) && operand.IsR16(mr):
|
|
case operand.Is1(ci) && operand.IsM16(mr):
|
|
case operand.IsImm8(ci) && operand.IsM16(mr):
|
|
case operand.IsCl(ci) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RORB: Rotate Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RORB 1 r8
|
|
// RORB imm8 r8
|
|
// RORB cl r8
|
|
// RORB 1 m8
|
|
// RORB imm8 m8
|
|
// RORB cl m8
|
|
func RORB(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR8(mr):
|
|
case operand.IsImm8(ci) && operand.IsR8(mr):
|
|
case operand.IsCl(ci) && operand.IsR8(mr):
|
|
case operand.Is1(ci) && operand.IsM8(mr):
|
|
case operand.IsImm8(ci) && operand.IsM8(mr):
|
|
case operand.IsCl(ci) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RORL: Rotate Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RORL 1 r32
|
|
// RORL imm8 r32
|
|
// RORL cl r32
|
|
// RORL 1 m32
|
|
// RORL imm8 m32
|
|
// RORL cl m32
|
|
func RORL(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR32(mr):
|
|
case operand.IsImm8(ci) && operand.IsR32(mr):
|
|
case operand.IsCl(ci) && operand.IsR32(mr):
|
|
case operand.Is1(ci) && operand.IsM32(mr):
|
|
case operand.IsImm8(ci) && operand.IsM32(mr):
|
|
case operand.IsCl(ci) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RORQ: Rotate Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RORQ 1 r64
|
|
// RORQ imm8 r64
|
|
// RORQ cl r64
|
|
// RORQ 1 m64
|
|
// RORQ imm8 m64
|
|
// RORQ cl m64
|
|
func RORQ(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR64(mr):
|
|
case operand.IsImm8(ci) && operand.IsR64(mr):
|
|
case operand.IsCl(ci) && operand.IsR64(mr):
|
|
case operand.Is1(ci) && operand.IsM64(mr):
|
|
case operand.IsImm8(ci) && operand.IsM64(mr):
|
|
case operand.IsCl(ci) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RORW: Rotate Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RORW 1 r16
|
|
// RORW imm8 r16
|
|
// RORW cl r16
|
|
// RORW 1 m16
|
|
// RORW imm8 m16
|
|
// RORW cl m16
|
|
func RORW(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR16(mr):
|
|
case operand.IsImm8(ci) && operand.IsR16(mr):
|
|
case operand.IsCl(ci) && operand.IsR16(mr):
|
|
case operand.Is1(ci) && operand.IsM16(mr):
|
|
case operand.IsImm8(ci) && operand.IsM16(mr):
|
|
case operand.IsCl(ci) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RORXL: Rotate Right Logical Without Affecting Flags.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RORXL imm8 r32 r32
|
|
// RORXL imm8 m32 r32
|
|
func RORXL(i, mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsImm8(i) && operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RORXQ: Rotate Right Logical Without Affecting Flags.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RORXQ imm8 r64 r64
|
|
// RORXQ imm8 m64 r64
|
|
func RORXQ(i, mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsImm8(i) && operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ROUNDPD: Round Packed Double Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ROUNDPD imm8 xmm xmm
|
|
// ROUNDPD imm8 m128 xmm
|
|
func ROUNDPD(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ROUNDPS: Round Packed Single Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ROUNDPS imm8 xmm xmm
|
|
// ROUNDPS imm8 m128 xmm
|
|
func ROUNDPS(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ROUNDSD: Round Scalar Double Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ROUNDSD imm8 xmm xmm
|
|
// ROUNDSD imm8 m64 xmm
|
|
func ROUNDSD(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// ROUNDSS: Round Scalar Single Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// ROUNDSS imm8 xmm xmm
|
|
// ROUNDSS imm8 m32 xmm
|
|
func ROUNDSS(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RSQRTPS: Compute Reciprocals of Square Roots of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RSQRTPS xmm xmm
|
|
// RSQRTPS m128 xmm
|
|
func RSQRTPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// RSQRTSS: Compute Reciprocal of Square Root of Scalar Single-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// RSQRTSS xmm xmm
|
|
// RSQRTSS m32 xmm
|
|
func RSQRTSS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SALB: Arithmetic Shift Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SALB 1 r8
|
|
// SALB imm8 r8
|
|
// SALB cl r8
|
|
// SALB 1 m8
|
|
// SALB imm8 m8
|
|
// SALB cl m8
|
|
func SALB(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR8(mr):
|
|
case operand.IsImm8(ci) && operand.IsR8(mr):
|
|
case operand.IsCl(ci) && operand.IsR8(mr):
|
|
case operand.Is1(ci) && operand.IsM8(mr):
|
|
case operand.IsImm8(ci) && operand.IsM8(mr):
|
|
case operand.IsCl(ci) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SALL: Arithmetic Shift Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SALL 1 r32
|
|
// SALL imm8 r32
|
|
// SALL cl r32
|
|
// SALL 1 m32
|
|
// SALL imm8 m32
|
|
// SALL cl m32
|
|
func SALL(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR32(mr):
|
|
case operand.IsImm8(ci) && operand.IsR32(mr):
|
|
case operand.IsCl(ci) && operand.IsR32(mr):
|
|
case operand.Is1(ci) && operand.IsM32(mr):
|
|
case operand.IsImm8(ci) && operand.IsM32(mr):
|
|
case operand.IsCl(ci) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SALQ: Arithmetic Shift Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SALQ 1 r64
|
|
// SALQ imm8 r64
|
|
// SALQ cl r64
|
|
// SALQ 1 m64
|
|
// SALQ imm8 m64
|
|
// SALQ cl m64
|
|
func SALQ(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR64(mr):
|
|
case operand.IsImm8(ci) && operand.IsR64(mr):
|
|
case operand.IsCl(ci) && operand.IsR64(mr):
|
|
case operand.Is1(ci) && operand.IsM64(mr):
|
|
case operand.IsImm8(ci) && operand.IsM64(mr):
|
|
case operand.IsCl(ci) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SALW: Arithmetic Shift Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SALW 1 r16
|
|
// SALW imm8 r16
|
|
// SALW cl r16
|
|
// SALW 1 m16
|
|
// SALW imm8 m16
|
|
// SALW cl m16
|
|
func SALW(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR16(mr):
|
|
case operand.IsImm8(ci) && operand.IsR16(mr):
|
|
case operand.IsCl(ci) && operand.IsR16(mr):
|
|
case operand.Is1(ci) && operand.IsM16(mr):
|
|
case operand.IsImm8(ci) && operand.IsM16(mr):
|
|
case operand.IsCl(ci) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SARB: Arithmetic Shift Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SARB 1 r8
|
|
// SARB imm8 r8
|
|
// SARB cl r8
|
|
// SARB 1 m8
|
|
// SARB imm8 m8
|
|
// SARB cl m8
|
|
func SARB(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR8(mr):
|
|
case operand.IsImm8(ci) && operand.IsR8(mr):
|
|
case operand.IsCl(ci) && operand.IsR8(mr):
|
|
case operand.Is1(ci) && operand.IsM8(mr):
|
|
case operand.IsImm8(ci) && operand.IsM8(mr):
|
|
case operand.IsCl(ci) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SARL: Arithmetic Shift Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SARL 1 r32
|
|
// SARL imm8 r32
|
|
// SARL cl r32
|
|
// SARL 1 m32
|
|
// SARL imm8 m32
|
|
// SARL cl m32
|
|
func SARL(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR32(mr):
|
|
case operand.IsImm8(ci) && operand.IsR32(mr):
|
|
case operand.IsCl(ci) && operand.IsR32(mr):
|
|
case operand.Is1(ci) && operand.IsM32(mr):
|
|
case operand.IsImm8(ci) && operand.IsM32(mr):
|
|
case operand.IsCl(ci) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SARQ: Arithmetic Shift Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SARQ 1 r64
|
|
// SARQ imm8 r64
|
|
// SARQ cl r64
|
|
// SARQ 1 m64
|
|
// SARQ imm8 m64
|
|
// SARQ cl m64
|
|
func SARQ(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR64(mr):
|
|
case operand.IsImm8(ci) && operand.IsR64(mr):
|
|
case operand.IsCl(ci) && operand.IsR64(mr):
|
|
case operand.Is1(ci) && operand.IsM64(mr):
|
|
case operand.IsImm8(ci) && operand.IsM64(mr):
|
|
case operand.IsCl(ci) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SARW: Arithmetic Shift Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SARW 1 r16
|
|
// SARW imm8 r16
|
|
// SARW cl r16
|
|
// SARW 1 m16
|
|
// SARW imm8 m16
|
|
// SARW cl m16
|
|
func SARW(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR16(mr):
|
|
case operand.IsImm8(ci) && operand.IsR16(mr):
|
|
case operand.IsCl(ci) && operand.IsR16(mr):
|
|
case operand.Is1(ci) && operand.IsM16(mr):
|
|
case operand.IsImm8(ci) && operand.IsM16(mr):
|
|
case operand.IsCl(ci) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SARXL: Arithmetic Shift Right Without Affecting Flags.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SARXL r32 r32 r32
|
|
// SARXL r32 m32 r32
|
|
func SARXL(r, mr, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r) && operand.IsR32(mr) && operand.IsR32(r1):
|
|
case operand.IsR32(r) && operand.IsM32(mr) && operand.IsR32(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SARXQ: Arithmetic Shift Right Without Affecting Flags.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SARXQ r64 r64 r64
|
|
// SARXQ r64 m64 r64
|
|
func SARXQ(r, mr, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r) && operand.IsR64(mr) && operand.IsR64(r1):
|
|
case operand.IsR64(r) && operand.IsM64(mr) && operand.IsR64(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SBBB: Subtract with Borrow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SBBB imm8 al
|
|
// SBBB imm8 r8
|
|
// SBBB r8 r8
|
|
// SBBB m8 r8
|
|
// SBBB imm8 m8
|
|
// SBBB r8 m8
|
|
func SBBB(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imr) && operand.IsAl(amr):
|
|
case operand.IsImm8(imr) && operand.IsR8(amr):
|
|
case operand.IsR8(imr) && operand.IsR8(amr):
|
|
case operand.IsM8(imr) && operand.IsR8(amr):
|
|
case operand.IsImm8(imr) && operand.IsM8(amr):
|
|
case operand.IsR8(imr) && operand.IsM8(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SBBL: Subtract with Borrow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SBBL imm32 eax
|
|
// SBBL imm8 r32
|
|
// SBBL imm32 r32
|
|
// SBBL r32 r32
|
|
// SBBL m32 r32
|
|
// SBBL imm8 m32
|
|
// SBBL imm32 m32
|
|
// SBBL r32 m32
|
|
func SBBL(imr, emr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsEax(emr):
|
|
case operand.IsImm8(imr) && operand.IsR32(emr):
|
|
case operand.IsImm32(imr) && operand.IsR32(emr):
|
|
case operand.IsR32(imr) && operand.IsR32(emr):
|
|
case operand.IsM32(imr) && operand.IsR32(emr):
|
|
case operand.IsImm8(imr) && operand.IsM32(emr):
|
|
case operand.IsImm32(imr) && operand.IsM32(emr):
|
|
case operand.IsR32(imr) && operand.IsM32(emr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SBBQ: Subtract with Borrow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SBBQ imm32 rax
|
|
// SBBQ imm8 r64
|
|
// SBBQ imm32 r64
|
|
// SBBQ r64 r64
|
|
// SBBQ m64 r64
|
|
// SBBQ imm8 m64
|
|
// SBBQ imm32 m64
|
|
// SBBQ r64 m64
|
|
func SBBQ(imr, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsRax(mr):
|
|
case operand.IsImm8(imr) && operand.IsR64(mr):
|
|
case operand.IsImm32(imr) && operand.IsR64(mr):
|
|
case operand.IsR64(imr) && operand.IsR64(mr):
|
|
case operand.IsM64(imr) && operand.IsR64(mr):
|
|
case operand.IsImm8(imr) && operand.IsM64(mr):
|
|
case operand.IsImm32(imr) && operand.IsM64(mr):
|
|
case operand.IsR64(imr) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SBBW: Subtract with Borrow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SBBW imm16 ax
|
|
// SBBW imm8 r16
|
|
// SBBW imm16 r16
|
|
// SBBW r16 r16
|
|
// SBBW m16 r16
|
|
// SBBW imm8 m16
|
|
// SBBW imm16 m16
|
|
// SBBW r16 m16
|
|
func SBBW(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(imr) && operand.IsAx(amr):
|
|
case operand.IsImm8(imr) && operand.IsR16(amr):
|
|
case operand.IsImm16(imr) && operand.IsR16(amr):
|
|
case operand.IsR16(imr) && operand.IsR16(amr):
|
|
case operand.IsM16(imr) && operand.IsR16(amr):
|
|
case operand.IsImm8(imr) && operand.IsM16(amr):
|
|
case operand.IsImm16(imr) && operand.IsM16(amr):
|
|
case operand.IsR16(imr) && operand.IsM16(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETCC: Set byte if above or equal (CF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETCC r8
|
|
// SETCC m8
|
|
// SETCC r8
|
|
// SETCC m8
|
|
// SETCC r8
|
|
// SETCC m8
|
|
func SETCC(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETCS: Set byte if below (CF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETCS r8
|
|
// SETCS m8
|
|
// SETCS r8
|
|
// SETCS m8
|
|
// SETCS r8
|
|
// SETCS m8
|
|
func SETCS(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETEQ: Set byte if equal (ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETEQ r8
|
|
// SETEQ m8
|
|
// SETEQ r8
|
|
// SETEQ m8
|
|
func SETEQ(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETGE: Set byte if greater or equal (SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETGE r8
|
|
// SETGE m8
|
|
// SETGE r8
|
|
// SETGE m8
|
|
func SETGE(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETGT: Set byte if greater (ZF == 0 and SF == OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETGT r8
|
|
// SETGT m8
|
|
// SETGT r8
|
|
// SETGT m8
|
|
func SETGT(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETHI: Set byte if above (CF == 0 and ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETHI r8
|
|
// SETHI m8
|
|
// SETHI r8
|
|
// SETHI m8
|
|
func SETHI(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETLE: Set byte if less or equal (ZF == 1 or SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETLE r8
|
|
// SETLE m8
|
|
// SETLE r8
|
|
// SETLE m8
|
|
func SETLE(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETLS: Set byte if below or equal (CF == 1 or ZF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETLS r8
|
|
// SETLS m8
|
|
// SETLS r8
|
|
// SETLS m8
|
|
func SETLS(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETLT: Set byte if less (SF != OF).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETLT r8
|
|
// SETLT m8
|
|
// SETLT r8
|
|
// SETLT m8
|
|
func SETLT(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETMI: Set byte if sign (SF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETMI r8
|
|
// SETMI m8
|
|
func SETMI(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETNE: Set byte if not equal (ZF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETNE r8
|
|
// SETNE m8
|
|
// SETNE r8
|
|
// SETNE m8
|
|
func SETNE(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETOC: Set byte if not overflow (OF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETOC r8
|
|
// SETOC m8
|
|
func SETOC(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETOS: Set byte if overflow (OF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETOS r8
|
|
// SETOS m8
|
|
func SETOS(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETPC: Set byte if not parity (PF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETPC r8
|
|
// SETPC m8
|
|
// SETPC r8
|
|
// SETPC m8
|
|
func SETPC(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETPL: Set byte if not sign (SF == 0).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETPL r8
|
|
// SETPL m8
|
|
func SETPL(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SETPS: Set byte if parity (PF == 1).
|
|
//
|
|
// Forms:
|
|
//
|
|
// SETPS r8
|
|
// SETPS m8
|
|
// SETPS r8
|
|
// SETPS m8
|
|
func SETPS(mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
case operand.IsR8(mr):
|
|
case operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SFENCE: Store Fence.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SFENCE
|
|
func SFENCE() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// SHA1MSG1: Perform an Intermediate Calculation for the Next Four SHA1 Message Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHA1MSG1 xmm xmm
|
|
// SHA1MSG1 m128 xmm
|
|
func SHA1MSG1(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHA1MSG2: Perform a Final Calculation for the Next Four SHA1 Message Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHA1MSG2 xmm xmm
|
|
// SHA1MSG2 m128 xmm
|
|
func SHA1MSG2(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHA1NEXTE: Calculate SHA1 State Variable E after Four Rounds.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHA1NEXTE xmm xmm
|
|
// SHA1NEXTE m128 xmm
|
|
func SHA1NEXTE(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHA1RNDS4: Perform Four Rounds of SHA1 Operation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHA1RNDS4 imm2u xmm xmm
|
|
// SHA1RNDS4 imm2u m128 xmm
|
|
func SHA1RNDS4(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm2u(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm2u(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHA256MSG1: Perform an Intermediate Calculation for the Next Four SHA256 Message Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHA256MSG1 xmm xmm
|
|
// SHA256MSG1 m128 xmm
|
|
func SHA256MSG1(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHA256MSG2: Perform a Final Calculation for the Next Four SHA256 Message Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHA256MSG2 xmm xmm
|
|
// SHA256MSG2 m128 xmm
|
|
func SHA256MSG2(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHA256RNDS2: Perform Two Rounds of SHA256 Operation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHA256RNDS2 xmm0 xmm xmm
|
|
// SHA256RNDS2 xmm0 m128 xmm
|
|
func SHA256RNDS2(x, mx, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm0(x) && operand.IsXmm(mx) && operand.IsXmm(x1):
|
|
case operand.IsXmm0(x) && operand.IsM128(mx) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHLB: Logical Shift Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHLB 1 r8
|
|
// SHLB imm8 r8
|
|
// SHLB cl r8
|
|
// SHLB 1 m8
|
|
// SHLB imm8 m8
|
|
// SHLB cl m8
|
|
func SHLB(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR8(mr):
|
|
case operand.IsImm8(ci) && operand.IsR8(mr):
|
|
case operand.IsCl(ci) && operand.IsR8(mr):
|
|
case operand.Is1(ci) && operand.IsM8(mr):
|
|
case operand.IsImm8(ci) && operand.IsM8(mr):
|
|
case operand.IsCl(ci) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHLL: Logical Shift Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHLL 1 r32
|
|
// SHLL imm8 r32
|
|
// SHLL cl r32
|
|
// SHLL 1 m32
|
|
// SHLL imm8 m32
|
|
// SHLL cl m32
|
|
// SHLL imm8 r32 r32
|
|
// SHLL cl r32 r32
|
|
// SHLL imm8 r32 m32
|
|
// SHLL cl r32 m32
|
|
func SHLL(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR32(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsR32(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsR32(ops[1]):
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM32(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsM32(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsM32(ops[1]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR32(ops[1]) && operand.IsR32(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR32(ops[1]) && operand.IsR32(ops[2]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR32(ops[1]) && operand.IsM32(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR32(ops[1]) && operand.IsM32(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHLQ: Logical Shift Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHLQ 1 r64
|
|
// SHLQ imm8 r64
|
|
// SHLQ cl r64
|
|
// SHLQ 1 m64
|
|
// SHLQ imm8 m64
|
|
// SHLQ cl m64
|
|
// SHLQ imm8 r64 r64
|
|
// SHLQ cl r64 r64
|
|
// SHLQ imm8 r64 m64
|
|
// SHLQ cl r64 m64
|
|
func SHLQ(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR64(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsR64(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsR64(ops[1]):
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR64(ops[1]) && operand.IsR64(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR64(ops[1]) && operand.IsR64(ops[2]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR64(ops[1]) && operand.IsM64(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR64(ops[1]) && operand.IsM64(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHLW: Logical Shift Left.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHLW 1 r16
|
|
// SHLW imm8 r16
|
|
// SHLW cl r16
|
|
// SHLW 1 m16
|
|
// SHLW imm8 m16
|
|
// SHLW cl m16
|
|
// SHLW imm8 r16 r16
|
|
// SHLW cl r16 r16
|
|
// SHLW imm8 r16 m16
|
|
// SHLW cl r16 m16
|
|
func SHLW(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR16(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsR16(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsR16(ops[1]):
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM16(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsM16(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsM16(ops[1]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR16(ops[1]) && operand.IsR16(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR16(ops[1]) && operand.IsR16(ops[2]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR16(ops[1]) && operand.IsM16(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR16(ops[1]) && operand.IsM16(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHLXL: Logical Shift Left Without Affecting Flags.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHLXL r32 r32 r32
|
|
// SHLXL r32 m32 r32
|
|
func SHLXL(r, mr, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r) && operand.IsR32(mr) && operand.IsR32(r1):
|
|
case operand.IsR32(r) && operand.IsM32(mr) && operand.IsR32(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHLXQ: Logical Shift Left Without Affecting Flags.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHLXQ r64 r64 r64
|
|
// SHLXQ r64 m64 r64
|
|
func SHLXQ(r, mr, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r) && operand.IsR64(mr) && operand.IsR64(r1):
|
|
case operand.IsR64(r) && operand.IsM64(mr) && operand.IsR64(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHRB: Logical Shift Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHRB 1 r8
|
|
// SHRB imm8 r8
|
|
// SHRB cl r8
|
|
// SHRB 1 m8
|
|
// SHRB imm8 m8
|
|
// SHRB cl m8
|
|
func SHRB(ci, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.Is1(ci) && operand.IsR8(mr):
|
|
case operand.IsImm8(ci) && operand.IsR8(mr):
|
|
case operand.IsCl(ci) && operand.IsR8(mr):
|
|
case operand.Is1(ci) && operand.IsM8(mr):
|
|
case operand.IsImm8(ci) && operand.IsM8(mr):
|
|
case operand.IsCl(ci) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHRL: Logical Shift Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHRL 1 r32
|
|
// SHRL imm8 r32
|
|
// SHRL cl r32
|
|
// SHRL 1 m32
|
|
// SHRL imm8 m32
|
|
// SHRL cl m32
|
|
// SHRL imm8 r32 r32
|
|
// SHRL cl r32 r32
|
|
// SHRL imm8 r32 m32
|
|
// SHRL cl r32 m32
|
|
func SHRL(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR32(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsR32(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsR32(ops[1]):
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM32(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsM32(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsM32(ops[1]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR32(ops[1]) && operand.IsR32(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR32(ops[1]) && operand.IsR32(ops[2]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR32(ops[1]) && operand.IsM32(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR32(ops[1]) && operand.IsM32(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHRQ: Logical Shift Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHRQ 1 r64
|
|
// SHRQ imm8 r64
|
|
// SHRQ cl r64
|
|
// SHRQ 1 m64
|
|
// SHRQ imm8 m64
|
|
// SHRQ cl m64
|
|
// SHRQ imm8 r64 r64
|
|
// SHRQ cl r64 r64
|
|
// SHRQ imm8 r64 m64
|
|
// SHRQ cl r64 m64
|
|
func SHRQ(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR64(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsR64(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsR64(ops[1]):
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR64(ops[1]) && operand.IsR64(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR64(ops[1]) && operand.IsR64(ops[2]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR64(ops[1]) && operand.IsM64(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR64(ops[1]) && operand.IsM64(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHRW: Logical Shift Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHRW 1 r16
|
|
// SHRW imm8 r16
|
|
// SHRW cl r16
|
|
// SHRW 1 m16
|
|
// SHRW imm8 m16
|
|
// SHRW cl m16
|
|
// SHRW imm8 r16 r16
|
|
// SHRW cl r16 r16
|
|
// SHRW imm8 r16 m16
|
|
// SHRW cl r16 m16
|
|
func SHRW(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR16(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsR16(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsR16(ops[1]):
|
|
case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM16(ops[1]):
|
|
case len(ops) == 2 && operand.IsImm8(ops[0]) && operand.IsM16(ops[1]):
|
|
case len(ops) == 2 && operand.IsCl(ops[0]) && operand.IsM16(ops[1]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR16(ops[1]) && operand.IsR16(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR16(ops[1]) && operand.IsR16(ops[2]):
|
|
case len(ops) == 3 && operand.IsImm8(ops[0]) && operand.IsR16(ops[1]) && operand.IsM16(ops[2]):
|
|
case len(ops) == 3 && operand.IsCl(ops[0]) && operand.IsR16(ops[1]) && operand.IsM16(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHRXL: Logical Shift Right Without Affecting Flags.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHRXL r32 r32 r32
|
|
// SHRXL r32 m32 r32
|
|
func SHRXL(r, mr, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r) && operand.IsR32(mr) && operand.IsR32(r1):
|
|
case operand.IsR32(r) && operand.IsM32(mr) && operand.IsR32(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHRXQ: Logical Shift Right Without Affecting Flags.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHRXQ r64 r64 r64
|
|
// SHRXQ r64 m64 r64
|
|
func SHRXQ(r, mr, r1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r) && operand.IsR64(mr) && operand.IsR64(r1):
|
|
case operand.IsR64(r) && operand.IsM64(mr) && operand.IsR64(r1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHUFPD: Shuffle Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHUFPD imm8 xmm xmm
|
|
// SHUFPD imm8 m128 xmm
|
|
func SHUFPD(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SHUFPS: Shuffle Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SHUFPS imm8 xmm xmm
|
|
// SHUFPS imm8 m128 xmm
|
|
func SHUFPS(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SQRTPD: Compute Square Roots of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SQRTPD xmm xmm
|
|
// SQRTPD m128 xmm
|
|
func SQRTPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SQRTPS: Compute Square Roots of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SQRTPS xmm xmm
|
|
// SQRTPS m128 xmm
|
|
func SQRTPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SQRTSD: Compute Square Root of Scalar Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SQRTSD xmm xmm
|
|
// SQRTSD m64 xmm
|
|
func SQRTSD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SQRTSS: Compute Square Root of Scalar Single-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SQRTSS xmm xmm
|
|
// SQRTSS m32 xmm
|
|
func SQRTSS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// STC: Set Carry Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// STC
|
|
func STC() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// STD: Set Direction Flag.
|
|
//
|
|
// Forms:
|
|
//
|
|
// STD
|
|
func STD() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// STMXCSR: Store MXCSR Register State.
|
|
//
|
|
// Forms:
|
|
//
|
|
// STMXCSR m32
|
|
func STMXCSR(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM32(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SUBB: Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SUBB imm8 al
|
|
// SUBB imm8 r8
|
|
// SUBB r8 r8
|
|
// SUBB m8 r8
|
|
// SUBB imm8 m8
|
|
// SUBB r8 m8
|
|
func SUBB(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imr) && operand.IsAl(amr):
|
|
case operand.IsImm8(imr) && operand.IsR8(amr):
|
|
case operand.IsR8(imr) && operand.IsR8(amr):
|
|
case operand.IsM8(imr) && operand.IsR8(amr):
|
|
case operand.IsImm8(imr) && operand.IsM8(amr):
|
|
case operand.IsR8(imr) && operand.IsM8(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SUBL: Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SUBL imm32 eax
|
|
// SUBL imm8 r32
|
|
// SUBL imm32 r32
|
|
// SUBL r32 r32
|
|
// SUBL m32 r32
|
|
// SUBL imm8 m32
|
|
// SUBL imm32 m32
|
|
// SUBL r32 m32
|
|
func SUBL(imr, emr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsEax(emr):
|
|
case operand.IsImm8(imr) && operand.IsR32(emr):
|
|
case operand.IsImm32(imr) && operand.IsR32(emr):
|
|
case operand.IsR32(imr) && operand.IsR32(emr):
|
|
case operand.IsM32(imr) && operand.IsR32(emr):
|
|
case operand.IsImm8(imr) && operand.IsM32(emr):
|
|
case operand.IsImm32(imr) && operand.IsM32(emr):
|
|
case operand.IsR32(imr) && operand.IsM32(emr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SUBPD: Subtract Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SUBPD xmm xmm
|
|
// SUBPD m128 xmm
|
|
func SUBPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SUBPS: Subtract Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SUBPS xmm xmm
|
|
// SUBPS m128 xmm
|
|
func SUBPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SUBQ: Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SUBQ imm32 rax
|
|
// SUBQ imm8 r64
|
|
// SUBQ imm32 r64
|
|
// SUBQ r64 r64
|
|
// SUBQ m64 r64
|
|
// SUBQ imm8 m64
|
|
// SUBQ imm32 m64
|
|
// SUBQ r64 m64
|
|
func SUBQ(imr, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsRax(mr):
|
|
case operand.IsImm8(imr) && operand.IsR64(mr):
|
|
case operand.IsImm32(imr) && operand.IsR64(mr):
|
|
case operand.IsR64(imr) && operand.IsR64(mr):
|
|
case operand.IsM64(imr) && operand.IsR64(mr):
|
|
case operand.IsImm8(imr) && operand.IsM64(mr):
|
|
case operand.IsImm32(imr) && operand.IsM64(mr):
|
|
case operand.IsR64(imr) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SUBSD: Subtract Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SUBSD xmm xmm
|
|
// SUBSD m64 xmm
|
|
func SUBSD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SUBSS: Subtract Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SUBSS xmm xmm
|
|
// SUBSS m32 xmm
|
|
func SUBSS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SUBW: Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SUBW imm16 ax
|
|
// SUBW imm8 r16
|
|
// SUBW imm16 r16
|
|
// SUBW r16 r16
|
|
// SUBW m16 r16
|
|
// SUBW imm8 m16
|
|
// SUBW imm16 m16
|
|
// SUBW r16 m16
|
|
func SUBW(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(imr) && operand.IsAx(amr):
|
|
case operand.IsImm8(imr) && operand.IsR16(amr):
|
|
case operand.IsImm16(imr) && operand.IsR16(amr):
|
|
case operand.IsR16(imr) && operand.IsR16(amr):
|
|
case operand.IsM16(imr) && operand.IsR16(amr):
|
|
case operand.IsImm8(imr) && operand.IsM16(amr):
|
|
case operand.IsImm16(imr) && operand.IsM16(amr):
|
|
case operand.IsR16(imr) && operand.IsM16(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// SYSCALL: Fast System Call.
|
|
//
|
|
// Forms:
|
|
//
|
|
// SYSCALL
|
|
func SYSCALL() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// TESTB: Logical Compare.
|
|
//
|
|
// Forms:
|
|
//
|
|
// TESTB imm8 al
|
|
// TESTB imm8 r8
|
|
// TESTB r8 r8
|
|
// TESTB imm8 m8
|
|
// TESTB r8 m8
|
|
func TESTB(ir, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(ir) && operand.IsAl(amr):
|
|
case operand.IsImm8(ir) && operand.IsR8(amr):
|
|
case operand.IsR8(ir) && operand.IsR8(amr):
|
|
case operand.IsImm8(ir) && operand.IsM8(amr):
|
|
case operand.IsR8(ir) && operand.IsM8(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// TESTL: Logical Compare.
|
|
//
|
|
// Forms:
|
|
//
|
|
// TESTL imm32 eax
|
|
// TESTL imm32 r32
|
|
// TESTL r32 r32
|
|
// TESTL imm32 m32
|
|
// TESTL r32 m32
|
|
func TESTL(ir, emr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(ir) && operand.IsEax(emr):
|
|
case operand.IsImm32(ir) && operand.IsR32(emr):
|
|
case operand.IsR32(ir) && operand.IsR32(emr):
|
|
case operand.IsImm32(ir) && operand.IsM32(emr):
|
|
case operand.IsR32(ir) && operand.IsM32(emr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// TESTQ: Logical Compare.
|
|
//
|
|
// Forms:
|
|
//
|
|
// TESTQ imm32 rax
|
|
// TESTQ imm32 r64
|
|
// TESTQ r64 r64
|
|
// TESTQ imm32 m64
|
|
// TESTQ r64 m64
|
|
func TESTQ(ir, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(ir) && operand.IsRax(mr):
|
|
case operand.IsImm32(ir) && operand.IsR64(mr):
|
|
case operand.IsR64(ir) && operand.IsR64(mr):
|
|
case operand.IsImm32(ir) && operand.IsM64(mr):
|
|
case operand.IsR64(ir) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// TESTW: Logical Compare.
|
|
//
|
|
// Forms:
|
|
//
|
|
// TESTW imm16 ax
|
|
// TESTW imm16 r16
|
|
// TESTW r16 r16
|
|
// TESTW imm16 m16
|
|
// TESTW r16 m16
|
|
func TESTW(ir, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(ir) && operand.IsAx(amr):
|
|
case operand.IsImm16(ir) && operand.IsR16(amr):
|
|
case operand.IsR16(ir) && operand.IsR16(amr):
|
|
case operand.IsImm16(ir) && operand.IsM16(amr):
|
|
case operand.IsR16(ir) && operand.IsM16(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// TZCNTL: Count the Number of Trailing Zero Bits.
|
|
//
|
|
// Forms:
|
|
//
|
|
// TZCNTL r32 r32
|
|
// TZCNTL m32 r32
|
|
func TZCNTL(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsR32(r):
|
|
case operand.IsM32(mr) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// TZCNTQ: Count the Number of Trailing Zero Bits.
|
|
//
|
|
// Forms:
|
|
//
|
|
// TZCNTQ r64 r64
|
|
// TZCNTQ m64 r64
|
|
func TZCNTQ(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsR64(r):
|
|
case operand.IsM64(mr) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// TZCNTW: Count the Number of Trailing Zero Bits.
|
|
//
|
|
// Forms:
|
|
//
|
|
// TZCNTW r16 r16
|
|
// TZCNTW m16 r16
|
|
func TZCNTW(mr, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(mr) && operand.IsR16(r):
|
|
case operand.IsM16(mr) && operand.IsR16(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// UCOMISD: Unordered Compare Scalar Double-Precision Floating-Point Values and Set EFLAGS.
|
|
//
|
|
// Forms:
|
|
//
|
|
// UCOMISD xmm xmm
|
|
// UCOMISD m64 xmm
|
|
func UCOMISD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// UCOMISS: Unordered Compare Scalar Single-Precision Floating-Point Values and Set EFLAGS.
|
|
//
|
|
// Forms:
|
|
//
|
|
// UCOMISS xmm xmm
|
|
// UCOMISS m32 xmm
|
|
func UCOMISS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// UD2: Undefined Instruction.
|
|
//
|
|
// Forms:
|
|
//
|
|
// UD2
|
|
func UD2() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// UNPCKHPD: Unpack and Interleave High Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// UNPCKHPD xmm xmm
|
|
// UNPCKHPD m128 xmm
|
|
func UNPCKHPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// UNPCKHPS: Unpack and Interleave High Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// UNPCKHPS xmm xmm
|
|
// UNPCKHPS m128 xmm
|
|
func UNPCKHPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// UNPCKLPD: Unpack and Interleave Low Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// UNPCKLPD xmm xmm
|
|
// UNPCKLPD m128 xmm
|
|
func UNPCKLPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// UNPCKLPS: Unpack and Interleave Low Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// UNPCKLPS xmm xmm
|
|
// UNPCKLPS m128 xmm
|
|
func UNPCKLPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VADDPD: Add Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VADDPD xmm xmm xmm
|
|
// VADDPD m128 xmm xmm
|
|
// VADDPD ymm ymm ymm
|
|
// VADDPD m256 ymm ymm
|
|
func VADDPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VADDPS: Add Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VADDPS xmm xmm xmm
|
|
// VADDPS m128 xmm xmm
|
|
// VADDPS ymm ymm ymm
|
|
// VADDPS m256 ymm ymm
|
|
func VADDPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VADDSD: Add Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VADDSD xmm xmm xmm
|
|
// VADDSD m64 xmm xmm
|
|
func VADDSD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VADDSS: Add Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VADDSS xmm xmm xmm
|
|
// VADDSS m32 xmm xmm
|
|
func VADDSS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VADDSUBPD: Packed Double-FP Add/Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VADDSUBPD xmm xmm xmm
|
|
// VADDSUBPD m128 xmm xmm
|
|
// VADDSUBPD ymm ymm ymm
|
|
// VADDSUBPD m256 ymm ymm
|
|
func VADDSUBPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VADDSUBPS: Packed Single-FP Add/Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VADDSUBPS xmm xmm xmm
|
|
// VADDSUBPS m128 xmm xmm
|
|
// VADDSUBPS ymm ymm ymm
|
|
// VADDSUBPS m256 ymm ymm
|
|
func VADDSUBPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VAESDEC: Perform One Round of an AES Decryption Flow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VAESDEC xmm xmm xmm
|
|
// VAESDEC m128 xmm xmm
|
|
func VAESDEC(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM128(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VAESDECLAST: Perform Last Round of an AES Decryption Flow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VAESDECLAST xmm xmm xmm
|
|
// VAESDECLAST m128 xmm xmm
|
|
func VAESDECLAST(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM128(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VAESENC: Perform One Round of an AES Encryption Flow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VAESENC xmm xmm xmm
|
|
// VAESENC m128 xmm xmm
|
|
func VAESENC(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM128(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VAESENCLAST: Perform Last Round of an AES Encryption Flow.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VAESENCLAST xmm xmm xmm
|
|
// VAESENCLAST m128 xmm xmm
|
|
func VAESENCLAST(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM128(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VAESIMC: Perform the AES InvMixColumn Transformation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VAESIMC xmm xmm
|
|
// VAESIMC m128 xmm
|
|
func VAESIMC(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VAESKEYGENASSIST: AES Round Key Generation Assist.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VAESKEYGENASSIST imm8 xmm xmm
|
|
// VAESKEYGENASSIST imm8 m128 xmm
|
|
func VAESKEYGENASSIST(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VANDNPD: Bitwise Logical AND NOT of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VANDNPD xmm xmm xmm
|
|
// VANDNPD m128 xmm xmm
|
|
// VANDNPD ymm ymm ymm
|
|
// VANDNPD m256 ymm ymm
|
|
func VANDNPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VANDNPS: Bitwise Logical AND NOT of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VANDNPS xmm xmm xmm
|
|
// VANDNPS m128 xmm xmm
|
|
// VANDNPS ymm ymm ymm
|
|
// VANDNPS m256 ymm ymm
|
|
func VANDNPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VANDPD: Bitwise Logical AND of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VANDPD xmm xmm xmm
|
|
// VANDPD m128 xmm xmm
|
|
// VANDPD ymm ymm ymm
|
|
// VANDPD m256 ymm ymm
|
|
func VANDPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VANDPS: Bitwise Logical AND of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VANDPS xmm xmm xmm
|
|
// VANDPS m128 xmm xmm
|
|
// VANDPS ymm ymm ymm
|
|
// VANDPS m256 ymm ymm
|
|
func VANDPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VBLENDPD: Blend Packed Double Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VBLENDPD imm8 xmm xmm xmm
|
|
// VBLENDPD imm8 m128 xmm xmm
|
|
// VBLENDPD imm8 ymm ymm ymm
|
|
// VBLENDPD imm8 m256 ymm ymm
|
|
func VBLENDPD(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VBLENDPS: Blend Packed Single Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VBLENDPS imm8 xmm xmm xmm
|
|
// VBLENDPS imm8 m128 xmm xmm
|
|
// VBLENDPS imm8 ymm ymm ymm
|
|
// VBLENDPS imm8 m256 ymm ymm
|
|
func VBLENDPS(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VBLENDVPD: Variable Blend Packed Double Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VBLENDVPD xmm xmm xmm xmm
|
|
// VBLENDVPD xmm m128 xmm xmm
|
|
// VBLENDVPD ymm ymm ymm ymm
|
|
// VBLENDVPD ymm m256 ymm ymm
|
|
func VBLENDVPD(xy, mxy, xy1, xy2 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsXmm(mxy) && operand.IsXmm(xy1) && operand.IsXmm(xy2):
|
|
case operand.IsXmm(xy) && operand.IsM128(mxy) && operand.IsXmm(xy1) && operand.IsXmm(xy2):
|
|
case operand.IsYmm(xy) && operand.IsYmm(mxy) && operand.IsYmm(xy1) && operand.IsYmm(xy2):
|
|
case operand.IsYmm(xy) && operand.IsM256(mxy) && operand.IsYmm(xy1) && operand.IsYmm(xy2):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VBLENDVPS: Variable Blend Packed Single Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VBLENDVPS xmm xmm xmm xmm
|
|
// VBLENDVPS xmm m128 xmm xmm
|
|
// VBLENDVPS ymm ymm ymm ymm
|
|
// VBLENDVPS ymm m256 ymm ymm
|
|
func VBLENDVPS(xy, mxy, xy1, xy2 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsXmm(mxy) && operand.IsXmm(xy1) && operand.IsXmm(xy2):
|
|
case operand.IsXmm(xy) && operand.IsM128(mxy) && operand.IsXmm(xy1) && operand.IsXmm(xy2):
|
|
case operand.IsYmm(xy) && operand.IsYmm(mxy) && operand.IsYmm(xy1) && operand.IsYmm(xy2):
|
|
case operand.IsYmm(xy) && operand.IsM256(mxy) && operand.IsYmm(xy1) && operand.IsYmm(xy2):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VBROADCASTF128: Broadcast 128 Bit of Floating-Point Data.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VBROADCASTF128 m128 ymm
|
|
func VBROADCASTF128(m, y avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(m) && operand.IsYmm(y):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VBROADCASTI128: Broadcast 128 Bits of Integer Data.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VBROADCASTI128 m128 ymm
|
|
func VBROADCASTI128(m, y avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(m) && operand.IsYmm(y):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VBROADCASTSD: Broadcast Double-Precision Floating-Point Element.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VBROADCASTSD xmm ymm
|
|
// VBROADCASTSD m64 ymm
|
|
func VBROADCASTSD(mx, y avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsYmm(y):
|
|
case operand.IsM64(mx) && operand.IsYmm(y):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VBROADCASTSS: Broadcast Single-Precision Floating-Point Element.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VBROADCASTSS xmm xmm
|
|
// VBROADCASTSS m32 xmm
|
|
// VBROADCASTSS xmm ymm
|
|
// VBROADCASTSS m32 ymm
|
|
func VBROADCASTSS(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM32(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM32(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCMPPD: Compare Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCMPPD imm8 xmm xmm xmm
|
|
// VCMPPD imm8 m128 xmm xmm
|
|
// VCMPPD imm8 ymm ymm ymm
|
|
// VCMPPD imm8 m256 ymm ymm
|
|
func VCMPPD(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCMPPS: Compare Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCMPPS imm8 xmm xmm xmm
|
|
// VCMPPS imm8 m128 xmm xmm
|
|
// VCMPPS imm8 ymm ymm ymm
|
|
// VCMPPS imm8 m256 ymm ymm
|
|
func VCMPPS(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCMPSD: Compare Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCMPSD imm8 xmm xmm xmm
|
|
// VCMPSD imm8 m64 xmm xmm
|
|
func VCMPSD(i, mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCMPSS: Compare Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCMPSS imm8 xmm xmm xmm
|
|
// VCMPSS imm8 m32 xmm xmm
|
|
func VCMPSS(i, mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCOMISD: Compare Scalar Ordered Double-Precision Floating-Point Values and Set EFLAGS.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCOMISD xmm xmm
|
|
// VCOMISD m64 xmm
|
|
func VCOMISD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCOMISS: Compare Scalar Ordered Single-Precision Floating-Point Values and Set EFLAGS.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCOMISS xmm xmm
|
|
// VCOMISS m32 xmm
|
|
func VCOMISS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTDQ2PD: Convert Packed Dword Integers to Packed Double-Precision FP Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTDQ2PD xmm xmm
|
|
// VCVTDQ2PD m64 xmm
|
|
// VCVTDQ2PD xmm ymm
|
|
// VCVTDQ2PD m128 ymm
|
|
func VCVTDQ2PD(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM64(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM128(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTDQ2PS: Convert Packed Dword Integers to Packed Single-Precision FP Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTDQ2PS xmm xmm
|
|
// VCVTDQ2PS m128 xmm
|
|
// VCVTDQ2PS ymm ymm
|
|
// VCVTDQ2PS m256 ymm
|
|
func VCVTDQ2PS(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTPD2DQX: Convert Packed Double-Precision FP Values to Packed Dword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTPD2DQX xmm xmm
|
|
// VCVTPD2DQX m128 xmm
|
|
func VCVTPD2DQX(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTPD2DQY: Convert Packed Double-Precision FP Values to Packed Dword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTPD2DQY ymm xmm
|
|
// VCVTPD2DQY m256 xmm
|
|
func VCVTPD2DQY(my, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsYmm(my) && operand.IsXmm(x):
|
|
case operand.IsM256(my) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTPD2PSX: Convert Packed Double-Precision FP Values to Packed Single-Precision FP Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTPD2PSX xmm xmm
|
|
// VCVTPD2PSX m128 xmm
|
|
func VCVTPD2PSX(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTPD2PSY: Convert Packed Double-Precision FP Values to Packed Single-Precision FP Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTPD2PSY ymm xmm
|
|
// VCVTPD2PSY m256 xmm
|
|
func VCVTPD2PSY(my, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsYmm(my) && operand.IsXmm(x):
|
|
case operand.IsM256(my) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTPH2PS: Convert Half-Precision FP Values to Single-Precision FP Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTPH2PS xmm xmm
|
|
// VCVTPH2PS m64 xmm
|
|
// VCVTPH2PS xmm ymm
|
|
// VCVTPH2PS m128 ymm
|
|
func VCVTPH2PS(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM64(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM128(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTPS2DQ: Convert Packed Single-Precision FP Values to Packed Dword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTPS2DQ xmm xmm
|
|
// VCVTPS2DQ m128 xmm
|
|
// VCVTPS2DQ ymm ymm
|
|
// VCVTPS2DQ m256 ymm
|
|
func VCVTPS2DQ(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTPS2PD: Convert Packed Single-Precision FP Values to Packed Double-Precision FP Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTPS2PD xmm xmm
|
|
// VCVTPS2PD m64 xmm
|
|
// VCVTPS2PD xmm ymm
|
|
// VCVTPS2PD m128 ymm
|
|
func VCVTPS2PD(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM64(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM128(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTPS2PH: Convert Single-Precision FP value to Half-Precision FP value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTPS2PH imm8 xmm xmm
|
|
// VCVTPS2PH imm8 ymm xmm
|
|
// VCVTPS2PH imm8 xmm m64
|
|
// VCVTPS2PH imm8 ymm m128
|
|
func VCVTPS2PH(i, xy, mx avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(xy) && operand.IsXmm(mx):
|
|
case operand.IsImm8(i) && operand.IsYmm(xy) && operand.IsXmm(mx):
|
|
case operand.IsImm8(i) && operand.IsXmm(xy) && operand.IsM64(mx):
|
|
case operand.IsImm8(i) && operand.IsYmm(xy) && operand.IsM128(mx):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTSD2SI: Convert Scalar Double-Precision FP Value to Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTSD2SI xmm r32
|
|
// VCVTSD2SI m64 r32
|
|
func VCVTSD2SI(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR32(r):
|
|
case operand.IsM64(mx) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTSD2SIQ: Convert Scalar Double-Precision FP Value to Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTSD2SIQ xmm r64
|
|
// VCVTSD2SIQ m64 r64
|
|
func VCVTSD2SIQ(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR64(r):
|
|
case operand.IsM64(mx) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTSD2SS: Convert Scalar Double-Precision FP Value to Scalar Single-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTSD2SS xmm xmm xmm
|
|
// VCVTSD2SS m64 xmm xmm
|
|
func VCVTSD2SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTSI2SDL: Convert Dword Integer to Scalar Double-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTSI2SDL r32 xmm xmm
|
|
// VCVTSI2SDL m32 xmm xmm
|
|
func VCVTSI2SDL(mr, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTSI2SDQ: Convert Dword Integer to Scalar Double-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTSI2SDQ r64 xmm xmm
|
|
// VCVTSI2SDQ m64 xmm xmm
|
|
func VCVTSI2SDQ(mr, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTSI2SSL: Convert Dword Integer to Scalar Single-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTSI2SSL r32 xmm xmm
|
|
// VCVTSI2SSL m32 xmm xmm
|
|
func VCVTSI2SSL(mr, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTSI2SSQ: Convert Dword Integer to Scalar Single-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTSI2SSQ r64 xmm xmm
|
|
// VCVTSI2SSQ m64 xmm xmm
|
|
func VCVTSI2SSQ(mr, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTSS2SD: Convert Scalar Single-Precision FP Value to Scalar Double-Precision FP Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTSS2SD xmm xmm xmm
|
|
// VCVTSS2SD m32 xmm xmm
|
|
func VCVTSS2SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTSS2SI: Convert Scalar Single-Precision FP Value to Dword Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTSS2SI xmm r32
|
|
// VCVTSS2SI m32 r32
|
|
func VCVTSS2SI(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR32(r):
|
|
case operand.IsM32(mx) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTSS2SIQ: Convert Scalar Single-Precision FP Value to Dword Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTSS2SIQ xmm r64
|
|
// VCVTSS2SIQ m32 r64
|
|
func VCVTSS2SIQ(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR64(r):
|
|
case operand.IsM32(mx) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTTPD2DQX: Convert with Truncation Packed Double-Precision FP Values to Packed Dword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTTPD2DQX xmm xmm
|
|
// VCVTTPD2DQX m128 xmm
|
|
func VCVTTPD2DQX(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTTPD2DQY: Convert with Truncation Packed Double-Precision FP Values to Packed Dword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTTPD2DQY ymm xmm
|
|
// VCVTTPD2DQY m256 xmm
|
|
func VCVTTPD2DQY(my, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsYmm(my) && operand.IsXmm(x):
|
|
case operand.IsM256(my) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTTPS2DQ: Convert with Truncation Packed Single-Precision FP Values to Packed Dword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTTPS2DQ xmm xmm
|
|
// VCVTTPS2DQ m128 xmm
|
|
// VCVTTPS2DQ ymm ymm
|
|
// VCVTTPS2DQ m256 ymm
|
|
func VCVTTPS2DQ(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTTSD2SI: Convert with Truncation Scalar Double-Precision FP Value to Signed Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTTSD2SI xmm r32
|
|
// VCVTTSD2SI m64 r32
|
|
func VCVTTSD2SI(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR32(r):
|
|
case operand.IsM64(mx) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTTSD2SIQ: Convert with Truncation Scalar Double-Precision FP Value to Signed Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTTSD2SIQ xmm r64
|
|
// VCVTTSD2SIQ m64 r64
|
|
func VCVTTSD2SIQ(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR64(r):
|
|
case operand.IsM64(mx) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTTSS2SI: Convert with Truncation Scalar Single-Precision FP Value to Dword Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTTSS2SI xmm r32
|
|
// VCVTTSS2SI m32 r32
|
|
func VCVTTSS2SI(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR32(r):
|
|
case operand.IsM32(mx) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VCVTTSS2SIQ: Convert with Truncation Scalar Single-Precision FP Value to Dword Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VCVTTSS2SIQ xmm r64
|
|
// VCVTTSS2SIQ m32 r64
|
|
func VCVTTSS2SIQ(mx, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsR64(r):
|
|
case operand.IsM32(mx) && operand.IsR64(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VDIVPD: Divide Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VDIVPD xmm xmm xmm
|
|
// VDIVPD m128 xmm xmm
|
|
// VDIVPD ymm ymm ymm
|
|
// VDIVPD m256 ymm ymm
|
|
func VDIVPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VDIVPS: Divide Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VDIVPS xmm xmm xmm
|
|
// VDIVPS m128 xmm xmm
|
|
// VDIVPS ymm ymm ymm
|
|
// VDIVPS m256 ymm ymm
|
|
func VDIVPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VDIVSD: Divide Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VDIVSD xmm xmm xmm
|
|
// VDIVSD m64 xmm xmm
|
|
func VDIVSD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VDIVSS: Divide Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VDIVSS xmm xmm xmm
|
|
// VDIVSS m32 xmm xmm
|
|
func VDIVSS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VDPPD: Dot Product of Packed Double Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VDPPD imm8 xmm xmm xmm
|
|
// VDPPD imm8 m128 xmm xmm
|
|
func VDPPD(i, mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VDPPS: Dot Product of Packed Single Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VDPPS imm8 xmm xmm xmm
|
|
// VDPPS imm8 m128 xmm xmm
|
|
// VDPPS imm8 ymm ymm ymm
|
|
// VDPPS imm8 m256 ymm ymm
|
|
func VDPPS(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VEXTRACTF128: Extract Packed Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VEXTRACTF128 imm8 ymm xmm
|
|
// VEXTRACTF128 imm8 ymm m128
|
|
func VEXTRACTF128(i, y, mx avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsYmm(y) && operand.IsXmm(mx):
|
|
case operand.IsImm8(i) && operand.IsYmm(y) && operand.IsM128(mx):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VEXTRACTI128: Extract Packed Integer Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VEXTRACTI128 imm8 ymm xmm
|
|
// VEXTRACTI128 imm8 ymm m128
|
|
func VEXTRACTI128(i, y, mx avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsYmm(y) && operand.IsXmm(mx):
|
|
case operand.IsImm8(i) && operand.IsYmm(y) && operand.IsM128(mx):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VEXTRACTPS: Extract Packed Single Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VEXTRACTPS imm8 xmm r32
|
|
// VEXTRACTPS imm8 xmm m32
|
|
func VEXTRACTPS(i, x, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsR32(mr):
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD132PD: Fused Multiply-Add of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD132PD xmm xmm xmm
|
|
// VFMADD132PD m128 xmm xmm
|
|
// VFMADD132PD ymm ymm ymm
|
|
// VFMADD132PD m256 ymm ymm
|
|
func VFMADD132PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD132PS: Fused Multiply-Add of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD132PS xmm xmm xmm
|
|
// VFMADD132PS m128 xmm xmm
|
|
// VFMADD132PS ymm ymm ymm
|
|
// VFMADD132PS m256 ymm ymm
|
|
func VFMADD132PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD132SD: Fused Multiply-Add of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD132SD xmm xmm xmm
|
|
// VFMADD132SD m64 xmm xmm
|
|
func VFMADD132SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD132SS: Fused Multiply-Add of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD132SS xmm xmm xmm
|
|
// VFMADD132SS m32 xmm xmm
|
|
func VFMADD132SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD213PD: Fused Multiply-Add of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD213PD xmm xmm xmm
|
|
// VFMADD213PD m128 xmm xmm
|
|
// VFMADD213PD ymm ymm ymm
|
|
// VFMADD213PD m256 ymm ymm
|
|
func VFMADD213PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD213PS: Fused Multiply-Add of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD213PS xmm xmm xmm
|
|
// VFMADD213PS m128 xmm xmm
|
|
// VFMADD213PS ymm ymm ymm
|
|
// VFMADD213PS m256 ymm ymm
|
|
func VFMADD213PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD213SD: Fused Multiply-Add of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD213SD xmm xmm xmm
|
|
// VFMADD213SD m64 xmm xmm
|
|
func VFMADD213SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD213SS: Fused Multiply-Add of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD213SS xmm xmm xmm
|
|
// VFMADD213SS m32 xmm xmm
|
|
func VFMADD213SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD231PD: Fused Multiply-Add of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD231PD xmm xmm xmm
|
|
// VFMADD231PD m128 xmm xmm
|
|
// VFMADD231PD ymm ymm ymm
|
|
// VFMADD231PD m256 ymm ymm
|
|
func VFMADD231PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD231PS: Fused Multiply-Add of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD231PS xmm xmm xmm
|
|
// VFMADD231PS m128 xmm xmm
|
|
// VFMADD231PS ymm ymm ymm
|
|
// VFMADD231PS m256 ymm ymm
|
|
func VFMADD231PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD231SD: Fused Multiply-Add of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD231SD xmm xmm xmm
|
|
// VFMADD231SD m64 xmm xmm
|
|
func VFMADD231SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADD231SS: Fused Multiply-Add of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADD231SS xmm xmm xmm
|
|
// VFMADD231SS m32 xmm xmm
|
|
func VFMADD231SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADDSUB132PD: Fused Multiply-Alternating Add/Subtract of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADDSUB132PD xmm xmm xmm
|
|
// VFMADDSUB132PD m128 xmm xmm
|
|
// VFMADDSUB132PD ymm ymm ymm
|
|
// VFMADDSUB132PD m256 ymm ymm
|
|
func VFMADDSUB132PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADDSUB132PS: Fused Multiply-Alternating Add/Subtract of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADDSUB132PS xmm xmm xmm
|
|
// VFMADDSUB132PS m128 xmm xmm
|
|
// VFMADDSUB132PS ymm ymm ymm
|
|
// VFMADDSUB132PS m256 ymm ymm
|
|
func VFMADDSUB132PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADDSUB213PD: Fused Multiply-Alternating Add/Subtract of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADDSUB213PD xmm xmm xmm
|
|
// VFMADDSUB213PD m128 xmm xmm
|
|
// VFMADDSUB213PD ymm ymm ymm
|
|
// VFMADDSUB213PD m256 ymm ymm
|
|
func VFMADDSUB213PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADDSUB213PS: Fused Multiply-Alternating Add/Subtract of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADDSUB213PS xmm xmm xmm
|
|
// VFMADDSUB213PS m128 xmm xmm
|
|
// VFMADDSUB213PS ymm ymm ymm
|
|
// VFMADDSUB213PS m256 ymm ymm
|
|
func VFMADDSUB213PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADDSUB231PD: Fused Multiply-Alternating Add/Subtract of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADDSUB231PD xmm xmm xmm
|
|
// VFMADDSUB231PD m128 xmm xmm
|
|
// VFMADDSUB231PD ymm ymm ymm
|
|
// VFMADDSUB231PD m256 ymm ymm
|
|
func VFMADDSUB231PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMADDSUB231PS: Fused Multiply-Alternating Add/Subtract of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMADDSUB231PS xmm xmm xmm
|
|
// VFMADDSUB231PS m128 xmm xmm
|
|
// VFMADDSUB231PS ymm ymm ymm
|
|
// VFMADDSUB231PS m256 ymm ymm
|
|
func VFMADDSUB231PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB132PD: Fused Multiply-Subtract of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB132PD xmm xmm xmm
|
|
// VFMSUB132PD m128 xmm xmm
|
|
// VFMSUB132PD ymm ymm ymm
|
|
// VFMSUB132PD m256 ymm ymm
|
|
func VFMSUB132PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB132PS: Fused Multiply-Subtract of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB132PS xmm xmm xmm
|
|
// VFMSUB132PS m128 xmm xmm
|
|
// VFMSUB132PS ymm ymm ymm
|
|
// VFMSUB132PS m256 ymm ymm
|
|
func VFMSUB132PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB132SD: Fused Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB132SD xmm xmm xmm
|
|
// VFMSUB132SD m64 xmm xmm
|
|
func VFMSUB132SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB132SS: Fused Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB132SS xmm xmm xmm
|
|
// VFMSUB132SS m32 xmm xmm
|
|
func VFMSUB132SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB213PD: Fused Multiply-Subtract of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB213PD xmm xmm xmm
|
|
// VFMSUB213PD m128 xmm xmm
|
|
// VFMSUB213PD ymm ymm ymm
|
|
// VFMSUB213PD m256 ymm ymm
|
|
func VFMSUB213PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB213PS: Fused Multiply-Subtract of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB213PS xmm xmm xmm
|
|
// VFMSUB213PS m128 xmm xmm
|
|
// VFMSUB213PS ymm ymm ymm
|
|
// VFMSUB213PS m256 ymm ymm
|
|
func VFMSUB213PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB213SD: Fused Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB213SD xmm xmm xmm
|
|
// VFMSUB213SD m64 xmm xmm
|
|
func VFMSUB213SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB213SS: Fused Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB213SS xmm xmm xmm
|
|
// VFMSUB213SS m32 xmm xmm
|
|
func VFMSUB213SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB231PD: Fused Multiply-Subtract of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB231PD xmm xmm xmm
|
|
// VFMSUB231PD m128 xmm xmm
|
|
// VFMSUB231PD ymm ymm ymm
|
|
// VFMSUB231PD m256 ymm ymm
|
|
func VFMSUB231PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB231PS: Fused Multiply-Subtract of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB231PS xmm xmm xmm
|
|
// VFMSUB231PS m128 xmm xmm
|
|
// VFMSUB231PS ymm ymm ymm
|
|
// VFMSUB231PS m256 ymm ymm
|
|
func VFMSUB231PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB231SD: Fused Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB231SD xmm xmm xmm
|
|
// VFMSUB231SD m64 xmm xmm
|
|
func VFMSUB231SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUB231SS: Fused Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUB231SS xmm xmm xmm
|
|
// VFMSUB231SS m32 xmm xmm
|
|
func VFMSUB231SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUBADD132PD: Fused Multiply-Alternating Subtract/Add of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUBADD132PD xmm xmm xmm
|
|
// VFMSUBADD132PD m128 xmm xmm
|
|
// VFMSUBADD132PD ymm ymm ymm
|
|
// VFMSUBADD132PD m256 ymm ymm
|
|
func VFMSUBADD132PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUBADD132PS: Fused Multiply-Alternating Subtract/Add of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUBADD132PS xmm xmm xmm
|
|
// VFMSUBADD132PS m128 xmm xmm
|
|
// VFMSUBADD132PS ymm ymm ymm
|
|
// VFMSUBADD132PS m256 ymm ymm
|
|
func VFMSUBADD132PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUBADD213PD: Fused Multiply-Alternating Subtract/Add of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUBADD213PD xmm xmm xmm
|
|
// VFMSUBADD213PD m128 xmm xmm
|
|
// VFMSUBADD213PD ymm ymm ymm
|
|
// VFMSUBADD213PD m256 ymm ymm
|
|
func VFMSUBADD213PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUBADD213PS: Fused Multiply-Alternating Subtract/Add of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUBADD213PS xmm xmm xmm
|
|
// VFMSUBADD213PS m128 xmm xmm
|
|
// VFMSUBADD213PS ymm ymm ymm
|
|
// VFMSUBADD213PS m256 ymm ymm
|
|
func VFMSUBADD213PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUBADD231PD: Fused Multiply-Alternating Subtract/Add of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUBADD231PD xmm xmm xmm
|
|
// VFMSUBADD231PD m128 xmm xmm
|
|
// VFMSUBADD231PD ymm ymm ymm
|
|
// VFMSUBADD231PD m256 ymm ymm
|
|
func VFMSUBADD231PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFMSUBADD231PS: Fused Multiply-Alternating Subtract/Add of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFMSUBADD231PS xmm xmm xmm
|
|
// VFMSUBADD231PS m128 xmm xmm
|
|
// VFMSUBADD231PS ymm ymm ymm
|
|
// VFMSUBADD231PS m256 ymm ymm
|
|
func VFMSUBADD231PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD132PD: Fused Negative Multiply-Add of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD132PD xmm xmm xmm
|
|
// VFNMADD132PD m128 xmm xmm
|
|
// VFNMADD132PD ymm ymm ymm
|
|
// VFNMADD132PD m256 ymm ymm
|
|
func VFNMADD132PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD132PS: Fused Negative Multiply-Add of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD132PS xmm xmm xmm
|
|
// VFNMADD132PS m128 xmm xmm
|
|
// VFNMADD132PS ymm ymm ymm
|
|
// VFNMADD132PS m256 ymm ymm
|
|
func VFNMADD132PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD132SD: Fused Negative Multiply-Add of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD132SD xmm xmm xmm
|
|
// VFNMADD132SD m64 xmm xmm
|
|
func VFNMADD132SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD132SS: Fused Negative Multiply-Add of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD132SS xmm xmm xmm
|
|
// VFNMADD132SS m32 xmm xmm
|
|
func VFNMADD132SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD213PD: Fused Negative Multiply-Add of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD213PD xmm xmm xmm
|
|
// VFNMADD213PD m128 xmm xmm
|
|
// VFNMADD213PD ymm ymm ymm
|
|
// VFNMADD213PD m256 ymm ymm
|
|
func VFNMADD213PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD213PS: Fused Negative Multiply-Add of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD213PS xmm xmm xmm
|
|
// VFNMADD213PS m128 xmm xmm
|
|
// VFNMADD213PS ymm ymm ymm
|
|
// VFNMADD213PS m256 ymm ymm
|
|
func VFNMADD213PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD213SD: Fused Negative Multiply-Add of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD213SD xmm xmm xmm
|
|
// VFNMADD213SD m64 xmm xmm
|
|
func VFNMADD213SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD213SS: Fused Negative Multiply-Add of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD213SS xmm xmm xmm
|
|
// VFNMADD213SS m32 xmm xmm
|
|
func VFNMADD213SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD231PD: Fused Negative Multiply-Add of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD231PD xmm xmm xmm
|
|
// VFNMADD231PD m128 xmm xmm
|
|
// VFNMADD231PD ymm ymm ymm
|
|
// VFNMADD231PD m256 ymm ymm
|
|
func VFNMADD231PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD231PS: Fused Negative Multiply-Add of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD231PS xmm xmm xmm
|
|
// VFNMADD231PS m128 xmm xmm
|
|
// VFNMADD231PS ymm ymm ymm
|
|
// VFNMADD231PS m256 ymm ymm
|
|
func VFNMADD231PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD231SD: Fused Negative Multiply-Add of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD231SD xmm xmm xmm
|
|
// VFNMADD231SD m64 xmm xmm
|
|
func VFNMADD231SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMADD231SS: Fused Negative Multiply-Add of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMADD231SS xmm xmm xmm
|
|
// VFNMADD231SS m32 xmm xmm
|
|
func VFNMADD231SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB132PD: Fused Negative Multiply-Subtract of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB132PD xmm xmm xmm
|
|
// VFNMSUB132PD m128 xmm xmm
|
|
// VFNMSUB132PD ymm ymm ymm
|
|
// VFNMSUB132PD m256 ymm ymm
|
|
func VFNMSUB132PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB132PS: Fused Negative Multiply-Subtract of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB132PS xmm xmm xmm
|
|
// VFNMSUB132PS m128 xmm xmm
|
|
// VFNMSUB132PS ymm ymm ymm
|
|
// VFNMSUB132PS m256 ymm ymm
|
|
func VFNMSUB132PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB132SD: Fused Negative Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB132SD xmm xmm xmm
|
|
// VFNMSUB132SD m64 xmm xmm
|
|
func VFNMSUB132SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB132SS: Fused Negative Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB132SS xmm xmm xmm
|
|
// VFNMSUB132SS m32 xmm xmm
|
|
func VFNMSUB132SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB213PD: Fused Negative Multiply-Subtract of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB213PD xmm xmm xmm
|
|
// VFNMSUB213PD m128 xmm xmm
|
|
// VFNMSUB213PD ymm ymm ymm
|
|
// VFNMSUB213PD m256 ymm ymm
|
|
func VFNMSUB213PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB213PS: Fused Negative Multiply-Subtract of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB213PS xmm xmm xmm
|
|
// VFNMSUB213PS m128 xmm xmm
|
|
// VFNMSUB213PS ymm ymm ymm
|
|
// VFNMSUB213PS m256 ymm ymm
|
|
func VFNMSUB213PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB213SD: Fused Negative Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB213SD xmm xmm xmm
|
|
// VFNMSUB213SD m64 xmm xmm
|
|
func VFNMSUB213SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB213SS: Fused Negative Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB213SS xmm xmm xmm
|
|
// VFNMSUB213SS m32 xmm xmm
|
|
func VFNMSUB213SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB231PD: Fused Negative Multiply-Subtract of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB231PD xmm xmm xmm
|
|
// VFNMSUB231PD m128 xmm xmm
|
|
// VFNMSUB231PD ymm ymm ymm
|
|
// VFNMSUB231PD m256 ymm ymm
|
|
func VFNMSUB231PD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB231PS: Fused Negative Multiply-Subtract of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB231PS xmm xmm xmm
|
|
// VFNMSUB231PS m128 xmm xmm
|
|
// VFNMSUB231PS ymm ymm ymm
|
|
// VFNMSUB231PS m256 ymm ymm
|
|
func VFNMSUB231PS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB231SD: Fused Negative Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB231SD xmm xmm xmm
|
|
// VFNMSUB231SD m64 xmm xmm
|
|
func VFNMSUB231SD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VFNMSUB231SS: Fused Negative Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VFNMSUB231SS xmm xmm xmm
|
|
// VFNMSUB231SS m32 xmm xmm
|
|
func VFNMSUB231SS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VGATHERDPD: Gather Packed Double-Precision Floating-Point Values Using Signed Doubleword Indices.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VGATHERDPD xmm vm32x xmm
|
|
// VGATHERDPD ymm vm32x ymm
|
|
func VGATHERDPD(xy, v, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsVm32x(v) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(xy) && operand.IsVm32x(v) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VGATHERDPS: Gather Packed Single-Precision Floating-Point Values Using Signed Doubleword Indices.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VGATHERDPS xmm vm32x xmm
|
|
// VGATHERDPS ymm vm32y ymm
|
|
func VGATHERDPS(xy, v, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsVm32x(v) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(xy) && operand.IsVm32y(v) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VGATHERQPD: Gather Packed Double-Precision Floating-Point Values Using Signed Quadword Indices.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VGATHERQPD xmm vm64x xmm
|
|
// VGATHERQPD ymm vm64y ymm
|
|
func VGATHERQPD(xy, v, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsVm64x(v) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(xy) && operand.IsVm64y(v) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VGATHERQPS: Gather Packed Single-Precision Floating-Point Values Using Signed Quadword Indices.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VGATHERQPS xmm vm64x xmm
|
|
// VGATHERQPS xmm vm64y xmm
|
|
func VGATHERQPS(x, v, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsVm64x(v) && operand.IsXmm(x1):
|
|
case operand.IsXmm(x) && operand.IsVm64y(v) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VHADDPD: Packed Double-FP Horizontal Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VHADDPD xmm xmm xmm
|
|
// VHADDPD m128 xmm xmm
|
|
// VHADDPD ymm ymm ymm
|
|
// VHADDPD m256 ymm ymm
|
|
func VHADDPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VHADDPS: Packed Single-FP Horizontal Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VHADDPS xmm xmm xmm
|
|
// VHADDPS m128 xmm xmm
|
|
// VHADDPS ymm ymm ymm
|
|
// VHADDPS m256 ymm ymm
|
|
func VHADDPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VHSUBPD: Packed Double-FP Horizontal Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VHSUBPD xmm xmm xmm
|
|
// VHSUBPD m128 xmm xmm
|
|
// VHSUBPD ymm ymm ymm
|
|
// VHSUBPD m256 ymm ymm
|
|
func VHSUBPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VHSUBPS: Packed Single-FP Horizontal Subtract.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VHSUBPS xmm xmm xmm
|
|
// VHSUBPS m128 xmm xmm
|
|
// VHSUBPS ymm ymm ymm
|
|
// VHSUBPS m256 ymm ymm
|
|
func VHSUBPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VINSERTF128: Insert Packed Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VINSERTF128 imm8 xmm ymm ymm
|
|
// VINSERTF128 imm8 m128 ymm ymm
|
|
func VINSERTF128(i, mx, y, y1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VINSERTI128: Insert Packed Integer Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VINSERTI128 imm8 xmm ymm ymm
|
|
// VINSERTI128 imm8 m128 ymm ymm
|
|
func VINSERTI128(i, mx, y, y1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VINSERTPS: Insert Packed Single Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VINSERTPS imm8 xmm xmm xmm
|
|
// VINSERTPS imm8 m32 xmm xmm
|
|
func VINSERTPS(i, mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VLDDQU: Load Unaligned Integer 128 Bits.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VLDDQU m128 xmm
|
|
// VLDDQU m256 ymm
|
|
func VLDDQU(m, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(m) && operand.IsXmm(xy):
|
|
case operand.IsM256(m) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VLDMXCSR: Load MXCSR Register.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VLDMXCSR m32
|
|
func VLDMXCSR(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM32(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMASKMOVDQU: Store Selected Bytes of Double Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMASKMOVDQU xmm xmm
|
|
func VMASKMOVDQU(x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMASKMOVPD: Conditional Move Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMASKMOVPD m128 xmm xmm
|
|
// VMASKMOVPD m256 ymm ymm
|
|
// VMASKMOVPD xmm xmm m128
|
|
// VMASKMOVPD ymm ymm m256
|
|
func VMASKMOVPD(mxy, xy, mxy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(mxy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(mxy1):
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsM128(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsM256(mxy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMASKMOVPS: Conditional Move Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMASKMOVPS m128 xmm xmm
|
|
// VMASKMOVPS m256 ymm ymm
|
|
// VMASKMOVPS xmm xmm m128
|
|
// VMASKMOVPS ymm ymm m256
|
|
func VMASKMOVPS(mxy, xy, mxy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(mxy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(mxy1):
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsM128(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsM256(mxy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMAXPD: Return Maximum Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMAXPD xmm xmm xmm
|
|
// VMAXPD m128 xmm xmm
|
|
// VMAXPD ymm ymm ymm
|
|
// VMAXPD m256 ymm ymm
|
|
func VMAXPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMAXPS: Return Maximum Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMAXPS xmm xmm xmm
|
|
// VMAXPS m128 xmm xmm
|
|
// VMAXPS ymm ymm ymm
|
|
// VMAXPS m256 ymm ymm
|
|
func VMAXPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMAXSD: Return Maximum Scalar Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMAXSD xmm xmm xmm
|
|
// VMAXSD m64 xmm xmm
|
|
func VMAXSD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMAXSS: Return Maximum Scalar Single-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMAXSS xmm xmm xmm
|
|
// VMAXSS m32 xmm xmm
|
|
func VMAXSS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMINPD: Return Minimum Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMINPD xmm xmm xmm
|
|
// VMINPD m128 xmm xmm
|
|
// VMINPD ymm ymm ymm
|
|
// VMINPD m256 ymm ymm
|
|
func VMINPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMINPS: Return Minimum Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMINPS xmm xmm xmm
|
|
// VMINPS m128 xmm xmm
|
|
// VMINPS ymm ymm ymm
|
|
// VMINPS m256 ymm ymm
|
|
func VMINPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMINSD: Return Minimum Scalar Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMINSD xmm xmm xmm
|
|
// VMINSD m64 xmm xmm
|
|
func VMINSD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMINSS: Return Minimum Scalar Single-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMINSS xmm xmm xmm
|
|
// VMINSS m32 xmm xmm
|
|
func VMINSS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVAPD: Move Aligned Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVAPD xmm xmm
|
|
// VMOVAPD m128 xmm
|
|
// VMOVAPD ymm ymm
|
|
// VMOVAPD m256 ymm
|
|
// VMOVAPD xmm m128
|
|
// VMOVAPD ymm m256
|
|
func VMOVAPD(mxy, mxy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsXmm(mxy) && operand.IsM128(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsM256(mxy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVAPS: Move Aligned Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVAPS xmm xmm
|
|
// VMOVAPS m128 xmm
|
|
// VMOVAPS ymm ymm
|
|
// VMOVAPS m256 ymm
|
|
// VMOVAPS xmm m128
|
|
// VMOVAPS ymm m256
|
|
func VMOVAPS(mxy, mxy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsXmm(mxy) && operand.IsM128(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsM256(mxy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVD: Move Doubleword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVD xmm r32
|
|
// VMOVD r32 xmm
|
|
// VMOVD m32 xmm
|
|
// VMOVD xmm m32
|
|
func VMOVD(mrx, mrx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mrx) && operand.IsR32(mrx1):
|
|
case operand.IsR32(mrx) && operand.IsXmm(mrx1):
|
|
case operand.IsM32(mrx) && operand.IsXmm(mrx1):
|
|
case operand.IsXmm(mrx) && operand.IsM32(mrx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVDDUP: Move One Double-FP and Duplicate.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVDDUP xmm xmm
|
|
// VMOVDDUP m64 xmm
|
|
// VMOVDDUP ymm ymm
|
|
// VMOVDDUP m256 ymm
|
|
func VMOVDDUP(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM64(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVDQA: Move Aligned Double Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVDQA xmm xmm
|
|
// VMOVDQA m128 xmm
|
|
// VMOVDQA ymm ymm
|
|
// VMOVDQA m256 ymm
|
|
// VMOVDQA xmm m128
|
|
// VMOVDQA ymm m256
|
|
func VMOVDQA(mxy, mxy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsXmm(mxy) && operand.IsM128(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsM256(mxy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVDQU: Move Unaligned Double Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVDQU xmm xmm
|
|
// VMOVDQU m128 xmm
|
|
// VMOVDQU ymm ymm
|
|
// VMOVDQU m256 ymm
|
|
// VMOVDQU xmm m128
|
|
// VMOVDQU ymm m256
|
|
func VMOVDQU(mxy, mxy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsXmm(mxy) && operand.IsM128(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsM256(mxy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVHLPS: Move Packed Single-Precision Floating-Point Values High to Low.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVHLPS xmm xmm xmm
|
|
func VMOVHLPS(x, x1, x2 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsXmm(x1) && operand.IsXmm(x2):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVHPD: Move High Packed Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVHPD xmm m64
|
|
// VMOVHPD m64 xmm xmm
|
|
func VMOVHPD(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.IsXmm(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 3 && operand.IsM64(ops[0]) && operand.IsXmm(ops[1]) && operand.IsXmm(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVHPS: Move High Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVHPS xmm m64
|
|
// VMOVHPS m64 xmm xmm
|
|
func VMOVHPS(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.IsXmm(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 3 && operand.IsM64(ops[0]) && operand.IsXmm(ops[1]) && operand.IsXmm(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVLHPS: Move Packed Single-Precision Floating-Point Values Low to High.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVLHPS xmm xmm xmm
|
|
func VMOVLHPS(x, x1, x2 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsXmm(x1) && operand.IsXmm(x2):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVLPD: Move Low Packed Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVLPD xmm m64
|
|
// VMOVLPD m64 xmm xmm
|
|
func VMOVLPD(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.IsXmm(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 3 && operand.IsM64(ops[0]) && operand.IsXmm(ops[1]) && operand.IsXmm(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVLPS: Move Low Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVLPS xmm m64
|
|
// VMOVLPS m64 xmm xmm
|
|
func VMOVLPS(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.IsXmm(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 3 && operand.IsM64(ops[0]) && operand.IsXmm(ops[1]) && operand.IsXmm(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVMSKPD: Extract Packed Double-Precision Floating-Point Sign Mask.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVMSKPD xmm r32
|
|
// VMOVMSKPD ymm r32
|
|
func VMOVMSKPD(xy, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsR32(r):
|
|
case operand.IsYmm(xy) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVMSKPS: Extract Packed Single-Precision Floating-Point Sign Mask.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVMSKPS xmm r32
|
|
// VMOVMSKPS ymm r32
|
|
func VMOVMSKPS(xy, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsR32(r):
|
|
case operand.IsYmm(xy) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVNTDQ: Store Double Quadword Using Non-Temporal Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVNTDQ xmm m128
|
|
// VMOVNTDQ ymm m256
|
|
func VMOVNTDQ(xy, m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsM128(m):
|
|
case operand.IsYmm(xy) && operand.IsM256(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVNTDQA: Load Double Quadword Non-Temporal Aligned Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVNTDQA m128 xmm
|
|
// VMOVNTDQA m256 ymm
|
|
func VMOVNTDQA(m, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(m) && operand.IsXmm(xy):
|
|
case operand.IsM256(m) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVNTPD: Store Packed Double-Precision Floating-Point Values Using Non-Temporal Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVNTPD xmm m128
|
|
// VMOVNTPD ymm m256
|
|
func VMOVNTPD(xy, m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsM128(m):
|
|
case operand.IsYmm(xy) && operand.IsM256(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVNTPS: Store Packed Single-Precision Floating-Point Values Using Non-Temporal Hint.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVNTPS xmm m128
|
|
// VMOVNTPS ymm m256
|
|
func VMOVNTPS(xy, m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsM128(m):
|
|
case operand.IsYmm(xy) && operand.IsM256(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVQ: Move Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVQ xmm r64
|
|
// VMOVQ r64 xmm
|
|
// VMOVQ xmm xmm
|
|
// VMOVQ m64 xmm
|
|
// VMOVQ xmm m64
|
|
func VMOVQ(mrx, mrx1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mrx) && operand.IsR64(mrx1):
|
|
case operand.IsR64(mrx) && operand.IsXmm(mrx1):
|
|
case operand.IsXmm(mrx) && operand.IsXmm(mrx1):
|
|
case operand.IsM64(mrx) && operand.IsXmm(mrx1):
|
|
case operand.IsXmm(mrx) && operand.IsM64(mrx1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVSD: Move Scalar Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVSD m64 xmm
|
|
// VMOVSD xmm m64
|
|
// VMOVSD xmm xmm xmm
|
|
func VMOVSD(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.IsM64(ops[0]) && operand.IsXmm(ops[1]):
|
|
case len(ops) == 2 && operand.IsXmm(ops[0]) && operand.IsM64(ops[1]):
|
|
case len(ops) == 3 && operand.IsXmm(ops[0]) && operand.IsXmm(ops[1]) && operand.IsXmm(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVSHDUP: Move Packed Single-FP High and Duplicate.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVSHDUP xmm xmm
|
|
// VMOVSHDUP m128 xmm
|
|
// VMOVSHDUP ymm ymm
|
|
// VMOVSHDUP m256 ymm
|
|
func VMOVSHDUP(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVSLDUP: Move Packed Single-FP Low and Duplicate.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVSLDUP xmm xmm
|
|
// VMOVSLDUP m128 xmm
|
|
// VMOVSLDUP ymm ymm
|
|
// VMOVSLDUP m256 ymm
|
|
func VMOVSLDUP(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVSS: Move Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVSS m32 xmm
|
|
// VMOVSS xmm m32
|
|
// VMOVSS xmm xmm xmm
|
|
func VMOVSS(ops ...avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case len(ops) == 2 && operand.IsM32(ops[0]) && operand.IsXmm(ops[1]):
|
|
case len(ops) == 2 && operand.IsXmm(ops[0]) && operand.IsM32(ops[1]):
|
|
case len(ops) == 3 && operand.IsXmm(ops[0]) && operand.IsXmm(ops[1]) && operand.IsXmm(ops[2]):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVUPD: Move Unaligned Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVUPD xmm xmm
|
|
// VMOVUPD m128 xmm
|
|
// VMOVUPD ymm ymm
|
|
// VMOVUPD m256 ymm
|
|
// VMOVUPD xmm m128
|
|
// VMOVUPD ymm m256
|
|
func VMOVUPD(mxy, mxy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsXmm(mxy) && operand.IsM128(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsM256(mxy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMOVUPS: Move Unaligned Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMOVUPS xmm xmm
|
|
// VMOVUPS m128 xmm
|
|
// VMOVUPS ymm ymm
|
|
// VMOVUPS m256 ymm
|
|
// VMOVUPS xmm m128
|
|
// VMOVUPS ymm m256
|
|
func VMOVUPS(mxy, mxy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(mxy1):
|
|
case operand.IsXmm(mxy) && operand.IsM128(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsM256(mxy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMPSADBW: Compute Multiple Packed Sums of Absolute Difference.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMPSADBW imm8 xmm xmm xmm
|
|
// VMPSADBW imm8 m128 xmm xmm
|
|
// VMPSADBW imm8 ymm ymm ymm
|
|
// VMPSADBW imm8 m256 ymm ymm
|
|
func VMPSADBW(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMULPD: Multiply Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMULPD xmm xmm xmm
|
|
// VMULPD m128 xmm xmm
|
|
// VMULPD ymm ymm ymm
|
|
// VMULPD m256 ymm ymm
|
|
func VMULPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMULPS: Multiply Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMULPS xmm xmm xmm
|
|
// VMULPS m128 xmm xmm
|
|
// VMULPS ymm ymm ymm
|
|
// VMULPS m256 ymm ymm
|
|
func VMULPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMULSD: Multiply Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMULSD xmm xmm xmm
|
|
// VMULSD m64 xmm xmm
|
|
func VMULSD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VMULSS: Multiply Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VMULSS xmm xmm xmm
|
|
// VMULSS m32 xmm xmm
|
|
func VMULSS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VORPD: Bitwise Logical OR of Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VORPD xmm xmm xmm
|
|
// VORPD m128 xmm xmm
|
|
// VORPD ymm ymm ymm
|
|
// VORPD m256 ymm ymm
|
|
func VORPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VORPS: Bitwise Logical OR of Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VORPS xmm xmm xmm
|
|
// VORPS m128 xmm xmm
|
|
// VORPS ymm ymm ymm
|
|
// VORPS m256 ymm ymm
|
|
func VORPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPABSB: Packed Absolute Value of Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPABSB xmm xmm
|
|
// VPABSB m128 xmm
|
|
// VPABSB ymm ymm
|
|
// VPABSB m256 ymm
|
|
func VPABSB(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPABSD: Packed Absolute Value of Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPABSD xmm xmm
|
|
// VPABSD m128 xmm
|
|
// VPABSD ymm ymm
|
|
// VPABSD m256 ymm
|
|
func VPABSD(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPABSW: Packed Absolute Value of Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPABSW xmm xmm
|
|
// VPABSW m128 xmm
|
|
// VPABSW ymm ymm
|
|
// VPABSW m256 ymm
|
|
func VPABSW(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPACKSSDW: Pack Doublewords into Words with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPACKSSDW xmm xmm xmm
|
|
// VPACKSSDW m128 xmm xmm
|
|
// VPACKSSDW ymm ymm ymm
|
|
// VPACKSSDW m256 ymm ymm
|
|
func VPACKSSDW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPACKSSWB: Pack Words into Bytes with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPACKSSWB xmm xmm xmm
|
|
// VPACKSSWB m128 xmm xmm
|
|
// VPACKSSWB ymm ymm ymm
|
|
// VPACKSSWB m256 ymm ymm
|
|
func VPACKSSWB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPACKUSDW: Pack Doublewords into Words with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPACKUSDW xmm xmm xmm
|
|
// VPACKUSDW m128 xmm xmm
|
|
// VPACKUSDW ymm ymm ymm
|
|
// VPACKUSDW m256 ymm ymm
|
|
func VPACKUSDW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPACKUSWB: Pack Words into Bytes with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPACKUSWB xmm xmm xmm
|
|
// VPACKUSWB m128 xmm xmm
|
|
// VPACKUSWB ymm ymm ymm
|
|
// VPACKUSWB m256 ymm ymm
|
|
func VPACKUSWB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPADDB: Add Packed Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPADDB xmm xmm xmm
|
|
// VPADDB m128 xmm xmm
|
|
// VPADDB ymm ymm ymm
|
|
// VPADDB m256 ymm ymm
|
|
func VPADDB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPADDD: Add Packed Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPADDD xmm xmm xmm
|
|
// VPADDD m128 xmm xmm
|
|
// VPADDD ymm ymm ymm
|
|
// VPADDD m256 ymm ymm
|
|
func VPADDD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPADDQ: Add Packed Quadword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPADDQ xmm xmm xmm
|
|
// VPADDQ m128 xmm xmm
|
|
// VPADDQ ymm ymm ymm
|
|
// VPADDQ m256 ymm ymm
|
|
func VPADDQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPADDSB: Add Packed Signed Byte Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPADDSB xmm xmm xmm
|
|
// VPADDSB m128 xmm xmm
|
|
// VPADDSB ymm ymm ymm
|
|
// VPADDSB m256 ymm ymm
|
|
func VPADDSB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPADDSW: Add Packed Signed Word Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPADDSW xmm xmm xmm
|
|
// VPADDSW m128 xmm xmm
|
|
// VPADDSW ymm ymm ymm
|
|
// VPADDSW m256 ymm ymm
|
|
func VPADDSW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPADDUSB: Add Packed Unsigned Byte Integers with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPADDUSB xmm xmm xmm
|
|
// VPADDUSB m128 xmm xmm
|
|
// VPADDUSB ymm ymm ymm
|
|
// VPADDUSB m256 ymm ymm
|
|
func VPADDUSB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPADDUSW: Add Packed Unsigned Word Integers with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPADDUSW xmm xmm xmm
|
|
// VPADDUSW m128 xmm xmm
|
|
// VPADDUSW ymm ymm ymm
|
|
// VPADDUSW m256 ymm ymm
|
|
func VPADDUSW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPADDW: Add Packed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPADDW xmm xmm xmm
|
|
// VPADDW m128 xmm xmm
|
|
// VPADDW ymm ymm ymm
|
|
// VPADDW m256 ymm ymm
|
|
func VPADDW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPALIGNR: Packed Align Right.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPALIGNR imm8 xmm xmm xmm
|
|
// VPALIGNR imm8 m128 xmm xmm
|
|
// VPALIGNR imm8 ymm ymm ymm
|
|
// VPALIGNR imm8 m256 ymm ymm
|
|
func VPALIGNR(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPAND: Packed Bitwise Logical AND.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPAND xmm xmm xmm
|
|
// VPAND m128 xmm xmm
|
|
// VPAND ymm ymm ymm
|
|
// VPAND m256 ymm ymm
|
|
func VPAND(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPANDN: Packed Bitwise Logical AND NOT.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPANDN xmm xmm xmm
|
|
// VPANDN m128 xmm xmm
|
|
// VPANDN ymm ymm ymm
|
|
// VPANDN m256 ymm ymm
|
|
func VPANDN(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPAVGB: Average Packed Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPAVGB xmm xmm xmm
|
|
// VPAVGB m128 xmm xmm
|
|
// VPAVGB ymm ymm ymm
|
|
// VPAVGB m256 ymm ymm
|
|
func VPAVGB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPAVGW: Average Packed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPAVGW xmm xmm xmm
|
|
// VPAVGW m128 xmm xmm
|
|
// VPAVGW ymm ymm ymm
|
|
// VPAVGW m256 ymm ymm
|
|
func VPAVGW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPBLENDD: Blend Packed Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPBLENDD imm8 xmm xmm xmm
|
|
// VPBLENDD imm8 m128 xmm xmm
|
|
// VPBLENDD imm8 ymm ymm ymm
|
|
// VPBLENDD imm8 m256 ymm ymm
|
|
func VPBLENDD(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPBLENDVB: Variable Blend Packed Bytes.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPBLENDVB xmm xmm xmm xmm
|
|
// VPBLENDVB xmm m128 xmm xmm
|
|
// VPBLENDVB ymm ymm ymm ymm
|
|
// VPBLENDVB ymm m256 ymm ymm
|
|
func VPBLENDVB(xy, mxy, xy1, xy2 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsXmm(mxy) && operand.IsXmm(xy1) && operand.IsXmm(xy2):
|
|
case operand.IsXmm(xy) && operand.IsM128(mxy) && operand.IsXmm(xy1) && operand.IsXmm(xy2):
|
|
case operand.IsYmm(xy) && operand.IsYmm(mxy) && operand.IsYmm(xy1) && operand.IsYmm(xy2):
|
|
case operand.IsYmm(xy) && operand.IsM256(mxy) && operand.IsYmm(xy1) && operand.IsYmm(xy2):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPBLENDW: Blend Packed Words.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPBLENDW imm8 xmm xmm xmm
|
|
// VPBLENDW imm8 m128 xmm xmm
|
|
// VPBLENDW imm8 ymm ymm ymm
|
|
// VPBLENDW imm8 m256 ymm ymm
|
|
func VPBLENDW(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPBROADCASTB: Broadcast Byte Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPBROADCASTB xmm xmm
|
|
// VPBROADCASTB m8 xmm
|
|
// VPBROADCASTB xmm ymm
|
|
// VPBROADCASTB m8 ymm
|
|
func VPBROADCASTB(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM8(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM8(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPBROADCASTD: Broadcast Doubleword Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPBROADCASTD xmm xmm
|
|
// VPBROADCASTD m32 xmm
|
|
// VPBROADCASTD xmm ymm
|
|
// VPBROADCASTD m32 ymm
|
|
func VPBROADCASTD(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM32(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM32(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPBROADCASTQ: Broadcast Quadword Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPBROADCASTQ xmm xmm
|
|
// VPBROADCASTQ m64 xmm
|
|
// VPBROADCASTQ xmm ymm
|
|
// VPBROADCASTQ m64 ymm
|
|
func VPBROADCASTQ(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM64(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM64(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPBROADCASTW: Broadcast Word Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPBROADCASTW xmm xmm
|
|
// VPBROADCASTW m16 xmm
|
|
// VPBROADCASTW xmm ymm
|
|
// VPBROADCASTW m16 ymm
|
|
func VPBROADCASTW(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM16(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM16(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCLMULQDQ: Carry-Less Quadword Multiplication.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCLMULQDQ imm8 xmm xmm xmm
|
|
// VPCLMULQDQ imm8 m128 xmm xmm
|
|
func VPCLMULQDQ(i, mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPEQB: Compare Packed Byte Data for Equality.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPEQB xmm xmm xmm
|
|
// VPCMPEQB m128 xmm xmm
|
|
// VPCMPEQB ymm ymm ymm
|
|
// VPCMPEQB m256 ymm ymm
|
|
func VPCMPEQB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPEQD: Compare Packed Doubleword Data for Equality.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPEQD xmm xmm xmm
|
|
// VPCMPEQD m128 xmm xmm
|
|
// VPCMPEQD ymm ymm ymm
|
|
// VPCMPEQD m256 ymm ymm
|
|
func VPCMPEQD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPEQQ: Compare Packed Quadword Data for Equality.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPEQQ xmm xmm xmm
|
|
// VPCMPEQQ m128 xmm xmm
|
|
// VPCMPEQQ ymm ymm ymm
|
|
// VPCMPEQQ m256 ymm ymm
|
|
func VPCMPEQQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPEQW: Compare Packed Word Data for Equality.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPEQW xmm xmm xmm
|
|
// VPCMPEQW m128 xmm xmm
|
|
// VPCMPEQW ymm ymm ymm
|
|
// VPCMPEQW m256 ymm ymm
|
|
func VPCMPEQW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPESTRI: Packed Compare Explicit Length Strings, Return Index.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPESTRI imm8 xmm xmm
|
|
// VPCMPESTRI imm8 m128 xmm
|
|
func VPCMPESTRI(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPESTRM: Packed Compare Explicit Length Strings, Return Mask.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPESTRM imm8 xmm xmm
|
|
// VPCMPESTRM imm8 m128 xmm
|
|
func VPCMPESTRM(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPGTB: Compare Packed Signed Byte Integers for Greater Than.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPGTB xmm xmm xmm
|
|
// VPCMPGTB m128 xmm xmm
|
|
// VPCMPGTB ymm ymm ymm
|
|
// VPCMPGTB m256 ymm ymm
|
|
func VPCMPGTB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPGTD: Compare Packed Signed Doubleword Integers for Greater Than.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPGTD xmm xmm xmm
|
|
// VPCMPGTD m128 xmm xmm
|
|
// VPCMPGTD ymm ymm ymm
|
|
// VPCMPGTD m256 ymm ymm
|
|
func VPCMPGTD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPGTQ: Compare Packed Data for Greater Than.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPGTQ xmm xmm xmm
|
|
// VPCMPGTQ m128 xmm xmm
|
|
// VPCMPGTQ ymm ymm ymm
|
|
// VPCMPGTQ m256 ymm ymm
|
|
func VPCMPGTQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPGTW: Compare Packed Signed Word Integers for Greater Than.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPGTW xmm xmm xmm
|
|
// VPCMPGTW m128 xmm xmm
|
|
// VPCMPGTW ymm ymm ymm
|
|
// VPCMPGTW m256 ymm ymm
|
|
func VPCMPGTW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPISTRI: Packed Compare Implicit Length Strings, Return Index.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPISTRI imm8 xmm xmm
|
|
// VPCMPISTRI imm8 m128 xmm
|
|
func VPCMPISTRI(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPCMPISTRM: Packed Compare Implicit Length Strings, Return Mask.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPCMPISTRM imm8 xmm xmm
|
|
// VPCMPISTRM imm8 m128 xmm
|
|
func VPCMPISTRM(i, mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsImm8(i) && operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPERM2F128: Permute Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPERM2F128 imm8 ymm ymm ymm
|
|
// VPERM2F128 imm8 m256 ymm ymm
|
|
func VPERM2F128(i, my, y, y1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsYmm(my) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
case operand.IsImm8(i) && operand.IsM256(my) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPERM2I128: Permute 128-Bit Integer Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPERM2I128 imm8 ymm ymm ymm
|
|
// VPERM2I128 imm8 m256 ymm ymm
|
|
func VPERM2I128(i, my, y, y1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsYmm(my) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
case operand.IsImm8(i) && operand.IsM256(my) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPERMD: Permute Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPERMD ymm ymm ymm
|
|
// VPERMD m256 ymm ymm
|
|
func VPERMD(my, y, y1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsYmm(my) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
case operand.IsM256(my) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPERMILPD: Permute Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPERMILPD imm8 xmm xmm
|
|
// VPERMILPD xmm xmm xmm
|
|
// VPERMILPD m128 xmm xmm
|
|
// VPERMILPD imm8 m128 xmm
|
|
// VPERMILPD imm8 ymm ymm
|
|
// VPERMILPD ymm ymm ymm
|
|
// VPERMILPD m256 ymm ymm
|
|
// VPERMILPD imm8 m256 ymm
|
|
func VPERMILPD(imxy, mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imxy) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsXmm(imxy) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(imxy) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(imxy) && operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(imxy) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsYmm(imxy) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(imxy) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsImm8(imxy) && operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPERMILPS: Permute Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPERMILPS imm8 xmm xmm
|
|
// VPERMILPS xmm xmm xmm
|
|
// VPERMILPS m128 xmm xmm
|
|
// VPERMILPS imm8 m128 xmm
|
|
// VPERMILPS imm8 ymm ymm
|
|
// VPERMILPS ymm ymm ymm
|
|
// VPERMILPS m256 ymm ymm
|
|
// VPERMILPS imm8 m256 ymm
|
|
func VPERMILPS(imxy, mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imxy) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsXmm(imxy) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(imxy) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(imxy) && operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(imxy) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsYmm(imxy) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(imxy) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsImm8(imxy) && operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPERMPD: Permute Double-Precision Floating-Point Elements.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPERMPD imm8 ymm ymm
|
|
// VPERMPD imm8 m256 ymm
|
|
func VPERMPD(i, my, y avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsYmm(my) && operand.IsYmm(y):
|
|
case operand.IsImm8(i) && operand.IsM256(my) && operand.IsYmm(y):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPERMPS: Permute Single-Precision Floating-Point Elements.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPERMPS ymm ymm ymm
|
|
// VPERMPS m256 ymm ymm
|
|
func VPERMPS(my, y, y1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsYmm(my) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
case operand.IsM256(my) && operand.IsYmm(y) && operand.IsYmm(y1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPERMQ: Permute Quadword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPERMQ imm8 ymm ymm
|
|
// VPERMQ imm8 m256 ymm
|
|
func VPERMQ(i, my, y avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsYmm(my) && operand.IsYmm(y):
|
|
case operand.IsImm8(i) && operand.IsM256(my) && operand.IsYmm(y):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPEXTRB: Extract Byte.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPEXTRB imm8 xmm r32
|
|
// VPEXTRB imm8 xmm m8
|
|
func VPEXTRB(i, x, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsR32(mr):
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPEXTRD: Extract Doubleword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPEXTRD imm8 xmm r32
|
|
// VPEXTRD imm8 xmm m32
|
|
func VPEXTRD(i, x, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsR32(mr):
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPEXTRQ: Extract Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPEXTRQ imm8 xmm r64
|
|
// VPEXTRQ imm8 xmm m64
|
|
func VPEXTRQ(i, x, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsR64(mr):
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPEXTRW: Extract Word.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPEXTRW imm8 xmm r32
|
|
// VPEXTRW imm8 xmm m16
|
|
func VPEXTRW(i, x, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsR32(mr):
|
|
case operand.IsImm8(i) && operand.IsXmm(x) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPGATHERDD: Gather Packed Doubleword Values Using Signed Doubleword Indices.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPGATHERDD xmm vm32x xmm
|
|
// VPGATHERDD ymm vm32y ymm
|
|
func VPGATHERDD(xy, v, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsVm32x(v) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(xy) && operand.IsVm32y(v) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPGATHERDQ: Gather Packed Quadword Values Using Signed Doubleword Indices.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPGATHERDQ xmm vm32x xmm
|
|
// VPGATHERDQ ymm vm32x ymm
|
|
func VPGATHERDQ(xy, v, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsVm32x(v) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(xy) && operand.IsVm32x(v) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPGATHERQD: Gather Packed Doubleword Values Using Signed Quadword Indices.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPGATHERQD xmm vm64x xmm
|
|
// VPGATHERQD xmm vm64y xmm
|
|
func VPGATHERQD(x, v, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(x) && operand.IsVm64x(v) && operand.IsXmm(x1):
|
|
case operand.IsXmm(x) && operand.IsVm64y(v) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPGATHERQQ: Gather Packed Quadword Values Using Signed Quadword Indices.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPGATHERQQ xmm vm64x xmm
|
|
// VPGATHERQQ ymm vm64y ymm
|
|
func VPGATHERQQ(xy, v, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsVm64x(v) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(xy) && operand.IsVm64y(v) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPHADDD: Packed Horizontal Add Doubleword Integer.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPHADDD xmm xmm xmm
|
|
// VPHADDD m128 xmm xmm
|
|
// VPHADDD ymm ymm ymm
|
|
// VPHADDD m256 ymm ymm
|
|
func VPHADDD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPHADDSW: Packed Horizontal Add Signed Word Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPHADDSW xmm xmm xmm
|
|
// VPHADDSW m128 xmm xmm
|
|
// VPHADDSW ymm ymm ymm
|
|
// VPHADDSW m256 ymm ymm
|
|
func VPHADDSW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPHADDW: Packed Horizontal Add Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPHADDW xmm xmm xmm
|
|
// VPHADDW m128 xmm xmm
|
|
// VPHADDW ymm ymm ymm
|
|
// VPHADDW m256 ymm ymm
|
|
func VPHADDW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPHMINPOSUW: Packed Horizontal Minimum of Unsigned Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPHMINPOSUW xmm xmm
|
|
// VPHMINPOSUW m128 xmm
|
|
func VPHMINPOSUW(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPHSUBD: Packed Horizontal Subtract Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPHSUBD xmm xmm xmm
|
|
// VPHSUBD m128 xmm xmm
|
|
// VPHSUBD ymm ymm ymm
|
|
// VPHSUBD m256 ymm ymm
|
|
func VPHSUBD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPHSUBSW: Packed Horizontal Subtract Signed Word Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPHSUBSW xmm xmm xmm
|
|
// VPHSUBSW m128 xmm xmm
|
|
// VPHSUBSW ymm ymm ymm
|
|
// VPHSUBSW m256 ymm ymm
|
|
func VPHSUBSW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPHSUBW: Packed Horizontal Subtract Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPHSUBW xmm xmm xmm
|
|
// VPHSUBW m128 xmm xmm
|
|
// VPHSUBW ymm ymm ymm
|
|
// VPHSUBW m256 ymm ymm
|
|
func VPHSUBW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPINSRB: Insert Byte.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPINSRB imm8 r32 xmm xmm
|
|
// VPINSRB imm8 m8 xmm xmm
|
|
func VPINSRB(i, mr, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR32(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM8(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPINSRD: Insert Doubleword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPINSRD imm8 r32 xmm xmm
|
|
// VPINSRD imm8 m32 xmm xmm
|
|
func VPINSRD(i, mr, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR32(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM32(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPINSRQ: Insert Quadword.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPINSRQ imm8 r64 xmm xmm
|
|
// VPINSRQ imm8 m64 xmm xmm
|
|
func VPINSRQ(i, mr, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR64(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM64(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPINSRW: Insert Word.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPINSRW imm8 r32 xmm xmm
|
|
// VPINSRW imm8 m16 xmm xmm
|
|
func VPINSRW(i, mr, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsR32(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM16(mr) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMADDUBSW: Multiply and Add Packed Signed and Unsigned Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMADDUBSW xmm xmm xmm
|
|
// VPMADDUBSW m128 xmm xmm
|
|
// VPMADDUBSW ymm ymm ymm
|
|
// VPMADDUBSW m256 ymm ymm
|
|
func VPMADDUBSW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMADDWD: Multiply and Add Packed Signed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMADDWD xmm xmm xmm
|
|
// VPMADDWD m128 xmm xmm
|
|
// VPMADDWD ymm ymm ymm
|
|
// VPMADDWD m256 ymm ymm
|
|
func VPMADDWD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMASKMOVD: Conditional Move Packed Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMASKMOVD m128 xmm xmm
|
|
// VPMASKMOVD m256 ymm ymm
|
|
// VPMASKMOVD xmm xmm m128
|
|
// VPMASKMOVD ymm ymm m256
|
|
func VPMASKMOVD(mxy, xy, mxy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(mxy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(mxy1):
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsM128(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsM256(mxy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMASKMOVQ: Conditional Move Packed Quadword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMASKMOVQ m128 xmm xmm
|
|
// VPMASKMOVQ m256 ymm ymm
|
|
// VPMASKMOVQ xmm xmm m128
|
|
// VPMASKMOVQ ymm ymm m256
|
|
func VPMASKMOVQ(mxy, xy, mxy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(mxy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(mxy1):
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsM128(mxy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsM256(mxy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMAXSB: Maximum of Packed Signed Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMAXSB xmm xmm xmm
|
|
// VPMAXSB m128 xmm xmm
|
|
// VPMAXSB ymm ymm ymm
|
|
// VPMAXSB m256 ymm ymm
|
|
func VPMAXSB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMAXSD: Maximum of Packed Signed Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMAXSD xmm xmm xmm
|
|
// VPMAXSD m128 xmm xmm
|
|
// VPMAXSD ymm ymm ymm
|
|
// VPMAXSD m256 ymm ymm
|
|
func VPMAXSD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMAXSW: Maximum of Packed Signed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMAXSW xmm xmm xmm
|
|
// VPMAXSW m128 xmm xmm
|
|
// VPMAXSW ymm ymm ymm
|
|
// VPMAXSW m256 ymm ymm
|
|
func VPMAXSW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMAXUB: Maximum of Packed Unsigned Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMAXUB xmm xmm xmm
|
|
// VPMAXUB m128 xmm xmm
|
|
// VPMAXUB ymm ymm ymm
|
|
// VPMAXUB m256 ymm ymm
|
|
func VPMAXUB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMAXUD: Maximum of Packed Unsigned Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMAXUD xmm xmm xmm
|
|
// VPMAXUD m128 xmm xmm
|
|
// VPMAXUD ymm ymm ymm
|
|
// VPMAXUD m256 ymm ymm
|
|
func VPMAXUD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMAXUW: Maximum of Packed Unsigned Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMAXUW xmm xmm xmm
|
|
// VPMAXUW m128 xmm xmm
|
|
// VPMAXUW ymm ymm ymm
|
|
// VPMAXUW m256 ymm ymm
|
|
func VPMAXUW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMINSB: Minimum of Packed Signed Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMINSB xmm xmm xmm
|
|
// VPMINSB m128 xmm xmm
|
|
// VPMINSB ymm ymm ymm
|
|
// VPMINSB m256 ymm ymm
|
|
func VPMINSB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMINSD: Minimum of Packed Signed Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMINSD xmm xmm xmm
|
|
// VPMINSD m128 xmm xmm
|
|
// VPMINSD ymm ymm ymm
|
|
// VPMINSD m256 ymm ymm
|
|
func VPMINSD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMINSW: Minimum of Packed Signed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMINSW xmm xmm xmm
|
|
// VPMINSW m128 xmm xmm
|
|
// VPMINSW ymm ymm ymm
|
|
// VPMINSW m256 ymm ymm
|
|
func VPMINSW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMINUB: Minimum of Packed Unsigned Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMINUB xmm xmm xmm
|
|
// VPMINUB m128 xmm xmm
|
|
// VPMINUB ymm ymm ymm
|
|
// VPMINUB m256 ymm ymm
|
|
func VPMINUB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMINUD: Minimum of Packed Unsigned Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMINUD xmm xmm xmm
|
|
// VPMINUD m128 xmm xmm
|
|
// VPMINUD ymm ymm ymm
|
|
// VPMINUD m256 ymm ymm
|
|
func VPMINUD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMINUW: Minimum of Packed Unsigned Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMINUW xmm xmm xmm
|
|
// VPMINUW m128 xmm xmm
|
|
// VPMINUW ymm ymm ymm
|
|
// VPMINUW m256 ymm ymm
|
|
func VPMINUW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVMSKB: Move Byte Mask.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVMSKB xmm r32
|
|
// VPMOVMSKB ymm r32
|
|
func VPMOVMSKB(xy, r avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(xy) && operand.IsR32(r):
|
|
case operand.IsYmm(xy) && operand.IsR32(r):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVSXBD: Move Packed Byte Integers to Doubleword Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVSXBD xmm xmm
|
|
// VPMOVSXBD m32 xmm
|
|
// VPMOVSXBD xmm ymm
|
|
// VPMOVSXBD m64 ymm
|
|
func VPMOVSXBD(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM32(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM64(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVSXBQ: Move Packed Byte Integers to Quadword Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVSXBQ xmm xmm
|
|
// VPMOVSXBQ m16 xmm
|
|
// VPMOVSXBQ xmm ymm
|
|
// VPMOVSXBQ m32 ymm
|
|
func VPMOVSXBQ(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM16(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM32(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVSXBW: Move Packed Byte Integers to Word Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVSXBW xmm xmm
|
|
// VPMOVSXBW m64 xmm
|
|
// VPMOVSXBW xmm ymm
|
|
// VPMOVSXBW m128 ymm
|
|
func VPMOVSXBW(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM64(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM128(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVSXDQ: Move Packed Doubleword Integers to Quadword Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVSXDQ xmm xmm
|
|
// VPMOVSXDQ m64 xmm
|
|
// VPMOVSXDQ xmm ymm
|
|
// VPMOVSXDQ m128 ymm
|
|
func VPMOVSXDQ(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM64(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM128(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVSXWD: Move Packed Word Integers to Doubleword Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVSXWD xmm xmm
|
|
// VPMOVSXWD m64 xmm
|
|
// VPMOVSXWD xmm ymm
|
|
// VPMOVSXWD m128 ymm
|
|
func VPMOVSXWD(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM64(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM128(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVSXWQ: Move Packed Word Integers to Quadword Integers with Sign Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVSXWQ xmm xmm
|
|
// VPMOVSXWQ m32 xmm
|
|
// VPMOVSXWQ xmm ymm
|
|
// VPMOVSXWQ m64 ymm
|
|
func VPMOVSXWQ(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM32(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM64(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVZXBD: Move Packed Byte Integers to Doubleword Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVZXBD xmm xmm
|
|
// VPMOVZXBD m32 xmm
|
|
// VPMOVZXBD xmm ymm
|
|
// VPMOVZXBD m64 ymm
|
|
func VPMOVZXBD(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM32(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM64(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVZXBQ: Move Packed Byte Integers to Quadword Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVZXBQ xmm xmm
|
|
// VPMOVZXBQ m16 xmm
|
|
// VPMOVZXBQ xmm ymm
|
|
// VPMOVZXBQ m32 ymm
|
|
func VPMOVZXBQ(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM16(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM32(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVZXBW: Move Packed Byte Integers to Word Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVZXBW xmm xmm
|
|
// VPMOVZXBW m64 xmm
|
|
// VPMOVZXBW xmm ymm
|
|
// VPMOVZXBW m128 ymm
|
|
func VPMOVZXBW(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM64(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM128(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVZXDQ: Move Packed Doubleword Integers to Quadword Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVZXDQ xmm xmm
|
|
// VPMOVZXDQ m64 xmm
|
|
// VPMOVZXDQ xmm ymm
|
|
// VPMOVZXDQ m128 ymm
|
|
func VPMOVZXDQ(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM64(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM128(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVZXWD: Move Packed Word Integers to Doubleword Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVZXWD xmm xmm
|
|
// VPMOVZXWD m64 xmm
|
|
// VPMOVZXWD xmm ymm
|
|
// VPMOVZXWD m128 ymm
|
|
func VPMOVZXWD(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM64(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM128(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMOVZXWQ: Move Packed Word Integers to Quadword Integers with Zero Extension.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMOVZXWQ xmm xmm
|
|
// VPMOVZXWQ m32 xmm
|
|
// VPMOVZXWQ xmm ymm
|
|
// VPMOVZXWQ m64 ymm
|
|
func VPMOVZXWQ(mx, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(xy):
|
|
case operand.IsM32(mx) && operand.IsXmm(xy):
|
|
case operand.IsXmm(mx) && operand.IsYmm(xy):
|
|
case operand.IsM64(mx) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMULDQ: Multiply Packed Signed Doubleword Integers and Store Quadword Result.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMULDQ xmm xmm xmm
|
|
// VPMULDQ m128 xmm xmm
|
|
// VPMULDQ ymm ymm ymm
|
|
// VPMULDQ m256 ymm ymm
|
|
func VPMULDQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMULHRSW: Packed Multiply Signed Word Integers and Store High Result with Round and Scale.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMULHRSW xmm xmm xmm
|
|
// VPMULHRSW m128 xmm xmm
|
|
// VPMULHRSW ymm ymm ymm
|
|
// VPMULHRSW m256 ymm ymm
|
|
func VPMULHRSW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMULHUW: Multiply Packed Unsigned Word Integers and Store High Result.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMULHUW xmm xmm xmm
|
|
// VPMULHUW m128 xmm xmm
|
|
// VPMULHUW ymm ymm ymm
|
|
// VPMULHUW m256 ymm ymm
|
|
func VPMULHUW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMULHW: Multiply Packed Signed Word Integers and Store High Result.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMULHW xmm xmm xmm
|
|
// VPMULHW m128 xmm xmm
|
|
// VPMULHW ymm ymm ymm
|
|
// VPMULHW m256 ymm ymm
|
|
func VPMULHW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMULLD: Multiply Packed Signed Doubleword Integers and Store Low Result.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMULLD xmm xmm xmm
|
|
// VPMULLD m128 xmm xmm
|
|
// VPMULLD ymm ymm ymm
|
|
// VPMULLD m256 ymm ymm
|
|
func VPMULLD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMULLW: Multiply Packed Signed Word Integers and Store Low Result.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMULLW xmm xmm xmm
|
|
// VPMULLW m128 xmm xmm
|
|
// VPMULLW ymm ymm ymm
|
|
// VPMULLW m256 ymm ymm
|
|
func VPMULLW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPMULUDQ: Multiply Packed Unsigned Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPMULUDQ xmm xmm xmm
|
|
// VPMULUDQ m128 xmm xmm
|
|
// VPMULUDQ ymm ymm ymm
|
|
// VPMULUDQ m256 ymm ymm
|
|
func VPMULUDQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPOR: Packed Bitwise Logical OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPOR xmm xmm xmm
|
|
// VPOR m128 xmm xmm
|
|
// VPOR ymm ymm ymm
|
|
// VPOR m256 ymm ymm
|
|
func VPOR(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSADBW: Compute Sum of Absolute Differences.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSADBW xmm xmm xmm
|
|
// VPSADBW m128 xmm xmm
|
|
// VPSADBW ymm ymm ymm
|
|
// VPSADBW m256 ymm ymm
|
|
func VPSADBW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSHUFB: Packed Shuffle Bytes.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSHUFB xmm xmm xmm
|
|
// VPSHUFB m128 xmm xmm
|
|
// VPSHUFB ymm ymm ymm
|
|
// VPSHUFB m256 ymm ymm
|
|
func VPSHUFB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSHUFD: Shuffle Packed Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSHUFD imm8 xmm xmm
|
|
// VPSHUFD imm8 m128 xmm
|
|
// VPSHUFD imm8 ymm ymm
|
|
// VPSHUFD imm8 m256 ymm
|
|
func VPSHUFD(i, mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSHUFHW: Shuffle Packed High Words.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSHUFHW imm8 xmm xmm
|
|
// VPSHUFHW imm8 m128 xmm
|
|
// VPSHUFHW imm8 ymm ymm
|
|
// VPSHUFHW imm8 m256 ymm
|
|
func VPSHUFHW(i, mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSHUFLW: Shuffle Packed Low Words.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSHUFLW imm8 xmm xmm
|
|
// VPSHUFLW imm8 m128 xmm
|
|
// VPSHUFLW imm8 ymm ymm
|
|
// VPSHUFLW imm8 m256 ymm
|
|
func VPSHUFLW(i, mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSIGNB: Packed Sign of Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSIGNB xmm xmm xmm
|
|
// VPSIGNB m128 xmm xmm
|
|
// VPSIGNB ymm ymm ymm
|
|
// VPSIGNB m256 ymm ymm
|
|
func VPSIGNB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSIGND: Packed Sign of Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSIGND xmm xmm xmm
|
|
// VPSIGND m128 xmm xmm
|
|
// VPSIGND ymm ymm ymm
|
|
// VPSIGND m256 ymm ymm
|
|
func VPSIGND(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSIGNW: Packed Sign of Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSIGNW xmm xmm xmm
|
|
// VPSIGNW m128 xmm xmm
|
|
// VPSIGNW ymm ymm ymm
|
|
// VPSIGNW m256 ymm ymm
|
|
func VPSIGNW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSLLD: Shift Packed Doubleword Data Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSLLD imm8 xmm xmm
|
|
// VPSLLD xmm xmm xmm
|
|
// VPSLLD m128 xmm xmm
|
|
// VPSLLD imm8 ymm ymm
|
|
// VPSLLD xmm ymm ymm
|
|
// VPSLLD m128 ymm ymm
|
|
func VPSLLD(imx, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSLLDQ: Shift Packed Double Quadword Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSLLDQ imm8 xmm xmm
|
|
// VPSLLDQ imm8 ymm ymm
|
|
func VPSLLDQ(i, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSLLQ: Shift Packed Quadword Data Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSLLQ imm8 xmm xmm
|
|
// VPSLLQ xmm xmm xmm
|
|
// VPSLLQ m128 xmm xmm
|
|
// VPSLLQ imm8 ymm ymm
|
|
// VPSLLQ xmm ymm ymm
|
|
// VPSLLQ m128 ymm ymm
|
|
func VPSLLQ(imx, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSLLVD: Variable Shift Packed Doubleword Data Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSLLVD xmm xmm xmm
|
|
// VPSLLVD m128 xmm xmm
|
|
// VPSLLVD ymm ymm ymm
|
|
// VPSLLVD m256 ymm ymm
|
|
func VPSLLVD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSLLVQ: Variable Shift Packed Quadword Data Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSLLVQ xmm xmm xmm
|
|
// VPSLLVQ m128 xmm xmm
|
|
// VPSLLVQ ymm ymm ymm
|
|
// VPSLLVQ m256 ymm ymm
|
|
func VPSLLVQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSLLW: Shift Packed Word Data Left Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSLLW imm8 xmm xmm
|
|
// VPSLLW xmm xmm xmm
|
|
// VPSLLW m128 xmm xmm
|
|
// VPSLLW imm8 ymm ymm
|
|
// VPSLLW xmm ymm ymm
|
|
// VPSLLW m128 ymm ymm
|
|
func VPSLLW(imx, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSRAD: Shift Packed Doubleword Data Right Arithmetic.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSRAD imm8 xmm xmm
|
|
// VPSRAD xmm xmm xmm
|
|
// VPSRAD m128 xmm xmm
|
|
// VPSRAD imm8 ymm ymm
|
|
// VPSRAD xmm ymm ymm
|
|
// VPSRAD m128 ymm ymm
|
|
func VPSRAD(imx, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSRAVD: Variable Shift Packed Doubleword Data Right Arithmetic.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSRAVD xmm xmm xmm
|
|
// VPSRAVD m128 xmm xmm
|
|
// VPSRAVD ymm ymm ymm
|
|
// VPSRAVD m256 ymm ymm
|
|
func VPSRAVD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSRAW: Shift Packed Word Data Right Arithmetic.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSRAW imm8 xmm xmm
|
|
// VPSRAW xmm xmm xmm
|
|
// VPSRAW m128 xmm xmm
|
|
// VPSRAW imm8 ymm ymm
|
|
// VPSRAW xmm ymm ymm
|
|
// VPSRAW m128 ymm ymm
|
|
func VPSRAW(imx, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSRLD: Shift Packed Doubleword Data Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSRLD imm8 xmm xmm
|
|
// VPSRLD xmm xmm xmm
|
|
// VPSRLD m128 xmm xmm
|
|
// VPSRLD imm8 ymm ymm
|
|
// VPSRLD xmm ymm ymm
|
|
// VPSRLD m128 ymm ymm
|
|
func VPSRLD(imx, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSRLDQ: Shift Packed Double Quadword Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSRLDQ imm8 xmm xmm
|
|
// VPSRLDQ imm8 ymm ymm
|
|
func VPSRLDQ(i, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSRLQ: Shift Packed Quadword Data Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSRLQ imm8 xmm xmm
|
|
// VPSRLQ xmm xmm xmm
|
|
// VPSRLQ m128 xmm xmm
|
|
// VPSRLQ imm8 ymm ymm
|
|
// VPSRLQ xmm ymm ymm
|
|
// VPSRLQ m128 ymm ymm
|
|
func VPSRLQ(imx, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSRLVD: Variable Shift Packed Doubleword Data Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSRLVD xmm xmm xmm
|
|
// VPSRLVD m128 xmm xmm
|
|
// VPSRLVD ymm ymm ymm
|
|
// VPSRLVD m256 ymm ymm
|
|
func VPSRLVD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSRLVQ: Variable Shift Packed Quadword Data Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSRLVQ xmm xmm xmm
|
|
// VPSRLVQ m128 xmm xmm
|
|
// VPSRLVQ ymm ymm ymm
|
|
// VPSRLVQ m256 ymm ymm
|
|
func VPSRLVQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSRLW: Shift Packed Word Data Right Logical.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSRLW imm8 xmm xmm
|
|
// VPSRLW xmm xmm xmm
|
|
// VPSRLW m128 xmm xmm
|
|
// VPSRLW imm8 ymm ymm
|
|
// VPSRLW xmm ymm ymm
|
|
// VPSRLW m128 ymm ymm
|
|
func VPSRLW(imx, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsXmm(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM128(imx) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSUBB: Subtract Packed Byte Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSUBB xmm xmm xmm
|
|
// VPSUBB m128 xmm xmm
|
|
// VPSUBB ymm ymm ymm
|
|
// VPSUBB m256 ymm ymm
|
|
func VPSUBB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSUBD: Subtract Packed Doubleword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSUBD xmm xmm xmm
|
|
// VPSUBD m128 xmm xmm
|
|
// VPSUBD ymm ymm ymm
|
|
// VPSUBD m256 ymm ymm
|
|
func VPSUBD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSUBQ: Subtract Packed Quadword Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSUBQ xmm xmm xmm
|
|
// VPSUBQ m128 xmm xmm
|
|
// VPSUBQ ymm ymm ymm
|
|
// VPSUBQ m256 ymm ymm
|
|
func VPSUBQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSUBSB: Subtract Packed Signed Byte Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSUBSB xmm xmm xmm
|
|
// VPSUBSB m128 xmm xmm
|
|
// VPSUBSB ymm ymm ymm
|
|
// VPSUBSB m256 ymm ymm
|
|
func VPSUBSB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSUBSW: Subtract Packed Signed Word Integers with Signed Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSUBSW xmm xmm xmm
|
|
// VPSUBSW m128 xmm xmm
|
|
// VPSUBSW ymm ymm ymm
|
|
// VPSUBSW m256 ymm ymm
|
|
func VPSUBSW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSUBUSB: Subtract Packed Unsigned Byte Integers with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSUBUSB xmm xmm xmm
|
|
// VPSUBUSB m128 xmm xmm
|
|
// VPSUBUSB ymm ymm ymm
|
|
// VPSUBUSB m256 ymm ymm
|
|
func VPSUBUSB(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSUBUSW: Subtract Packed Unsigned Word Integers with Unsigned Saturation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSUBUSW xmm xmm xmm
|
|
// VPSUBUSW m128 xmm xmm
|
|
// VPSUBUSW ymm ymm ymm
|
|
// VPSUBUSW m256 ymm ymm
|
|
func VPSUBUSW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPSUBW: Subtract Packed Word Integers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPSUBW xmm xmm xmm
|
|
// VPSUBW m128 xmm xmm
|
|
// VPSUBW ymm ymm ymm
|
|
// VPSUBW m256 ymm ymm
|
|
func VPSUBW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPTEST: Packed Logical Compare.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPTEST xmm xmm
|
|
// VPTEST m128 xmm
|
|
// VPTEST ymm ymm
|
|
// VPTEST m256 ymm
|
|
func VPTEST(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPUNPCKHBW: Unpack and Interleave High-Order Bytes into Words.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPUNPCKHBW xmm xmm xmm
|
|
// VPUNPCKHBW m128 xmm xmm
|
|
// VPUNPCKHBW ymm ymm ymm
|
|
// VPUNPCKHBW m256 ymm ymm
|
|
func VPUNPCKHBW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPUNPCKHDQ: Unpack and Interleave High-Order Doublewords into Quadwords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPUNPCKHDQ xmm xmm xmm
|
|
// VPUNPCKHDQ m128 xmm xmm
|
|
// VPUNPCKHDQ ymm ymm ymm
|
|
// VPUNPCKHDQ m256 ymm ymm
|
|
func VPUNPCKHDQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPUNPCKHQDQ: Unpack and Interleave High-Order Quadwords into Double Quadwords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPUNPCKHQDQ xmm xmm xmm
|
|
// VPUNPCKHQDQ m128 xmm xmm
|
|
// VPUNPCKHQDQ ymm ymm ymm
|
|
// VPUNPCKHQDQ m256 ymm ymm
|
|
func VPUNPCKHQDQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPUNPCKHWD: Unpack and Interleave High-Order Words into Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPUNPCKHWD xmm xmm xmm
|
|
// VPUNPCKHWD m128 xmm xmm
|
|
// VPUNPCKHWD ymm ymm ymm
|
|
// VPUNPCKHWD m256 ymm ymm
|
|
func VPUNPCKHWD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPUNPCKLBW: Unpack and Interleave Low-Order Bytes into Words.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPUNPCKLBW xmm xmm xmm
|
|
// VPUNPCKLBW m128 xmm xmm
|
|
// VPUNPCKLBW ymm ymm ymm
|
|
// VPUNPCKLBW m256 ymm ymm
|
|
func VPUNPCKLBW(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPUNPCKLDQ: Unpack and Interleave Low-Order Doublewords into Quadwords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPUNPCKLDQ xmm xmm xmm
|
|
// VPUNPCKLDQ m128 xmm xmm
|
|
// VPUNPCKLDQ ymm ymm ymm
|
|
// VPUNPCKLDQ m256 ymm ymm
|
|
func VPUNPCKLDQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPUNPCKLQDQ: Unpack and Interleave Low-Order Quadwords into Double Quadwords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPUNPCKLQDQ xmm xmm xmm
|
|
// VPUNPCKLQDQ m128 xmm xmm
|
|
// VPUNPCKLQDQ ymm ymm ymm
|
|
// VPUNPCKLQDQ m256 ymm ymm
|
|
func VPUNPCKLQDQ(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPUNPCKLWD: Unpack and Interleave Low-Order Words into Doublewords.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPUNPCKLWD xmm xmm xmm
|
|
// VPUNPCKLWD m128 xmm xmm
|
|
// VPUNPCKLWD ymm ymm ymm
|
|
// VPUNPCKLWD m256 ymm ymm
|
|
func VPUNPCKLWD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VPXOR: Packed Bitwise Logical Exclusive OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VPXOR xmm xmm xmm
|
|
// VPXOR m128 xmm xmm
|
|
// VPXOR ymm ymm ymm
|
|
// VPXOR m256 ymm ymm
|
|
func VPXOR(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VRCPPS: Compute Approximate Reciprocals of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VRCPPS xmm xmm
|
|
// VRCPPS m128 xmm
|
|
// VRCPPS ymm ymm
|
|
// VRCPPS m256 ymm
|
|
func VRCPPS(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VRCPSS: Compute Approximate Reciprocal of Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VRCPSS xmm xmm xmm
|
|
// VRCPSS m32 xmm xmm
|
|
func VRCPSS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VROUNDPD: Round Packed Double Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VROUNDPD imm8 xmm xmm
|
|
// VROUNDPD imm8 m128 xmm
|
|
// VROUNDPD imm8 ymm ymm
|
|
// VROUNDPD imm8 m256 ymm
|
|
func VROUNDPD(i, mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VROUNDPS: Round Packed Single Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VROUNDPS imm8 xmm xmm
|
|
// VROUNDPS imm8 m128 xmm
|
|
// VROUNDPS imm8 ymm ymm
|
|
// VROUNDPS imm8 m256 ymm
|
|
func VROUNDPS(i, mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VROUNDSD: Round Scalar Double Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VROUNDSD imm8 xmm xmm xmm
|
|
// VROUNDSD imm8 m64 xmm xmm
|
|
func VROUNDSD(i, mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VROUNDSS: Round Scalar Single Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VROUNDSS imm8 xmm xmm xmm
|
|
// VROUNDSS imm8 m32 xmm xmm
|
|
func VROUNDSS(i, mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsImm8(i) && operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VRSQRTPS: Compute Reciprocals of Square Roots of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VRSQRTPS xmm xmm
|
|
// VRSQRTPS m128 xmm
|
|
// VRSQRTPS ymm ymm
|
|
// VRSQRTPS m256 ymm
|
|
func VRSQRTPS(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VRSQRTSS: Compute Reciprocal of Square Root of Scalar Single-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VRSQRTSS xmm xmm xmm
|
|
// VRSQRTSS m32 xmm xmm
|
|
func VRSQRTSS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSHUFPD: Shuffle Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSHUFPD imm8 xmm xmm xmm
|
|
// VSHUFPD imm8 m128 xmm xmm
|
|
// VSHUFPD imm8 ymm ymm ymm
|
|
// VSHUFPD imm8 m256 ymm ymm
|
|
func VSHUFPD(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSHUFPS: Shuffle Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSHUFPS imm8 xmm xmm xmm
|
|
// VSHUFPS imm8 m128 xmm xmm
|
|
// VSHUFPS imm8 ymm ymm ymm
|
|
// VSHUFPS imm8 m256 ymm ymm
|
|
func VSHUFPS(i, mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(i) && operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsImm8(i) && operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSQRTPD: Compute Square Roots of Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSQRTPD xmm xmm
|
|
// VSQRTPD m128 xmm
|
|
// VSQRTPD ymm ymm
|
|
// VSQRTPD m256 ymm
|
|
func VSQRTPD(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSQRTPS: Compute Square Roots of Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSQRTPS xmm xmm
|
|
// VSQRTPS m128 xmm
|
|
// VSQRTPS ymm ymm
|
|
// VSQRTPS m256 ymm
|
|
func VSQRTPS(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSQRTSD: Compute Square Root of Scalar Double-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSQRTSD xmm xmm xmm
|
|
// VSQRTSD m64 xmm xmm
|
|
func VSQRTSD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSQRTSS: Compute Square Root of Scalar Single-Precision Floating-Point Value.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSQRTSS xmm xmm xmm
|
|
// VSQRTSS m32 xmm xmm
|
|
func VSQRTSS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSTMXCSR: Store MXCSR Register State.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSTMXCSR m32
|
|
func VSTMXCSR(m avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsM32(m):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSUBPD: Subtract Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSUBPD xmm xmm xmm
|
|
// VSUBPD m128 xmm xmm
|
|
// VSUBPD ymm ymm ymm
|
|
// VSUBPD m256 ymm ymm
|
|
func VSUBPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSUBPS: Subtract Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSUBPS xmm xmm xmm
|
|
// VSUBPS m128 xmm xmm
|
|
// VSUBPS ymm ymm ymm
|
|
// VSUBPS m256 ymm ymm
|
|
func VSUBPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSUBSD: Subtract Scalar Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSUBSD xmm xmm xmm
|
|
// VSUBSD m64 xmm xmm
|
|
func VSUBSD(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM64(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VSUBSS: Subtract Scalar Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VSUBSS xmm xmm xmm
|
|
// VSUBSS m32 xmm xmm
|
|
func VSUBSS(mx, x, x1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
case operand.IsM32(mx) && operand.IsXmm(x) && operand.IsXmm(x1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VTESTPD: Packed Double-Precision Floating-Point Bit Test.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VTESTPD xmm xmm
|
|
// VTESTPD m128 xmm
|
|
// VTESTPD ymm ymm
|
|
// VTESTPD m256 ymm
|
|
func VTESTPD(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VTESTPS: Packed Single-Precision Floating-Point Bit Test.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VTESTPS xmm xmm
|
|
// VTESTPS m128 xmm
|
|
// VTESTPS ymm ymm
|
|
// VTESTPS m256 ymm
|
|
func VTESTPS(mxy, xy avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VUCOMISD: Unordered Compare Scalar Double-Precision Floating-Point Values and Set EFLAGS.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VUCOMISD xmm xmm
|
|
// VUCOMISD m64 xmm
|
|
func VUCOMISD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM64(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VUCOMISS: Unordered Compare Scalar Single-Precision Floating-Point Values and Set EFLAGS.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VUCOMISS xmm xmm
|
|
// VUCOMISS m32 xmm
|
|
func VUCOMISS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM32(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VUNPCKHPD: Unpack and Interleave High Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VUNPCKHPD xmm xmm xmm
|
|
// VUNPCKHPD m128 xmm xmm
|
|
// VUNPCKHPD ymm ymm ymm
|
|
// VUNPCKHPD m256 ymm ymm
|
|
func VUNPCKHPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VUNPCKHPS: Unpack and Interleave High Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VUNPCKHPS xmm xmm xmm
|
|
// VUNPCKHPS m128 xmm xmm
|
|
// VUNPCKHPS ymm ymm ymm
|
|
// VUNPCKHPS m256 ymm ymm
|
|
func VUNPCKHPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VUNPCKLPD: Unpack and Interleave Low Packed Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VUNPCKLPD xmm xmm xmm
|
|
// VUNPCKLPD m128 xmm xmm
|
|
// VUNPCKLPD ymm ymm ymm
|
|
// VUNPCKLPD m256 ymm ymm
|
|
func VUNPCKLPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VUNPCKLPS: Unpack and Interleave Low Packed Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VUNPCKLPS xmm xmm xmm
|
|
// VUNPCKLPS m128 xmm xmm
|
|
// VUNPCKLPS ymm ymm ymm
|
|
// VUNPCKLPS m256 ymm ymm
|
|
func VUNPCKLPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VXORPD: Bitwise Logical XOR for Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VXORPD xmm xmm xmm
|
|
// VXORPD m128 xmm xmm
|
|
// VXORPD ymm ymm ymm
|
|
// VXORPD m256 ymm ymm
|
|
func VXORPD(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VXORPS: Bitwise Logical XOR for Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VXORPS xmm xmm xmm
|
|
// VXORPS m128 xmm xmm
|
|
// VXORPS ymm ymm ymm
|
|
// VXORPS m256 ymm ymm
|
|
func VXORPS(mxy, xy, xy1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsM128(mxy) && operand.IsXmm(xy) && operand.IsXmm(xy1):
|
|
case operand.IsYmm(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
case operand.IsM256(mxy) && operand.IsYmm(xy) && operand.IsYmm(xy1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// VZEROALL: Zero All YMM Registers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VZEROALL
|
|
func VZEROALL() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// VZEROUPPER: Zero Upper Bits of YMM Registers.
|
|
//
|
|
// Forms:
|
|
//
|
|
// VZEROUPPER
|
|
func VZEROUPPER() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// XADDB: Exchange and Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XADDB r8 r8
|
|
// XADDB r8 m8
|
|
func XADDB(r, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(r) && operand.IsR8(mr):
|
|
case operand.IsR8(r) && operand.IsM8(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XADDL: Exchange and Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XADDL r32 r32
|
|
// XADDL r32 m32
|
|
func XADDL(r, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(r) && operand.IsR32(mr):
|
|
case operand.IsR32(r) && operand.IsM32(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XADDQ: Exchange and Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XADDQ r64 r64
|
|
// XADDQ r64 m64
|
|
func XADDQ(r, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(r) && operand.IsR64(mr):
|
|
case operand.IsR64(r) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XADDW: Exchange and Add.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XADDW r16 r16
|
|
// XADDW r16 m16
|
|
func XADDW(r, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(r) && operand.IsR16(mr):
|
|
case operand.IsR16(r) && operand.IsM16(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XCHGB: Exchange Register/Memory with Register.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XCHGB r8 r8
|
|
// XCHGB m8 r8
|
|
// XCHGB r8 m8
|
|
func XCHGB(mr, mr1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR8(mr) && operand.IsR8(mr1):
|
|
case operand.IsM8(mr) && operand.IsR8(mr1):
|
|
case operand.IsR8(mr) && operand.IsM8(mr1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XCHGL: Exchange Register/Memory with Register.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XCHGL r32 eax
|
|
// XCHGL eax r32
|
|
// XCHGL r32 r32
|
|
// XCHGL m32 r32
|
|
// XCHGL r32 m32
|
|
func XCHGL(emr, emr1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR32(emr) && operand.IsEax(emr1):
|
|
case operand.IsEax(emr) && operand.IsR32(emr1):
|
|
case operand.IsR32(emr) && operand.IsR32(emr1):
|
|
case operand.IsM32(emr) && operand.IsR32(emr1):
|
|
case operand.IsR32(emr) && operand.IsM32(emr1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XCHGQ: Exchange Register/Memory with Register.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XCHGQ r64 rax
|
|
// XCHGQ rax r64
|
|
// XCHGQ r64 r64
|
|
// XCHGQ m64 r64
|
|
// XCHGQ r64 m64
|
|
func XCHGQ(mr, mr1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR64(mr) && operand.IsRax(mr1):
|
|
case operand.IsRax(mr) && operand.IsR64(mr1):
|
|
case operand.IsR64(mr) && operand.IsR64(mr1):
|
|
case operand.IsM64(mr) && operand.IsR64(mr1):
|
|
case operand.IsR64(mr) && operand.IsM64(mr1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XCHGW: Exchange Register/Memory with Register.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XCHGW r16 ax
|
|
// XCHGW ax r16
|
|
// XCHGW r16 r16
|
|
// XCHGW m16 r16
|
|
// XCHGW r16 m16
|
|
func XCHGW(amr, amr1 avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsR16(amr) && operand.IsAx(amr1):
|
|
case operand.IsAx(amr) && operand.IsR16(amr1):
|
|
case operand.IsR16(amr) && operand.IsR16(amr1):
|
|
case operand.IsM16(amr) && operand.IsR16(amr1):
|
|
case operand.IsR16(amr) && operand.IsM16(amr1):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XGETBV: Get Value of Extended Control Register.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XGETBV
|
|
func XGETBV() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// XLAT: Table Look-up Translation.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XLAT
|
|
// XLAT
|
|
func XLAT() (*avo.Instruction, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// XORB: Logical Exclusive OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XORB imm8 al
|
|
// XORB imm8 r8
|
|
// XORB r8 r8
|
|
// XORB m8 r8
|
|
// XORB imm8 m8
|
|
// XORB r8 m8
|
|
func XORB(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm8(imr) && operand.IsAl(amr):
|
|
case operand.IsImm8(imr) && operand.IsR8(amr):
|
|
case operand.IsR8(imr) && operand.IsR8(amr):
|
|
case operand.IsM8(imr) && operand.IsR8(amr):
|
|
case operand.IsImm8(imr) && operand.IsM8(amr):
|
|
case operand.IsR8(imr) && operand.IsM8(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XORL: Logical Exclusive OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XORL imm32 eax
|
|
// XORL imm8 r32
|
|
// XORL imm32 r32
|
|
// XORL r32 r32
|
|
// XORL m32 r32
|
|
// XORL imm8 m32
|
|
// XORL imm32 m32
|
|
// XORL r32 m32
|
|
func XORL(imr, emr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsEax(emr):
|
|
case operand.IsImm8(imr) && operand.IsR32(emr):
|
|
case operand.IsImm32(imr) && operand.IsR32(emr):
|
|
case operand.IsR32(imr) && operand.IsR32(emr):
|
|
case operand.IsM32(imr) && operand.IsR32(emr):
|
|
case operand.IsImm8(imr) && operand.IsM32(emr):
|
|
case operand.IsImm32(imr) && operand.IsM32(emr):
|
|
case operand.IsR32(imr) && operand.IsM32(emr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XORPD: Bitwise Logical XOR for Double-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XORPD xmm xmm
|
|
// XORPD m128 xmm
|
|
func XORPD(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XORPS: Bitwise Logical XOR for Single-Precision Floating-Point Values.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XORPS xmm xmm
|
|
// XORPS m128 xmm
|
|
func XORPS(mx, x avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsXmm(mx) && operand.IsXmm(x):
|
|
case operand.IsM128(mx) && operand.IsXmm(x):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XORQ: Logical Exclusive OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XORQ imm32 rax
|
|
// XORQ imm8 r64
|
|
// XORQ imm32 r64
|
|
// XORQ r64 r64
|
|
// XORQ m64 r64
|
|
// XORQ imm8 m64
|
|
// XORQ imm32 m64
|
|
// XORQ r64 m64
|
|
func XORQ(imr, mr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm32(imr) && operand.IsRax(mr):
|
|
case operand.IsImm8(imr) && operand.IsR64(mr):
|
|
case operand.IsImm32(imr) && operand.IsR64(mr):
|
|
case operand.IsR64(imr) && operand.IsR64(mr):
|
|
case operand.IsM64(imr) && operand.IsR64(mr):
|
|
case operand.IsImm8(imr) && operand.IsM64(mr):
|
|
case operand.IsImm32(imr) && operand.IsM64(mr):
|
|
case operand.IsR64(imr) && operand.IsM64(mr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|
|
|
|
// XORW: Logical Exclusive OR.
|
|
//
|
|
// Forms:
|
|
//
|
|
// XORW imm16 ax
|
|
// XORW imm8 r16
|
|
// XORW imm16 r16
|
|
// XORW r16 r16
|
|
// XORW m16 r16
|
|
// XORW imm8 m16
|
|
// XORW imm16 m16
|
|
// XORW r16 m16
|
|
func XORW(imr, amr avo.Operand) (*avo.Instruction, error) {
|
|
switch {
|
|
case operand.IsImm16(imr) && operand.IsAx(amr):
|
|
case operand.IsImm8(imr) && operand.IsR16(amr):
|
|
case operand.IsImm16(imr) && operand.IsR16(amr):
|
|
case operand.IsR16(imr) && operand.IsR16(amr):
|
|
case operand.IsM16(imr) && operand.IsR16(amr):
|
|
case operand.IsImm8(imr) && operand.IsM16(amr):
|
|
case operand.IsImm16(imr) && operand.IsM16(amr):
|
|
case operand.IsR16(imr) && operand.IsM16(amr):
|
|
default:
|
|
return nil, ErrBadOperandTypes
|
|
}
|
|
return nil, nil
|
|
}
|