diff options
Diffstat (limited to 'arch/arm64/lib/insn.c')
-rw-r--r-- | arch/arm64/lib/insn.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm64/lib/insn.c b/arch/arm64/lib/insn.c index a635ab83fe..b008a9b46a 100644 --- a/arch/arm64/lib/insn.c +++ b/arch/arm64/lib/insn.c @@ -1515,3 +1515,14 @@ u32 aarch64_insn_gen_dmb(enum aarch64_insn_mb_type type) return insn; } + +u32 aarch64_insn_gen_mrs(enum aarch64_insn_register result, + enum aarch64_insn_system_register sysreg) +{ + u32 insn = aarch64_insn_get_mrs_value(); + + insn &= ~GENMASK(19, 0); + insn |= sysreg << 5; + return aarch64_insn_encode_register(AARCH64_INSN_REGTYPE_RT, + insn, result); +} |