Thread (36 messages) 36 messages, 4 authors, 2016-06-27

[PATCH v13 02/10] arm64: Add more test functions to insn.c

From: mhiramat@kernel.org (Masami Hiramatsu)
Date: 2016-06-08 01:14:11
Also in: lkml

On Thu,  2 Jun 2016 23:26:16 -0400
David Long [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -367,6 +402,7 @@ bool aarch32_insn_is_wide(u32 insn);
 #define A32_RT_OFFSET	12
 #define A32_RT2_OFFSET	 0
 
+u32 aarch64_extract_system_register(u32 insn);
This exported symbol is incorrect (see below)
quoted hunk ↗ jump to hunk
 u32 aarch32_insn_extract_reg_num(u32 insn, int offset);
 u32 aarch32_insn_mcr_extract_opc2(u32 insn);
 u32 aarch32_insn_mcr_extract_crm(u32 insn);
diff --git a/arch/arm64/kernel/insn.c b/arch/arm64/kernel/insn.c
index 368c082..28c6110f 100644
--- a/arch/arm64/kernel/insn.c
+++ b/arch/arm64/kernel/insn.c
[..]
quoted hunk ↗ jump to hunk
@@ -1175,6 +1201,14 @@ u32 aarch64_set_branch_offset(u32 insn, s32 offset)
 	BUG();
 }
 
+/*
+ * Extract the Op/CR data from a msr/mrs instruction.
+ */
+u32 aarch64_insn_extract_system_reg(u32 insn)
+{
+	return (insn & 0x1FFFE0) >> 5;
+}
+
aarch64_insn_extract_system_reg() is the right name :)

Thank you,

 bool aarch32_insn_is_wide(u32 insn)
 {
 	return insn >= 0xe800;
-- 
2.5.0

-- 
Masami Hiramatsu [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help