socsvn commit: r271371 - soc2014/op/freebsd-base/sys/x86/include
op at FreeBSD.org
op at FreeBSD.org
Fri Jul 25 15:22:36 UTC 2014
Author: op
Date: Fri Jul 25 15:22:35 2014
New Revision: 271371
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271371
Log:
KSP: added stringified version of NOPs, required by C inline assembly
Signed-off-by: Oliver Pinter <oliver.pntr at gmail.com>
git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch
Modified:
soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h
Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h
==============================================================================
--- soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Fri Jul 25 15:22:20 2014 (r271370)
+++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Fri Jul 25 15:22:35 2014 (r271371)
@@ -63,6 +63,30 @@
#define KSP_INSTR_NOP8 KSP_INSTR_INTEL_NOP8
#define KSP_INSTR_NOP9 KSP_INSTR_INTEL_NOP9
+/*
+ * stringified version needed by C sources, because __STRING and __XSTRING failed
+ */
+#define KSP_INSTR_INTEL_NOP1_C ".byte 0x90"
+#define KSP_INSTR_INTEL_NOP2_C ".byte 0x66,0x90"
+#define KSP_INSTR_INTEL_NOP3_C ".byte 0x0f,0x1f,0x00"
+#define KSP_INSTR_INTEL_NOP4_C ".byte 0x0f,0x1f,0x40,0x00"
+#define KSP_INSTR_INTEL_NOP5_C ".byte 0x0f,0x1f,0x44,0x00,0x00"
+#define KSP_INSTR_INTEL_NOP6_C ".byte 0x66,0x0f,0x1f,0x44,0x00,0x00"
+#define KSP_INSTR_INTEL_NOP7_C ".byte 0x0f,0x1f,0x80,0x00,0x00,0x00,0x00"
+#define KSP_INSTR_INTEL_NOP8_C ".byte 0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00"
+#define KSP_INSTR_INTEL_NOP9_C ".byte 0x66,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00"
+
+#define KSP_INSTR_NOP1_C KSP_INSTR_INTEL_NOP1_C
+#define KSP_INSTR_NOP2_C KSP_INSTR_INTEL_NOP2_C
+#define KSP_INSTR_NOP3_C KSP_INSTR_INTEL_NOP3_C
+#define KSP_INSTR_NOP4_C KSP_INSTR_INTEL_NOP4_C
+#define KSP_INSTR_NOP5_C KSP_INSTR_INTEL_NOP5_C
+#define KSP_INSTR_NOP6_C KSP_INSTR_INTEL_NOP6_C
+#define KSP_INSTR_NOP7_C KSP_INSTR_INTEL_NOP7_C
+#define KSP_INSTR_NOP8_C KSP_INSTR_INTEL_NOP8_C
+#define KSP_INSTR_NOP9_C KSP_INSTR_INTEL_NOP9_C
+
+
#define KSP_INSTR_XSAVE_XSAVEOPT(_ARG) \
0723: \
xsave ( _ARG ) ; \
More information about the svn-soc-all
mailing list