mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-09 14:56:28 +00:00
translate: Deduplicate GetDataSize() functions
Avoids defining the same function multiple times in different files.
This commit is contained in:
@@ -10,22 +10,9 @@
|
||||
|
||||
namespace Dynarmic::A64 {
|
||||
namespace {
|
||||
boost::optional<size_t> GetDataSize(Imm<2> type) {
|
||||
switch (type.ZeroExtend()) {
|
||||
case 0b00:
|
||||
return 32;
|
||||
case 0b01:
|
||||
return 64;
|
||||
case 0b11:
|
||||
// FP16Ext, unimplemented.
|
||||
return boost::none;
|
||||
}
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
bool FPCompare(TranslatorVisitor& v, Imm<2> type, Vec Vm, Vec Vn, bool exc_on_qnan, bool cmp_with_zero) {
|
||||
const auto datasize = GetDataSize(type);
|
||||
if (!datasize) {
|
||||
const auto datasize = FPGetDataSize(type);
|
||||
if (!datasize || *datasize == 16) {
|
||||
return v.UnallocatedEncoding();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user