From: Jon Medhurst Date: Tue, 26 Apr 2011 14:15:56 +0000 (+0100) Subject: ARM: kprobes: Infrastructure for table driven decoding of CPU instructions X-Git-Tag: v3.1-rc1~258^2^2~2^2~56 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d1a095aa1e6e2a233bfb1729e15233e77f69d54;p=pandora-kernel.git ARM: kprobes: Infrastructure for table driven decoding of CPU instructions The existing ARM instruction decoding functions are a mass of if/else code. Rather than follow this pattern for Thumb instruction decoding this patch implements an infrastructure for a new table driven scheme. This has several advantages: - Reduces the kernel size by approx 2kB. (The ARM instruction decoding will eventually have -3.1kB code, +1.3kB data; with similar or better estimated savings for Thumb decoding.) - Allows programmatic checking of decoding consistency and test case coverage. - Provides more uniform source code and is therefore, arguably, clearer. For a detailed explanation of how decoding tables work see the in-source documentation in kprobes.h, and also for kprobe_decode_insn(). Signed-off-by: Jon Medhurst Acked-by: Nicolas Pitre --- Reading git-diff-tree failed