mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
12 lines
270 B
C
12 lines
270 B
C
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-exception-levels */
|
|
|
|
#include <stdio.h>
|
|
#include <inttypes.h>
|
|
|
|
int main(void) {
|
|
uint32_t cpsr;
|
|
__asm__ ("mrs %0, CPSR" : "=r" (cpsr) : :);
|
|
printf("%" PRIu32 "\n", cpsr & 0x1F);
|
|
return 0;
|
|
}
|