diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2015-03-27 16:09:21 +0300 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-03-30 13:03:42 +0300 |
commit | 0978fb25f86b7595821cee6955679250d47c6438 (patch) | |
tree | 3f4bafcc51a1df7f4adac354bd8956f77bd66e58 /arch/arm64/include/asm/insn.h | |
parent | 849176c96dab827548176e851525bd1c3fff5a6a (diff) | |
download | linux-0978fb25f86b7595821cee6955679250d47c6438.tar.xz |
arm64: insn: Add aarch64_insn_decode_immediate
Patching an instruction sometimes requires extracting the immediate
field from this instruction. To facilitate this, and avoid
potential duplication of code, add aarch64_insn_decode_immediate
as the reciprocal to aarch64_insn_encode_immediate.
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/insn.h')
-rw-r--r-- | arch/arm64/include/asm/insn.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/insn.h b/arch/arm64/include/asm/insn.h index d2f49423c5dc..f81b328d9cf4 100644 --- a/arch/arm64/include/asm/insn.h +++ b/arch/arm64/include/asm/insn.h @@ -285,6 +285,7 @@ bool aarch64_insn_is_nop(u32 insn); int aarch64_insn_read(void *addr, u32 *insnp); int aarch64_insn_write(void *addr, u32 insn); enum aarch64_insn_encoding_class aarch64_get_insn_class(u32 insn); +u64 aarch64_insn_decode_immediate(enum aarch64_insn_imm_type type, u32 insn); u32 aarch64_insn_encode_immediate(enum aarch64_insn_imm_type type, u32 insn, u64 imm); u32 aarch64_insn_gen_branch_imm(unsigned long pc, unsigned long addr, |