userland: freestanding gem5 checkpoint restore examples

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2020-02-20 00:00:01 +00:00
parent 9015fd7042
commit 8447a9a8a7
6 changed files with 88 additions and 15 deletions

View File

@@ -0,0 +1,11 @@
/* https://cirosantilli.com/linux-kernel-module-cheat#gem5-checkpoint-userland-minimal-example */
#define LKMC_M5OPS_ENABLE 1
#include "lkmc/m5ops.h"
.text
.global _start
_start:
asm_main_after_prologue:
LKMC_M5OPS_CHECKPOINT_ASM
LKMC_M5OPS_EXIT_ASM

View File

@@ -0,0 +1,10 @@
/* https://cirosantilli.com/linux-kernel-module-cheat#benchmark-emulators-on-userland-executables */
#define LKMC_M5OPS_ENABLE 1
#include "lkmc/m5ops.h"
.text
.global _start
_start:
asm_main_after_prologue:
LKMC_M5OPS_EXIT_ASM