userland: add ported to all archs

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-05 00:00:00 +00:00
parent 3388d72bb2
commit 42f8de774a
3 changed files with 16 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly */
#include "common.h"
ENTRY
mov $1, %rax
add $2, %rax
ASSERT_EQ(%rax, $3)
EXIT

View File

@@ -9,9 +9,9 @@
mov reg, %rax; \
mov const, %rbx; \
cmp %rax, %rbx; \
ASSERT(je); \
pop %rbx; \
pop %rax; \
ASSERT(je); \
;
# TODO