Thread (36 messages) 36 messages, 4 authors, 2020-03-03

Re: [PATCH v3 11/14] powerpc/kprobes: Support kprobes on prefixed instructions

flat view

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2020-02-28 01:58:57

Nicholas Piggin's on February 28, 2020 11:47 am:
Jordan Niethe's on February 27, 2020 10:58 am:
quoted
On Wed, Feb 26, 2020 at 6:18 PM Nicholas Piggin [off-list ref] wrote:
+
+#define DEREF_PPC_INST_PTR(ptr)                \
+({                            \
+    ppc_inst __inst;                \
+    __inst.w = *(unsigned int *)(ptr);        \
+    if (PPC_INST_IS_PREFIXED(__inst))        \
+        __inst.p = *(ppc_prefixed_inst *)(ptr);    \
+    __inst;                        \
+})
I'd go an inline with shorter lowercase names. ppc_inst_read(&inst);
Probably inst = ppc_inst_read(mem), rather.

Thanks,
Nick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help