A64: Match A32 page_table code

Here we increase the similarity between the A64 and A32 front-ends in terms of their
page_table handling code. In this commit, we:

* Reserve and use r14 as a register to store the page_table pointer.
* Align the code to be more similar in structure.
* Add a conf member to A32EmitContext.
* Remove scratch argument from EmitVAddrLookup.
This commit is contained in:
MerryMage 2020-06-18 11:27:12 +01:00
parent 08350d06f1
commit 13367a7efd
5 changed files with 128 additions and 85 deletions

View file

@ -33,8 +33,12 @@ static RunCodeCallbacks GenRunCodeCallbacks(A64::UserCallbacks* cb, CodePtr (*Lo
};
}
static std::function<void(BlockOfCode&)> GenRCP(const A64::UserConfig&) {
return [](BlockOfCode&){};
static std::function<void(BlockOfCode&)> GenRCP(const A64::UserConfig& conf) {
return [conf](BlockOfCode& code) {
if (conf.page_table) {
code.mov(code.r14, Common::BitCast<u64>(conf.page_table));
}
};
}
struct Jit::Impl final {