From 6593ba7ecc98b9590d02025a3251b3892d9d318d Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Thu, 21 May 2015 12:33:36 +0200 Subject: [PATCH] XEmitter: add BLENDPS/BLENDPD --- Source/Core/Common/x64Emitter.cpp | 2 ++ Source/Core/Common/x64Emitter.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/x64Emitter.cpp b/Source/Core/Common/x64Emitter.cpp index 8a89e4f6c8..da5627eee1 100644 --- a/Source/Core/Common/x64Emitter.cpp +++ b/Source/Core/Common/x64Emitter.cpp @@ -1775,6 +1775,8 @@ void XEmitter::PMOVZXDQ(X64Reg dest, OpArg arg) {WriteSSE41Op(0x66, 0x3835, dest void XEmitter::PBLENDVB(X64Reg dest, OpArg arg) {WriteSSE41Op(0x66, 0x3810, dest, arg);} void XEmitter::BLENDVPS(X64Reg dest, OpArg arg) {WriteSSE41Op(0x66, 0x3814, dest, arg);} void XEmitter::BLENDVPD(X64Reg dest, OpArg arg) {WriteSSE41Op(0x66, 0x3815, dest, arg);} +void XEmitter::BLENDPS(X64Reg dest, OpArg arg, u8 blend) {WriteSSE41Op(0x66, 0x3A0C, dest, arg, 1); Write8(blend);} +void XEmitter::BLENDPD(X64Reg dest, OpArg arg, u8 blend) {WriteSSE41Op(0x66, 0x3A0D, dest, arg, 1); Write8(blend);} void XEmitter::PAND(X64Reg dest, OpArg arg) {WriteSSEOp(0x66, 0xDB, dest, arg);} void XEmitter::PANDN(X64Reg dest, OpArg arg) {WriteSSEOp(0x66, 0xDF, dest, arg);} diff --git a/Source/Core/Common/x64Emitter.h b/Source/Core/Common/x64Emitter.h index dc488b1c3a..83be57062b 100644 --- a/Source/Core/Common/x64Emitter.h +++ b/Source/Core/Common/x64Emitter.h @@ -789,10 +789,12 @@ public: void PMOVZXWQ(X64Reg dest, OpArg arg); void PMOVZXDQ(X64Reg dest, OpArg arg); - // SSE4: variable blend instructions (xmm0 implicit argument) + // SSE4: blend instructions void PBLENDVB(X64Reg dest, OpArg arg); void BLENDVPS(X64Reg dest, OpArg arg); void BLENDVPD(X64Reg dest, OpArg arg); + void BLENDPS(X64Reg dest, OpArg arg, u8 blend); + void BLENDPD(X64Reg dest, OpArg arg, u8 blend); // AVX void VADDSD(X64Reg regOp1, X64Reg regOp2, OpArg arg);