mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-19 06:49:38 +00:00
translate: Deduplicate GetDataSize() functions
Avoids defining the same function multiple times in different files.
This commit is contained in:
@@ -10,20 +10,8 @@
|
||||
|
||||
namespace Dynarmic::A64 {
|
||||
|
||||
static boost::optional<size_t> GetDataSize(Imm<2> type) {
|
||||
switch (type.ZeroExtend()) {
|
||||
case 0b00:
|
||||
return 32;
|
||||
case 0b01:
|
||||
return 64;
|
||||
case 0b11:
|
||||
return 16;
|
||||
}
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::FCSEL_float(Imm<2> type, Vec Vm, Cond cond, Vec Vn, Vec Vd) {
|
||||
const auto datasize = GetDataSize(type);
|
||||
const auto datasize = FPGetDataSize(type);
|
||||
if (!datasize || *datasize == 16) {
|
||||
return UnallocatedEncoding();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user