Files
linux-kernel-module-cheat/baremetal/arch/arm/el.c
Ciro Santilli 六四事件 法轮功 f2e73bac83 create userland tests
Fix some more tabs.

Parse the "Simulated exit code not 0!" string in gem5 and exit with the proper status
2019-01-22 00:00:00 +00:00

12 lines
283 B
C

/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-exception-level */
#include <stdio.h>
#include <inttypes.h>
int main(void) {
register uint32_t r0 __asm__ ("r0");
__asm__ ("mrs r0, CPSR" : : : "%r0");
printf("%" PRIu32 "\n", r0 & 0x1F);
return 0;
}