HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Android 10
|
10.0.0_r6
下载
查看原文件
收藏
根目录
external
swiftshader
third_party
subzero
src
IceAssemblerX86BaseImpl.h
//===- subzero/src/IceAssemblerX86BaseImpl.h - base x86 assembler -*- C++ -*-=// // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // // Modified by the Subzero authors. // //===----------------------------------------------------------------------===// // // The Subzero Code Generator // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // /// \file /// \brief Implements the AssemblerX86Base template class, which is the base /// Assembler class for X86 assemblers. // //===----------------------------------------------------------------------===// #include "IceAssemblerX86Base.h" #include "IceCfg.h" #include "IceCfgNode.h" #include "IceOperand.h" namespace Ice { namespace X86NAMESPACE { template
AssemblerX86Base
::~AssemblerX86Base() { if (BuildDefs::asserts()) { for (const Label *Label : CfgNodeLabels) { Label->finalCheck(); } for (const Label *Label : LocalLabels) { Label->finalCheck(); } } } template
void AssemblerX86Base
::alignFunction() { const SizeT Align = 1 << getBundleAlignLog2Bytes(); SizeT BytesNeeded = Utils::OffsetToAlignment(Buffer.getPosition(), Align); constexpr SizeT HltSize = 1; while (BytesNeeded > 0) { hlt(); BytesNeeded -= HltSize; } } template
typename AssemblerX86Base
::Label * AssemblerX86Base
::getOrCreateLabel(SizeT Number, LabelVector &Labels) { Label *L = nullptr; if (Number == Labels.size()) { L = new (this->allocate
()) Label(); Labels.push_back(L); return L; } if (Number > Labels.size()) { Utils::reserveAndResize(Labels, Number + 1); } L = Labels[Number]; if (!L) { L = new (this->allocate
()) Label(); Labels[Number] = L; } return L; } template
Ice::Label *AssemblerX86Base
::getCfgNodeLabel(SizeT NodeNumber) { assert(NodeNumber < CfgNodeLabels.size()); return CfgNodeLabels[NodeNumber]; } template
typename AssemblerX86Base
::Label * AssemblerX86Base
::getOrCreateCfgNodeLabel(SizeT NodeNumber) { return getOrCreateLabel(NodeNumber, CfgNodeLabels); } template
typename AssemblerX86Base
::Label * AssemblerX86Base
::getOrCreateLocalLabel(SizeT Number) { return getOrCreateLabel(Number, LocalLabels); } template
void AssemblerX86Base
::bindCfgNodeLabel(const CfgNode *Node) { assert(!getPreliminary()); Label *L = getOrCreateCfgNodeLabel(Node->getIndex()); this->bind(L); } template
void AssemblerX86Base
::bindLocalLabel(SizeT Number) { Label *L = getOrCreateLocalLabel(Number); if (!getPreliminary()) this->bind(L); } template
void AssemblerX86Base
::call(GPRRegister reg) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitRexB(RexTypeIrrelevant, reg); emitUint8(0xFF); emitRegisterOperand(2, gprEncoding(reg)); } template
void AssemblerX86Base
::call(const Address &address) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, address, RexRegIrrelevant); emitUint8(0xFF); emitOperand(2, address); } template
void AssemblerX86Base
::call(const ConstantRelocatable *label) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); intptr_t call_start = Buffer.getPosition(); emitUint8(0xE8); auto *Fixup = this->createFixup(Traits::FK_PcRel, label); Fixup->set_addend(-4); emitFixup(Fixup); emitInt32(0); assert((Buffer.getPosition() - call_start) == kCallExternalLabelSize); (void)call_start; } template
void AssemblerX86Base
::call(const Immediate &abs_address) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); intptr_t call_start = Buffer.getPosition(); emitUint8(0xE8); auto *Fixup = this->createFixup(Traits::FK_PcRel, AssemblerFixup::NullSymbol); Fixup->set_addend(abs_address.value() - 4); emitFixup(Fixup); emitInt32(0); assert((Buffer.getPosition() - call_start) == kCallExternalLabelSize); (void)call_start; } template
void AssemblerX86Base
::pushl(GPRRegister reg) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitRexB(RexTypeIrrelevant, reg); emitUint8(0x50 + gprEncoding(reg)); } template
void AssemblerX86Base
::pushl(const Immediate &Imm) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x68); emitInt32(Imm.value()); } template
void AssemblerX86Base
::pushl(const ConstantRelocatable *Label) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x68); emitFixup(this->createFixup(Traits::FK_Abs, Label)); // In x86-32, the emitted value is an addend to the relocation. Therefore, we // must emit a 0 (because we're pushing an absolute relocation.) // In x86-64, the emitted value does not matter (the addend lives in the // relocation record as an extra field.) emitInt32(0); } template
void AssemblerX86Base
::popl(GPRRegister reg) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); // Any type that would not force a REX prefix to be emitted can be provided // here. emitRexB(RexTypeIrrelevant, reg); emitUint8(0x58 + gprEncoding(reg)); } template
void AssemblerX86Base
::popl(const Address &address) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, address, RexRegIrrelevant); emitUint8(0x8F); emitOperand(0, address); } template
template
void AssemblerX86Base
::pushal() { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x60); } template
template
void AssemblerX86Base
::popal() { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x61); } template
void AssemblerX86Base
::setcc(BrCond condition, ByteRegister dst) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitRexB(IceType_i8, dst); emitUint8(0x0F); emitUint8(0x90 + condition); emitUint8(0xC0 + gprEncoding(dst)); } template
void AssemblerX86Base
::setcc(BrCond condition, const Address &address) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, address, RexRegIrrelevant); emitUint8(0x0F); emitUint8(0x90 + condition); emitOperand(0, address); } template
void AssemblerX86Base
::mov(Type Ty, GPRRegister dst, const Immediate &imm) { assert(Ty != IceType_i64 && "i64 not supported yet."); AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (Ty == IceType_i16) emitOperandSizeOverride(); emitRexB(Ty, dst); if (isByteSizedType(Ty)) { emitUint8(0xB0 + gprEncoding(dst)); emitUint8(imm.value() & 0xFF); } else { // TODO(jpp): When removing the assertion above ensure that in x86-64 we // emit a 64-bit immediate. emitUint8(0xB8 + gprEncoding(dst)); emitImmediate(Ty, imm); } } template
void AssemblerX86Base
::mov(Type Ty, GPRRegister dst, GPRRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (Ty == IceType_i16) emitOperandSizeOverride(); emitRexRB(Ty, src, dst); if (isByteSizedType(Ty)) { emitUint8(0x88); } else { emitUint8(0x89); } emitRegisterOperand(gprEncoding(src), gprEncoding(dst)); } template
void AssemblerX86Base
::mov(Type Ty, GPRRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (Ty == IceType_i16) emitOperandSizeOverride(); emitAddrSizeOverridePrefix(); emitRex(Ty, src, dst); if (isByteSizedType(Ty)) { emitUint8(0x8A); } else { emitUint8(0x8B); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::mov(Type Ty, const Address &dst, GPRRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (Ty == IceType_i16) emitOperandSizeOverride(); emitAddrSizeOverridePrefix(); emitRex(Ty, dst, src); if (isByteSizedType(Ty)) { emitUint8(0x88); } else { emitUint8(0x89); } emitOperand(gprEncoding(src), dst); } template
void AssemblerX86Base
::mov(Type Ty, const Address &dst, const Immediate &imm) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (Ty == IceType_i16) emitOperandSizeOverride(); emitAddrSizeOverridePrefix(); emitRex(Ty, dst, RexRegIrrelevant); if (isByteSizedType(Ty)) { emitUint8(0xC6); static constexpr RelocOffsetT OffsetFromNextInstruction = 1; emitOperand(0, dst, OffsetFromNextInstruction); emitUint8(imm.value() & 0xFF); } else { emitUint8(0xC7); const uint8_t OffsetFromNextInstruction = Ty == IceType_i16 ? 2 : 4; emitOperand(0, dst, OffsetFromNextInstruction); emitImmediate(Ty, imm); } } template
template
typename std::enable_if
::type AssemblerX86Base
::movabs(const GPRRegister Dst, uint64_t Imm64) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); const bool NeedsRexW = (Imm64 & ~0xFFFFFFFFull) != 0; const Type RexType = NeedsRexW ? RexTypeForceRexW : RexTypeIrrelevant; emitRexB(RexType, Dst); emitUint8(0xB8 | gprEncoding(Dst)); // When emitting Imm64, we don't have to mask out the upper 32 bits for // emitInt32 will/should only emit a 32-bit constant. In reality, we are // paranoid, so we go ahead an mask the upper bits out anyway. emitInt32(Imm64 & 0xFFFFFFFF); if (NeedsRexW) emitInt32((Imm64 >> 32) & 0xFFFFFFFF); } template
void AssemblerX86Base
::movzx(Type SrcTy, GPRRegister dst, GPRRegister src) { if (Traits::Is64Bit && SrcTy == IceType_i32) { // 32-bit mov clears the upper 32 bits, hence zero-extending the 32-bit // operand to 64-bit. mov(IceType_i32, dst, src); return; } AssemblerBuffer::EnsureCapacity ensured(&Buffer); bool ByteSized = isByteSizedType(SrcTy); assert(ByteSized || SrcTy == IceType_i16); emitRexRB(RexTypeIrrelevant, dst, SrcTy, src); emitUint8(0x0F); emitUint8(ByteSized ? 0xB6 : 0xB7); emitRegisterOperand(gprEncoding(dst), gprEncoding(src)); } template
void AssemblerX86Base
::movzx(Type SrcTy, GPRRegister dst, const Address &src) { if (Traits::Is64Bit && SrcTy == IceType_i32) { // 32-bit mov clears the upper 32 bits, hence zero-extending the 32-bit // operand to 64-bit. mov(IceType_i32, dst, src); return; } AssemblerBuffer::EnsureCapacity ensured(&Buffer); bool ByteSized = isByteSizedType(SrcTy); assert(ByteSized || SrcTy == IceType_i16); emitAddrSizeOverridePrefix(); emitRex(SrcTy, src, RexTypeIrrelevant, dst); emitUint8(0x0F); emitUint8(ByteSized ? 0xB6 : 0xB7); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::movsx(Type SrcTy, GPRRegister dst, GPRRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); bool ByteSized = isByteSizedType(SrcTy); emitRexRB(RexTypeForceRexW, dst, SrcTy, src); if (ByteSized || SrcTy == IceType_i16) { emitUint8(0x0F); emitUint8(ByteSized ? 0xBE : 0xBF); } else { assert(Traits::Is64Bit && SrcTy == IceType_i32); emitUint8(0x63); } emitRegisterOperand(gprEncoding(dst), gprEncoding(src)); } template
void AssemblerX86Base
::movsx(Type SrcTy, GPRRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); bool ByteSized = isByteSizedType(SrcTy); emitAddrSizeOverridePrefix(); emitRex(SrcTy, src, RexTypeForceRexW, dst); if (ByteSized || SrcTy == IceType_i16) { emitUint8(0x0F); emitUint8(ByteSized ? 0xBE : 0xBF); } else { assert(Traits::Is64Bit && SrcTy == IceType_i32); emitUint8(0x63); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::lea(Type Ty, GPRRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); assert(Ty == IceType_i16 || Ty == IceType_i32 || (Traits::Is64Bit && Ty == IceType_i64)); if (Ty == IceType_i16) emitOperandSizeOverride(); emitAddrSizeOverridePrefix(); emitRex(Ty, src, dst); emitUint8(0x8D); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::cmov(Type Ty, BrCond cond, GPRRegister dst, GPRRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (Ty == IceType_i16) emitOperandSizeOverride(); else assert(Ty == IceType_i32 || (Traits::Is64Bit && Ty == IceType_i64)); emitRexRB(Ty, dst, src); emitUint8(0x0F); emitUint8(0x40 + cond); emitRegisterOperand(gprEncoding(dst), gprEncoding(src)); } template
void AssemblerX86Base
::cmov(Type Ty, BrCond cond, GPRRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (Ty == IceType_i16) emitOperandSizeOverride(); else assert(Ty == IceType_i32 || (Traits::Is64Bit && Ty == IceType_i64)); emitAddrSizeOverridePrefix(); emitRex(Ty, src, dst); emitUint8(0x0F); emitUint8(0x40 + cond); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::rep_movsb() { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0xF3); emitUint8(0xA4); } template
void AssemblerX86Base
::movss(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x10); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::movss(Type Ty, const Address &dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x11); emitOperand(gprEncoding(src), dst); } template
void AssemblerX86Base
::movss(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitRexRB(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x11); emitXmmRegisterOperand(src, dst); } template
void AssemblerX86Base
::movd(Type SrcTy, XmmRegister dst, GPRRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(SrcTy, dst, src); emitUint8(0x0F); emitUint8(0x6E); emitRegisterOperand(gprEncoding(dst), gprEncoding(src)); } template
void AssemblerX86Base
::movd(Type SrcTy, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(SrcTy, src, dst); emitUint8(0x0F); emitUint8(0x6E); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::movd(Type DestTy, GPRRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(DestTy, src, dst); emitUint8(0x0F); emitUint8(0x7E); emitRegisterOperand(gprEncoding(src), gprEncoding(dst)); } template
void AssemblerX86Base
::movd(Type DestTy, const Address &dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(DestTy, dst, src); emitUint8(0x0F); emitUint8(0x7E); emitOperand(gprEncoding(src), dst); } template
void AssemblerX86Base
::movq(XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0xF3); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x7E); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::movq(const Address &dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0xD6); emitOperand(gprEncoding(src), dst); } template
void AssemblerX86Base
::movq(XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0xF3); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x7E); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::addss(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x58); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::addss(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x58); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::subss(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x5C); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::subss(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x5C); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::mulss(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x59); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::mulss(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x59); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::divss(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x5E); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::divss(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x5E); emitOperand(gprEncoding(dst), src); } template
template
void AssemblerX86Base
::fld(Type Ty, const typename T::Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xD9 : 0xDD); emitOperand(0, src); } template
template
void AssemblerX86Base
::fstp(Type Ty, const typename T::Address &dst) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xD9 : 0xDD); emitOperand(3, dst); } template
template
void AssemblerX86Base
::fstp(typename T::X87STRegister st) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0xDD); emitUint8(0xD8 + st); } template
void AssemblerX86Base
::movaps(XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x28); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::movups(XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x10); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::movups(XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x10); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::movups(const Address &dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x11); emitOperand(gprEncoding(src), dst); } template
void AssemblerX86Base
::padd(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xFC); } else if (Ty == IceType_i16) { emitUint8(0xFD); } else { emitUint8(0xFE); } emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::padd(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xFC); } else if (Ty == IceType_i16) { emitUint8(0xFD); } else { emitUint8(0xFE); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::padds(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xEC); } else if (Ty == IceType_i16) { emitUint8(0xED); } else { assert(false && "Unexpected padds operand type"); } emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::padds(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xEC); } else if (Ty == IceType_i16) { emitUint8(0xED); } else { assert(false && "Unexpected padds operand type"); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::paddus(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xDC); } else if (Ty == IceType_i16) { emitUint8(0xDD); } else { assert(false && "Unexpected paddus operand type"); } emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::paddus(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xDC); } else if (Ty == IceType_i16) { emitUint8(0xDD); } else { assert(false && "Unexpected paddus operand type"); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::pand(Type /* Ty */, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0xDB); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::pand(Type /* Ty */, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0xDB); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::pandn(Type /* Ty */, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0xDF); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::pandn(Type /* Ty */, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0xDF); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::pmull(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0xD5); } else { assert(Ty == IceType_i32); emitUint8(0x38); emitUint8(0x40); } emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::pmull(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0xD5); } else { assert(Ty == IceType_i32); emitUint8(0x38); emitUint8(0x40); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::pmulhw(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); assert(Ty == IceType_v8i16); (void)Ty; emitUint8(0xE5); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::pmulhw(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); assert(Ty == IceType_v8i16); (void)Ty; emitUint8(0xE5); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::pmulhuw(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); assert(Ty == IceType_v8i16); (void)Ty; emitUint8(0xE4); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::pmulhuw(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); assert(Ty == IceType_v8i16); (void)Ty; emitUint8(0xE4); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::pmaddwd(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); assert(Ty == IceType_v8i16); (void)Ty; emitUint8(0xF5); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::pmaddwd(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); assert(Ty == IceType_v8i16); (void)Ty; emitUint8(0xF5); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::pmuludq(Type /* Ty */, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0xF4); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::pmuludq(Type /* Ty */, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0xF4); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::por(Type /* Ty */, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0xEB); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::por(Type /* Ty */, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0xEB); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::psub(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xF8); } else if (Ty == IceType_i16) { emitUint8(0xF9); } else { emitUint8(0xFA); } emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::psub(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xF8); } else if (Ty == IceType_i16) { emitUint8(0xF9); } else { emitUint8(0xFA); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::psubs(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xE8); } else if (Ty == IceType_i16) { emitUint8(0xE9); } else { assert(false && "Unexpected psubs operand type"); } emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::psubs(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xE8); } else if (Ty == IceType_i16) { emitUint8(0xE9); } else { assert(false && "Unexpected psubs operand type"); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::psubus(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xD8); } else if (Ty == IceType_i16) { emitUint8(0xD9); } else { assert(false && "Unexpected psubus operand type"); } emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::psubus(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); if (isByteSizedArithType(Ty)) { emitUint8(0xD8); } else if (Ty == IceType_i16) { emitUint8(0xD9); } else { assert(false && "Unexpected psubus operand type"); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::pxor(Type /* Ty */, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0xEF); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::pxor(Type /* Ty */, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0xEF); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::psll(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0xF1); } else { assert(Ty == IceType_i32); emitUint8(0xF2); } emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::psll(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0xF1); } else { assert(Ty == IceType_i32); emitUint8(0xF2); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::psll(Type Ty, XmmRegister dst, const Immediate &imm) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); assert(imm.is_int8()); emitUint8(0x66); emitRexB(RexTypeIrrelevant, dst); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0x71); } else { assert(Ty == IceType_i32); emitUint8(0x72); } emitRegisterOperand(6, gprEncoding(dst)); emitUint8(imm.value() & 0xFF); } template
void AssemblerX86Base
::psra(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0xE1); } else { assert(Ty == IceType_i32); emitUint8(0xE2); } emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::psra(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0xE1); } else { assert(Ty == IceType_i32); emitUint8(0xE2); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::psra(Type Ty, XmmRegister dst, const Immediate &imm) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); assert(imm.is_int8()); emitUint8(0x66); emitRexB(RexTypeIrrelevant, dst); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0x71); } else { assert(Ty == IceType_i32); emitUint8(0x72); } emitRegisterOperand(4, gprEncoding(dst)); emitUint8(imm.value() & 0xFF); } template
void AssemblerX86Base
::psrl(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0xD1); } else if (Ty == IceType_f64) { emitUint8(0xD3); } else { assert(Ty == IceType_i32 || Ty == IceType_f32 || Ty == IceType_v4f32); emitUint8(0xD2); } emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::psrl(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0xD1); } else if (Ty == IceType_f64) { emitUint8(0xD3); } else { assert(Ty == IceType_i32 || Ty == IceType_f32 || Ty == IceType_v4f32); emitUint8(0xD2); } emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::psrl(Type Ty, XmmRegister dst, const Immediate &imm) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); assert(imm.is_int8()); emitUint8(0x66); emitRexB(RexTypeIrrelevant, dst); emitUint8(0x0F); if (Ty == IceType_i16) { emitUint8(0x71); } else if (Ty == IceType_f64) { emitUint8(0x73); } else { assert(Ty == IceType_i32 || Ty == IceType_f32 || Ty == IceType_v4f32); emitUint8(0x72); } emitRegisterOperand(2, gprEncoding(dst)); emitUint8(imm.value() & 0xFF); } // {add,sub,mul,div}ps are given a Ty parameter for consistency with // {add,sub,mul,div}ss. In the future, when the PNaCl ABI allows addpd, etc., // we can use the Ty parameter to decide on adding a 0x66 prefix. template
void AssemblerX86Base
::addps(Type /* Ty */, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x58); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::addps(Type /* Ty */, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x58); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::subps(Type /* Ty */, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x5C); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::subps(Type /* Ty */, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x5C); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::divps(Type /* Ty */, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x5E); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::divps(Type /* Ty */, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x5E); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::mulps(Type /* Ty */, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x59); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::mulps(Type /* Ty */, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x59); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::minps(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (!isFloat32Asserting32Or64(Ty)) emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x5D); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::minps(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (!isFloat32Asserting32Or64(Ty)) emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x5D); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::minss(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x5D); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::minss(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x5D); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::maxps(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (!isFloat32Asserting32Or64(Ty)) emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x5F); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::maxps(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (!isFloat32Asserting32Or64(Ty)) emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x5F); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::maxss(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x5F); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::maxss(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); emitUint8(isFloat32Asserting32Or64(Ty) ? 0xF3 : 0xF2); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x5F); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::andnps(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (!isFloat32Asserting32Or64(Ty)) emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x55); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::andnps(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (!isFloat32Asserting32Or64(Ty)) emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x55); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::andps(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (!isFloat32Asserting32Or64(Ty)) emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x54); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base
::andps(Type Ty, XmmRegister dst, const Address &src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (!isFloat32Asserting32Or64(Ty)) emitUint8(0x66); emitAddrSizeOverridePrefix(); emitRex(RexTypeIrrelevant, src, dst); emitUint8(0x0F); emitUint8(0x54); emitOperand(gprEncoding(dst), src); } template
void AssemblerX86Base
::orps(Type Ty, XmmRegister dst, XmmRegister src) { AssemblerBuffer::EnsureCapacity ensured(&Buffer); if (!isFloat32Asserting32Or64(Ty)) emitUint8(0x66); emitRexRB(RexTypeIrrelevant, dst, src); emitUint8(0x0F); emitUint8(0x56); emitXmmRegisterOperand(dst, src); } template
void AssemblerX86Base