|
5 | 5 | #include <stdlib.h>
|
6 | 6 |
|
7 | 7 | #define ENABLED 1
|
8 |
| -#if defined(__aarch64__) |
| 8 | +#if defined(__arm__) |
9 | 9 | static void m5_checkpoint()
|
10 | 10 | {
|
11 |
| - __asm__ __volatile__ ("mov x0, 0; mov x1, 0; .inst 0xff000110 | (0x43 << 16);"); |
| 11 | + __asm__ __volatile__ ("mov r0, #0; mov r1, #0; .inst 0xEE000110 | (0x43 << 16);"); |
12 | 12 | };
|
13 | 13 | static void m5_dump_stats()
|
14 | 14 | {
|
15 |
| - __asm__ __volatile__ ("mov x0, 0; mov x1, 0; .inst 0xff000110 | (0x41 << 16);"); |
| 15 | + __asm__ __volatile__ ("mov r0, #0; mov r1, #0; .inst 0xEE000110 | (0x41 << 16);"); |
16 | 16 | };
|
17 | 17 | static void m5_exit()
|
18 | 18 | {
|
19 |
| - __asm__ __volatile__ ("mov x0, 0; .inst 0xff000110 | (0x21 << 16);"); |
| 19 | + __asm__ __volatile__ ("mov r0, #0; .inst 0xEE000110 | (0x21 << 16);"); |
20 | 20 | };
|
21 | 21 | static void m5_reset_stats()
|
22 | 22 | {
|
23 |
| - __asm__ __volatile__ ("mov x0, 0; mov x1, 0; .inst 0xff000110 | (0x40 << 16);"); |
| 23 | + __asm__ __volatile__ ("mov r0, #0; mov r1, #0; .inst 0xEE000110 | (0x40 << 16);"); |
| 24 | +}; |
| 25 | +#elif defined(__aarch64__) |
| 26 | +static void m5_checkpoint() |
| 27 | +{ |
| 28 | + __asm__ __volatile__ ("mov x0, #0; mov x1, #0; .inst 0xFF000110 | (0x43 << 16);"); |
| 29 | +}; |
| 30 | +static void m5_dump_stats() |
| 31 | +{ |
| 32 | + __asm__ __volatile__ ("mov x0, #0; mov x1, #0; .inst 0xFF000110 | (0x41 << 16);"); |
| 33 | +}; |
| 34 | +static void m5_exit() |
| 35 | +{ |
| 36 | + __asm__ __volatile__ ("mov x0, #0; .inst 0XFF000110 | (0x21 << 16);"); |
| 37 | +}; |
| 38 | +static void m5_reset_stats() |
| 39 | +{ |
| 40 | + __asm__ __volatile__ ("mov x0, #0; mov x1, #0; .inst 0XFF000110 | (0x40 << 16);"); |
24 | 41 | };
|
25 | 42 | #else
|
26 | 43 | #undef ENABLED
|
|
35 | 52 | #endif
|
36 | 53 | )
|
37 | 54 | {
|
38 |
| -#if defined(__aarch64__) |
| 55 | +#if ENABLED |
39 | 56 | char action;
|
40 | 57 | if (argc > 1) {
|
41 | 58 | action = argv[1][0];
|
|
0 commit comments