mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 11:11:35 +01:00
12 lines
271 B
C
12 lines
271 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;
|
|
}
|