riscv: Use automapping for special cases too.

This commit is contained in:
Unknown W. Brackets committed 2023-08-20 12:42:11 -07:00
1 parent a190793ad2
commit 6a75e6712e
8 files changed
+45 -117

No files matched your search

+8
View File
@@ -643,6 +643,14 @@ void IRNativeRegCacheBase::Map(const IRInst &inst) {
CleanupMapping(mapping, 3);
}
void IRNativeRegCacheBase::MapWithExtra(const IRInst &inst, std::vector<Mapping> extra) {
extra.resize(extra.size() + 3);
MappingFromInst(inst, &extra[extra.size() - 3]);
ApplyMapping(extra.data(), (int)extra.size());
CleanupMapping(extra.data(), (int)extra.size());
}
IRNativeReg IRNativeRegCacheBase::MapWithTemp(const IRInst &inst, MIPSLoc type) {
Mapping mapping[3];
MappingFromInst(inst, mapping);