mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-04 10:02:58 +00:00
TranslateArm: Implement QSUB8.
This commit is contained in:
@@ -1055,7 +1055,7 @@ void EmitX64::EmitByteReverseDual(IR::Block&, IR::Inst* inst) {
|
||||
code->BSWAP(64, result);
|
||||
}
|
||||
|
||||
void EmitX64::EmitPackedSaturatedSubU8(IR::Block& block, IR::Inst* inst) {
|
||||
static void EmitPackedOperation(BlockOfCode* code, RegAlloc& reg_alloc, IR::Inst* inst, void (XEmitter::*fn)(X64Reg, const OpArg&)) {
|
||||
IR::Value a = inst->GetArg(0);
|
||||
IR::Value b = inst->GetArg(1);
|
||||
|
||||
@@ -1068,11 +1068,19 @@ void EmitX64::EmitPackedSaturatedSubU8(IR::Block& block, IR::Inst* inst) {
|
||||
code->MOVD_xmm(xmm_scratch_a, R(result));
|
||||
code->MOVD_xmm(xmm_scratch_b, op_arg);
|
||||
|
||||
code->PSUBUSB(xmm_scratch_a, R(xmm_scratch_b));
|
||||
(code->*fn)(xmm_scratch_a, R(xmm_scratch_b));
|
||||
|
||||
code->MOVD_xmm(R(result), xmm_scratch_a);
|
||||
}
|
||||
|
||||
void EmitX64::EmitPackedSaturatedSubU8(IR::Block& block, IR::Inst* inst) {
|
||||
EmitPackedOperation(code, reg_alloc, inst, &XEmitter::PSUBUSB);
|
||||
}
|
||||
|
||||
void EmitX64::EmitPackedSaturatedSubS8(IR::Block& block, IR::Inst* inst) {
|
||||
EmitPackedOperation(code, reg_alloc, inst, &XEmitter::PSUBSB);
|
||||
}
|
||||
|
||||
static void DenormalsAreZero32(BlockOfCode* code, X64Reg xmm_value, X64Reg gpr_scratch) {
|
||||
// We need to report back whether we've found a denormal on input.
|
||||
// SSE doesn't do this for us when SSE's DAZ is enabled.
|
||||
|
||||
Reference in New Issue
Block a user