Cross Reference: m5-exit.c
xref: /gem5/tests/test-progs/m5-exit/src/m5-exit.c
  • Home
  • History
  • AnnotateAnnotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /gem5/tests/test-progs/m5-exit/src/
m5-exit.c revision 12886
112886Sspwilson2@wisc.edu#include <stdio.h>
212886Sspwilson2@wisc.edu
312886Sspwilson2@wisc.edu#ifdef M5
412886Sspwilson2@wisc.edu#include <gem5/m5ops.h>
512886Sspwilson2@wisc.edu
612886Sspwilson2@wisc.edu// If you need to define this, you should have removed the -DM5OP_ADDR
712886Sspwilson2@wisc.edu// when compiling the m5op_x86.o
812886Sspwilson2@wisc.edu//void *m5_mem = (void*)0xCAFEBABE;
912886Sspwilson2@wisc.edu#endif
1012886Sspwilson2@wisc.edu
1112886Sspwilson2@wisc.eduint main() {
1212886Sspwilson2@wisc.edu    #ifdef M5
1312886Sspwilson2@wisc.edu    m5_exit(0);
1412886Sspwilson2@wisc.edu    #endif
1512886Sspwilson2@wisc.edu    printf("FAIL!\n");
1612886Sspwilson2@wisc.edu    printf("Program should have exited due to the magic m5_exit"
1712886Sspwilson2@wisc.edu           " instruction!\n");
1812886Sspwilson2@wisc.edu    return -1;
1912886Sspwilson2@wisc.edu}
20

Indexes created Thu Sep 26 06:36:22 EDT 2019