gem5: add m5 fail 1 to /m5op.out

Document that m5 fail is not actually exiting status 1 on fs.py.
This commit is contained in:
Ciro Santilli
2018-08-24 10:48:02 +01:00
parent 6fadc5ec93
commit 6d51da52bb
2 changed files with 63 additions and 16 deletions

View File

@@ -6,36 +6,44 @@
#define ENABLED 1
#if defined(__arm__)
static void m5_checkpoint()
static void m5_checkpoint(void)
{
__asm__ __volatile__ ("mov r0, #0; mov r1, #0; .inst 0xEE000110 | (0x43 << 16);");
__asm__ __volatile__ ("mov r0, #0; mov r1, #0; mov r2, #0; mov r3, #0; .inst 0xEE000110 | (0x43 << 16);");
};
static void m5_dump_stats()
static void m5_dump_stats(void)
{
__asm__ __volatile__ ("mov r0, #0; mov r1, #0; .inst 0xEE000110 | (0x41 << 16);");
__asm__ __volatile__ ("mov r0, #0; mov r1, #0; mov r2, #0; mov r3, #0; .inst 0xEE000110 | (0x41 << 16);");
};
static void m5_exit()
{
__asm__ __volatile__ ("mov r0, #0; .inst 0xEE000110 | (0x21 << 16);");
};
static void m5_reset_stats()
static void m5_fail_1(void)
{
__asm__ __volatile__ ("mov r0, #0; mov r1, #0; .inst 0xEE000110 | (0x40 << 16);");
__asm__ __volatile__ ("mov r0, #0; mov r1, #0; mov r2, #1; mov r3, #0; .inst 0xEE000110 | (0x22 << 16);");
};
static void m5_reset_stats(void)
{
__asm__ __volatile__ ("mov r0, #0; mov r1, #0; mov r2, #0; mov r3, #0; .inst 0xEE000110 | (0x40 << 16);");
};
#elif defined(__aarch64__)
static void m5_checkpoint()
static void m5_checkpoint(void)
{
__asm__ __volatile__ ("mov x0, #0; mov x1, #0; .inst 0xFF000110 | (0x43 << 16);");
};
static void m5_dump_stats()
static void m5_dump_stats(void)
{
__asm__ __volatile__ ("mov x0, #0; mov x1, #0; .inst 0xFF000110 | (0x41 << 16);");
};
static void m5_exit()
static void m5_exit(void)
{
__asm__ __volatile__ ("mov x0, #0; .inst 0XFF000110 | (0x21 << 16);");
};
static void m5_reset_stats()
static void m5_fail_1(void)
{
__asm__ __volatile__ ("mov x0, #0; mov x1, #1; .inst 0xFF000110 | (0x22 << 16);");
};
static void m5_reset_stats(void)
{
__asm__ __volatile__ ("mov x0, #0; mov x1, #0; .inst 0XFF000110 | (0x40 << 16);");
};
@@ -62,14 +70,17 @@ void
switch (action)
{
case 'c':
m5_checkpoint(0, 0);
m5_checkpoint();
break;
case 'd':
m5_dump_stats(0, 0);
m5_dump_stats();
break;
case 'e':
m5_exit();
break;
case 'f':
m5_fail_1();
break;
case 'r':
m5_reset_stats();
break;