aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat')
-rw-r--r--src/compat/compat-asm.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/compat/compat-asm.h b/src/compat/compat-asm.h
index c49f766..8ce3045 100644
--- a/src/compat/compat-asm.h
+++ b/src/compat/compat-asm.h
@@ -8,6 +8,7 @@
#include <linux/linkage.h>
#include <linux/kconfig.h>
+#include <linux/version.h>
/* PaX compatibility */
#if defined(RAP_PLUGIN)
@@ -15,4 +16,28 @@
#define ENTRY RAP_ENTRY
#endif
+#if defined(__LINUX_ARM_ARCH__) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
+ .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
+ .macro ret\c, reg
+#if __LINUX_ARM_ARCH__ < 6
+ mov\c pc, \reg
+#else
+ .ifeqs "\reg", "lr"
+ bx\c \reg
+ .else
+ mov\c pc, \reg
+ .endif
+#endif
+ .endm
+ .endr
+#endif
+
+#if defined(__LINUX_ARM_ARCH__) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
+#include <asm/assembler.h>
+#define lspush push
+#define lspull pull
+#undef push
+#undef pull
+#endif
+
#endif /* _WG_COMPATASM_H */