mirror of
https://github.com/yuzu-mirror/dynarmic.git
synced 2026-01-07 09:00:04 +01:00
Removes unnecessary header dependencies that have accumulated over time as changes have been made. Lessens the amount of files that need to be rebuilt when the headers change.
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
/* This file is part of the dynarmic project.
|
|
* Copyright (c) 2018 MerryMage
|
|
* This software may be used and distributed according to the terms of the GNU
|
|
* General Public License version 2 or any later version.
|
|
*/
|
|
|
|
#include "frontend/A64/translate/impl/impl.h"
|
|
|
|
namespace Dynarmic::A64 {
|
|
namespace {
|
|
bool FPCompare(TranslatorVisitor& v, Imm<2> type, Vec Vm, Vec Vn, bool exc_on_qnan, bool cmp_with_zero) {
|
|
const auto datasize = FPGetDataSize(type);
|
|
if (!datasize || *datasize == 16) {
|
|
return v.UnallocatedEncoding();
|
|
}
|
|
|
|
const IR::U32U64 operand1 = v.V_scalar(*datasize, Vn);
|
|
IR::U32U64 operand2;
|
|
if (cmp_with_zero) {
|
|
operand2 = v.I(*datasize, 0);
|
|
} else {
|
|
operand2 = v.V_scalar(*datasize, Vm);
|
|
}
|
|
|
|
const auto nzcv = v.ir.FPCompare(operand1, operand2, exc_on_qnan, true);
|
|
v.ir.SetNZCV(nzcv);
|
|
return true;
|
|
}
|
|
} // Anonymous namespace
|
|
|
|
bool TranslatorVisitor::FCMP_float(Imm<2> type, Vec Vm, Vec Vn, bool cmp_with_zero) {
|
|
return FPCompare(*this, type, Vm, Vn, false, cmp_with_zero);
|
|
}
|
|
|
|
bool TranslatorVisitor::FCMPE_float(Imm<2> type, Vec Vm, Vec Vn, bool cmp_with_zero) {
|
|
return FPCompare(*this, type, Vm, Vn, true, cmp_with_zero);
|
|
}
|
|
|
|
} // namespace Dynarmic::A64
|