A64: Move SDIV and UDIV out of data_processing_multiply.cpp
This commit is contained in:
parent
35a29a9665
commit
4e33629b0e
2 changed files with 24 additions and 24 deletions
|
@ -98,28 +98,4 @@ bool TranslatorVisitor::UMULH(Reg Rm, Reg Rn, Reg Rd) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::UDIV(bool sf, Reg Rm, Reg Rn, Reg Rd) {
|
||||
const size_t datasize = sf ? 64 : 32;
|
||||
|
||||
const IR::U32U64 m = X(datasize, Rm);
|
||||
const IR::U32U64 n = X(datasize, Rn);
|
||||
|
||||
const IR::U32U64 result = ir.UnsignedDiv(n,m);
|
||||
|
||||
X(datasize, Rd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::SDIV(bool sf, Reg Rm, Reg Rn, Reg Rd) {
|
||||
const size_t datasize = sf ? 64 : 32;
|
||||
|
||||
const IR::U32U64 m = X(datasize, Rm);
|
||||
const IR::U32U64 n = X(datasize, Rn);
|
||||
|
||||
const IR::U32U64 result = ir.SignedDiv(n,m);
|
||||
|
||||
X(datasize, Rd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Dynarmic::A64
|
||||
|
|
|
@ -112,4 +112,28 @@ bool TranslatorVisitor::REV16_int(bool sf, Reg Rn, Reg Rd) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::UDIV(bool sf, Reg Rm, Reg Rn, Reg Rd) {
|
||||
const size_t datasize = sf ? 64 : 32;
|
||||
|
||||
const IR::U32U64 m = X(datasize, Rm);
|
||||
const IR::U32U64 n = X(datasize, Rn);
|
||||
|
||||
const IR::U32U64 result = ir.UnsignedDiv(n,m);
|
||||
|
||||
X(datasize, Rd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::SDIV(bool sf, Reg Rm, Reg Rn, Reg Rd) {
|
||||
const size_t datasize = sf ? 64 : 32;
|
||||
|
||||
const IR::U32U64 m = X(datasize, Rm);
|
||||
const IR::U32U64 n = X(datasize, Rn);
|
||||
|
||||
const IR::U32U64 result = ir.SignedDiv(n,m);
|
||||
|
||||
X(datasize, Rd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Dynarmic::A64
|
||||
|
|
Loading…
Reference in a new issue