mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 12:04:27 +01:00
fight with right registers
This commit is contained in:
Submodule buildroot updated: bc60382b8f...f3d114a1ef
@@ -4,22 +4,22 @@
|
|||||||
|
|
||||||
#define ENABLED 1
|
#define ENABLED 1
|
||||||
#if defined(__aarch64__)
|
#if defined(__aarch64__)
|
||||||
static void m5_checkpoint(uint64_t x, uint64_t y)
|
/*static void m5_checkpoint(uint64_t x, uint64_t y)*/
|
||||||
{
|
/*{*/
|
||||||
__asm__ __volatile__ (".inst 0xff430110;":: "x0" (x), "x1" (y));
|
/*__asm__ __volatile__ ("mov x0, %0; mov x1, %1; .inst 0xff430110;":: "m" (x), "m" (y));*/
|
||||||
};
|
/*};*/
|
||||||
static void m5_dump_stats(uint64_t x, uint64_t y)
|
/*static void m5_dump_stats(uint64_t x, uint64_t y)*/
|
||||||
{
|
/*{*/
|
||||||
__asm__ __volatile__ (".inst 0xff410110;":: "x0" (x), "x1" (y));
|
/*__asm__ __volatile__ ("mov %0, x0; mov %1, x1; .inst 0xff410110;":: "m" (x), "m" (y));*/
|
||||||
};
|
/*};*/
|
||||||
static void m5_exit(uint64_t x)
|
static void m5_exit(uint64_t x)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ (".inst 0xff210110;":: "x0" (x));
|
__asm__ __volatile__ ("mov x0, %0; .inst 0xff210110;":: "m" (x));
|
||||||
};
|
|
||||||
static void m5_reset_stats(uint64_t x, uint64_t y)
|
|
||||||
{
|
|
||||||
__asm__ __volatile__ (".inst 0xff400110;":: "x0" (x), "x1" (y));
|
|
||||||
};
|
};
|
||||||
|
/*static void m5_reset_stats(uint64_t x, uint64_t y)*/
|
||||||
|
/*{*/
|
||||||
|
/*__asm__ __volatile__ ("mov %0, x0; mov %1, x1; .inst 0xff400110;":: "m" (x), "m" (y));*/
|
||||||
|
/*};*/
|
||||||
#else
|
#else
|
||||||
#undef ENABLED
|
#undef ENABLED
|
||||||
#define ENABLED 0
|
#define ENABLED 0
|
||||||
@@ -42,18 +42,18 @@ void
|
|||||||
}
|
}
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case 'c':
|
/*case 'c':*/
|
||||||
m5_checkpoint(0, 0);
|
/*m5_checkpoint(0, 0);*/
|
||||||
break;
|
/*break;*/
|
||||||
case 'd':
|
/*case 'd':*/
|
||||||
m5_dump_stats(0, 0);
|
/*m5_dump_stats(0, 0);*/
|
||||||
break;
|
/*break;*/
|
||||||
case 'e':
|
case 'e':
|
||||||
m5_exit(0);
|
m5_exit(0);
|
||||||
break;
|
break;
|
||||||
case 'r':
|
/*case 'r':*/
|
||||||
m5_reset_stats(0, 0);
|
/*m5_reset_stats(0, 0);*/
|
||||||
break;
|
/*break;*/
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|||||||
Reference in New Issue
Block a user