mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-03 05:04:41 +01:00
translate: Deduplicate GetDataSize() functions
Avoids defining the same function multiple times in different files.
This commit is contained in:
parent
f83cd2da9a
commit
5ebf496d4e
9 changed files with 54 additions and 140 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue