mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-19 22:59:36 +00:00
microinstruction: Implement Inst::AreAllArgsImmediates
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
* General Public License version 2 or any later version.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "frontend/ir/microinstruction.h"
|
||||
|
||||
@@ -240,6 +242,10 @@ bool Inst::MayHaveSideEffects() const {
|
||||
IsCoprocessorInstruction();
|
||||
}
|
||||
|
||||
bool Inst::AreAllArgsImmediates() const {
|
||||
return std::all_of(args.begin(), args.begin() + NumArgs(), [](const auto& value){ return value.IsImmediate(); });
|
||||
}
|
||||
|
||||
void Inst::DecrementRemainingUses() {
|
||||
ASSERT_MSG(HasUses(), "Microinstruction doesn't have any remaining uses");
|
||||
use_count--;
|
||||
|
||||
Reference in New Issue
Block a user