summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VideoBackendBase.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2021-07-13 19:09:35 +0200
committerJosJuice <josjuice@gmail.com>2021-07-21 16:28:19 +0200
commit302b47f5e63443166d8edc50a5df76252b2dcfaf (patch)
tree1843c1fb95c7372b26a53f5326a418ab8c926499 /Source/Core/VideoCommon/VideoBackendBase.cpp
parentd1beb9ef7018c71a2336c62fa31bfe554083a3e7 (diff)
JitArm64: Add temp reg parameter to Arm64RegCache::Flush
We currently have a bug when calling Arm64GPRCache::Flush with FlushMode::MaintainState, zero free host registers, and at least one guest register containing an immediate. We end up grabbing a temporary register from the register cache in order to be able to write the immediate to memory, but grabbing a temporary register when there are zero free registers causes the least recently used register to be flushed in a way which does not maintain the state of the register cache. To get around this, require callers to pass in a temporary register in the GPR MaintainState case. In other cases, passing in a temporary register is not required but can help avoid spilling a register (if the caller already had a temporary register at hand anyway, which in particular will be the case in my upcoming memcheck pull request).
Diffstat (limited to 'Source/Core/VideoCommon/VideoBackendBase.cpp')
0 files changed, 0 insertions, 0 deletions