mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 20:14:27 +01:00
create userland tests
Fix some more tabs. Parse the "Simulated exit code not 0!" string in gem5 and exit with the proper status
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
#include <inttypes.h>
|
||||
|
||||
int main(void) {
|
||||
register uint64_t x0 __asm__ ("x0");
|
||||
__asm__ ("mrs x0, CurrentEL;" : : : "%x0");
|
||||
printf("%" PRIu64 "\n", x0 >> 2);
|
||||
return 0;
|
||||
register uint64_t x0 __asm__ ("x0");
|
||||
__asm__ ("mrs x0, CurrentEL;" : : : "%x0");
|
||||
printf("%" PRIu64 "\n", x0 >> 2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <inttypes.h>
|
||||
|
||||
int main(void) {
|
||||
register uint32_t r0 __asm__ ("r0");
|
||||
__asm__ ("mrs r0, CPSR" : : : "%r0");
|
||||
printf("%" PRIu32 "\n", r0 & 0x1F);
|
||||
return 0;
|
||||
register uint32_t r0 __asm__ ("r0");
|
||||
__asm__ ("mrs r0, CPSR" : : : "%r0");
|
||||
printf("%" PRIu32 "\n", r0 & 0x1F);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user