m5-exit.c revision 12886
1767SN/A#include <stdio.h> 21762SN/A 3767SN/A#ifdef M5 4767SN/A#include <gem5/m5ops.h> 5767SN/A 6767SN/A// If you need to define this, you should have removed the -DM5OP_ADDR 7767SN/A// when compiling the m5op_x86.o 8767SN/A//void *m5_mem = (void*)0xCAFEBABE; 9767SN/A#endif 10767SN/A 11767SN/Aint main() { 12767SN/A #ifdef M5 13767SN/A m5_exit(0); 14767SN/A #endif 15767SN/A printf("FAIL!\n"); 16767SN/A printf("Program should have exited due to the magic m5_exit" 17767SN/A " instruction!\n"); 18767SN/A return -1; 19767SN/A} 20767SN/A