mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-03 21:24:38 +01:00
Exclusive Monitor: Rework exclusive monitor interface.
This commit is contained in:
parent
b5d8b24a3c
commit
97b9d3e058
15 changed files with 278 additions and 151 deletions
|
|
@ -99,6 +99,20 @@ bool Inst::IsSharedMemoryReadOrWrite() const {
|
|||
return IsSharedMemoryRead() || IsSharedMemoryWrite();
|
||||
}
|
||||
|
||||
bool Inst::IsExclusiveMemoryRead() const {
|
||||
switch (op) {
|
||||
case Opcode::A64ExclusiveReadMemory8:
|
||||
case Opcode::A64ExclusiveReadMemory16:
|
||||
case Opcode::A64ExclusiveReadMemory32:
|
||||
case Opcode::A64ExclusiveReadMemory64:
|
||||
case Opcode::A64ExclusiveReadMemory128:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool Inst::IsExclusiveMemoryWrite() const {
|
||||
switch (op) {
|
||||
case Opcode::A32ExclusiveWriteMemory8:
|
||||
|
|
@ -118,7 +132,7 @@ bool Inst::IsExclusiveMemoryWrite() const {
|
|||
}
|
||||
|
||||
bool Inst::IsMemoryRead() const {
|
||||
return IsSharedMemoryRead();
|
||||
return IsSharedMemoryRead() || IsExclusiveMemoryRead();
|
||||
}
|
||||
|
||||
bool Inst::IsMemoryWrite() const {
|
||||
|
|
@ -457,7 +471,7 @@ bool Inst::AltersExclusiveState() const {
|
|||
return op == Opcode::A32ClearExclusive ||
|
||||
op == Opcode::A32SetExclusive ||
|
||||
op == Opcode::A64ClearExclusive ||
|
||||
op == Opcode::A64SetExclusive ||
|
||||
IsExclusiveMemoryRead() ||
|
||||
IsExclusiveMemoryWrite();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue