mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-07 02:42:58 +00:00
ir: Add A64-specific opcodes for getting and setting raw NZCV values
This will be necessary to implement the flag manipulation and flag format instructions.
This commit is contained in:
@@ -29,6 +29,14 @@ IR::U1 IREmitter::GetCFlag() {
|
||||
return Inst<IR::U1>(Opcode::A64GetCFlag);
|
||||
}
|
||||
|
||||
IR::U32 IREmitter::GetNZCVRaw() {
|
||||
return Inst<IR::U32>(Opcode::A64GetNZCVRaw);
|
||||
}
|
||||
|
||||
void IREmitter::SetNZCVRaw(IR::U32 value) {
|
||||
Inst(Opcode::A64SetNZCVRaw, value);
|
||||
}
|
||||
|
||||
void IREmitter::SetNZCV(const IR::NZCV& nzcv) {
|
||||
Inst(Opcode::A64SetNZCV, nzcv);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ public:
|
||||
|
||||
void SetCheckBit(const IR::U1& value);
|
||||
IR::U1 GetCFlag();
|
||||
IR::U32 GetNZCVRaw();
|
||||
void SetNZCVRaw(IR::U32 value);
|
||||
void SetNZCV(const IR::NZCV& nzcv);
|
||||
void OrQC(const IR::U1& value);
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ bool Inst::ReadsFromCPSR() const {
|
||||
case Opcode::A32GetVFlag:
|
||||
case Opcode::A32GetGEFlags:
|
||||
case Opcode::A64GetCFlag:
|
||||
case Opcode::A64GetNZCVRaw:
|
||||
case Opcode::ConditionalSelect32:
|
||||
case Opcode::ConditionalSelect64:
|
||||
case Opcode::ConditionalSelectNZCV:
|
||||
@@ -146,6 +147,7 @@ bool Inst::WritesToCPSR() const {
|
||||
case Opcode::A32OrQFlag:
|
||||
case Opcode::A32SetGEFlags:
|
||||
case Opcode::A32SetGEFlagsCompressed:
|
||||
case Opcode::A64SetNZCVRaw:
|
||||
case Opcode::A64SetNZCV:
|
||||
return true;
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ A32OPC(SetFpscrNZCV, Void, NZCV
|
||||
// A64 Context getters/setters
|
||||
A64OPC(SetCheckBit, Void, U1 )
|
||||
A64OPC(GetCFlag, U1, )
|
||||
A64OPC(GetNZCVRaw, U32, )
|
||||
A64OPC(SetNZCVRaw, Void, U32 )
|
||||
A64OPC(SetNZCV, Void, NZCV )
|
||||
A64OPC(GetW, U32, A64Reg )
|
||||
A64OPC(GetX, U64, A64Reg )
|
||||
|
||||
Reference in New Issue
Block a user