userland: support arch specific examples

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-11-20 00:00:00 +00:00
parent 454af5d03a
commit 07000300ab
12 changed files with 78 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
#include <stdio.h>
#include <inttypes.h>
int main(void) {
register uint64_t x0 __asm__ ("x0");
__asm__ ("mrs x0, CurrentEL;" : : : "%x0");
printf("%" PRIu64 "\n", x0);
return 0;
}