Ciro Santilli has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/27308 )
Change subject: tests: generic Makefile for user and baremetal test programs
......................................................................
tests: generic Makefile for user and baremetal test programs
This patch aims to provide a single unified Makefile for tests/test-progs.
This should make it easy to add either user or baremetal test programs
for any ISA.
Another major advantage is the ability to build every single test
program in one go, which makes it much more likely that we will notice
when they break on new compilers.
In this setup, a single source file can be used for both userland and
baremetal. Baremetal tests must be currently very basic however, since
there is no standard library support. However this already covers the
common use case of testing m5ops and ARM semihosting, e.g. m5_exit.c
runs on both userland and baremetal on ARM.
The initial test programs added are hello worlds to test the framework
itself, m5ops and arm semihosting SYS_EXIT.
Change-Id: Ia6ad9e6c53dd9f2eba726ec89ba066ddf5c01680
---
M .gitignore
A tests/test-progs/Makefile
A tests/test-progs/arm64/semihost_exit.S
A tests/test-progs/bootloader/arm64.S
A tests/test-progs/hello.c
A tests/test-progs/hello_cpp.cpp
A tests/test-progs/link.ld
A tests/test-progs/m5_checkpoint.c
A tests/test-progs/m5_exit.c
9 files changed, 455 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
index b851a23..811471e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,5 +28,6 @@
/system/arm/bootloader/arm64/boot.arm64
/system/arm/bootloader/arm64/boot_emm.arm64
/system/arm/bootloader/arm64/boot_v2.arm64
+/tests/test-progs/out
configs/example/memcheck.cfg
configs/dram/lowp_sweep.cfg
diff --git a/tests/test-progs/Makefile b/tests/test-progs/Makefile
new file mode 100644
index 0000000..42da2b1
--- /dev/null
+++ b/tests/test-progs/Makefile
@@ -0,0 +1,203 @@
+# Copyright (c) 2020 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder. You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+define HELP
+Build baremetal and userland C, C++ or assembly executables.
+
+Sample usages:
+
+Build all userland examples for the default ISA (x86):
+
+ make
+
+Only programs on the current directory and ISA named subdirectories e.g.
+x86, arm, arm64, riscv are build.
+
+The generated executables are placed under the directory out/
+
+Build all baremetal and userland examples for ARM:
+
+ make ISA=arm64 all
+
+Currently supported ISA values: x86, arm, arm64, riscv.
+
+Build only user or only baremetal:
+
+ make ISA=x86 user
+ make ISA=arm64 bare
+
+x86 currently only supports userland executables.
+endef
+export HELP
+
+# Input files for each build type. We whitelist barmetal ones,
+# and blacklist
+BARE_INS = \
+ m5_exit \
+ m5_checkpoint
+USER_INS = $(basename $(foreach BASE_DIR, . $(ISA), $(foreach IN_EXT, \
+ $(IN_EXT_ASM) $(IN_EXT_C) $(IN_EXT_CXX), $(wildcard
$(BASE_DIR)/*$(IN_EXT)))))
+
+# Input values.
+BOOTLOADER_SRC = bootloader/$(ISA)$(IN_EXT_ASM)
+BOOTLOADER_OBJ = $(OUT_DIR)/bootloader$(OBJ_EXT)
+CC = $(PREFIX)gcc
+CXX = $(PREFIX)g++
+M5OP_SRC = $(CURDIR)/../../util/m5/m5op_$(ISA)$(IN_EXT_ASM)
+M5OP_OBJ = $(OUT_DIR)/m5op$(OBJ_EXT)
+# Common to USER and BARE.
+CFLAGS = $(CCFLAGS) -std=c11
+# Common to C and C++.
+CCFLAGS = \
+ -I $(CURDIR)/../../include/ \
+ -O3 \
+ -Wall \
+ -Werror \
+ -Wextra \
+ -fno-pie \
+ -ggdb3 \
+ -no-pie \
+ -pedantic \
+ -static \
+ $(CCFLAGS_ISA)
+# -Wl,--whole-archive allows C++ threads to work with -static.
+#
https://stackoverflow.com/questions/35116327/when-g-static-link-pthread-cause-segmentation-fault-why
+LDFLAGS_USER = \
+ -lrt \
+ -pthread \
+ -Wl,--whole-archive \
+ -lpthread \
+ -Wl,--no-whole-archive
+CCFLAGS_BARE = $(CFLAGS) \
+ -T link.ld \
+ -Wl,--section-start=.text=0x80000000 \
+ -fno-asynchronous-unwind-tables \
+ -fno-unwind-tables \
+ -nostartfiles \
+ -nostdlib
+CFLAGS_USER = $(CFLAGS)
+CXXFLAGS = $(CCFLAGS) -std=c++11
+CXXFLAGS_BARE = $(CXXFLAGS)
+CXXFLAGS_USER = $(CXXFLAGS)
+IN_EXT_ASM = .S
+IN_EXT_C = .c
+IN_EXT_CXX = .cpp
+ISA=x86
+OUT_DIR_BASE = out
+OUT_DIR = $(OUT_DIR_BASE)/$(ISA)
+OUT_BARE_DIR = $(OUT_DIR)/bare
+OUT_USER_DIR = $(OUT_DIR)/user
+OBJ_EXT = .o
+OUT_EXT = .out
+
+ifeq ($(ISA),x86)
+CCFLAGS_ISA = -msse3
+PREFIX =
+else
+ifeq ($(ISA),arm64)
+CCFLAGS_ISA = -Xassembler -march=all
+# Input files just for this ISA.
+ISA_BARE_INS = semihost_exit
+# Exclude baremetal only builds.
+USER_INS := $(filter-out $(ISA)/semihost_exit, $(USER_INS))
+# Commented out for now because otherwise adds an
+# empty entry to the target list.
+#ISA_USER_INS =
+PREFIX = aarch64-linux-gnu-
+else
+ifeq ($(ISA),arm)
+PREFIX = arm-linux-gnueabihf-
+else
+ifeq ($(ISA),riscv)
+PREFIX = riscv64-linux-gnu-
+# riscv does not have an util/m5/m5op_
+M5OP_OBJ =
+USER_INS := $(filter-out ./m5_checkpoint ./m5_exit, $(USER_INS))
+endif
+endif
+endif
+endif
+
+# Calculated values.
+BARE_OUTS = $(addprefix $(OUT_BARE_DIR)/, $(addsuffix $(OUT_EXT),
$(BARE_INS) $(addprefix $(ISA)/,$(ISA_BARE_INS))))
+USER_OUTS = $(addprefix $(OUT_USER_DIR)/, $(addsuffix $(OUT_EXT),
$(USER_INS)))
+
+.PHONY: all bare clean help mkdir user
+
+user: mkdir-user $(USER_OUTS)
+
+bare: mkdir-bare $(BARE_OUTS)
+
+all: bare user
+
+user-show:
+ @echo $(USER_OUTS)
+
+$(OUT_BARE_DIR)/%$(OUT_EXT): %$(IN_EXT_ASM) $(M5OP_OBJ)
+ $(CC) $(CCFLAGS_BARE) -o '$@' $^
+
+$(OUT_USER_DIR)/%$(OUT_EXT): %$(IN_EXT_ASM) $(M5OP_OBJ)
+ $(CC) $(CFLAGS_USER) -o '$@' $^
+
+$(OUT_BARE_DIR)/%$(OUT_EXT): %$(IN_EXT_C) $(M5OP_OBJ) $(BOOTLOADER_OBJ)
+ $(CC) $(CCFLAGS_BARE) -o '$@' $^
+
+$(OUT_USER_DIR)/%$(OUT_EXT): %$(IN_EXT_C) $(M5OP_OBJ)
+ $(CC) $(CFLAGS_USER) -o '$@' $^ $(LDFLAGS_USER)
+
+$(OUT_BARE_DIR)/%$(OUT_EXT): %$(IN_EXT_CXX) $(M5OP_OBJ) $(BOOTLOADER_OBJ)
+ $(CXX) $(CXXFLAGS_BARE) -o '$@' $^
+
+$(OUT_USER_DIR)/%$(OUT_EXT): %$(IN_EXT_CXX) $(M5OP_OBJ)
+ $(CXX) $(CXXFLAGS_USER) -o '$@' $^ $(LDFLAGS_USER)
+
+$(BOOTLOADER_OBJ): $(BOOTLOADER_SRC)
+ $(CC) $(CFLAGS_USER) -c -o '$@' '$<'
+
+$(M5OP_OBJ): $(M5OP_SRC)
+ $(CC) $(CFLAGS_USER) -c -o '$@' '$<'
+
+clean:
+ rm -rf '$(OUT_DIR_BASE)'
+
+help:
+ @echo "$$HELP"
+
+mkdir-bare:
+ mkdir -p '$(OUT_BARE_DIR)/$(ISA)'
+
+mkdir-user:
+ mkdir -p '$(OUT_USER_DIR)/$(ISA)'
+
diff --git a/tests/test-progs/arm64/semihost_exit.S
b/tests/test-progs/arm64/semihost_exit.S
new file mode 100644
index 0000000..ace5b30
--- /dev/null
+++ b/tests/test-progs/arm64/semihost_exit.S
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2020 ARM Limited
+ * All rights reserved
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.global _start
+_start:
+ /* 0x20026 == ADP_Stopped_ApplicationExit */
+ mov x1, 0x26
+ movk x1, 0x2, lsl 16
+ ldr x2, =.Lsemihost_args
+ str x1, [x2, 0]
+
+ /* Exit status code. */
+ mov x0, 0
+ str x0, [x2, 8]
+
+ /* Address of parameter block. */
+ mov x1, x2
+
+ /* SYS_EXIT */
+ mov w0, 0x18
+
+ /* Make the semihosting call. */
+ hlt 0xf000
+.Lsemihost_args:
+ .skip 16
diff --git a/tests/test-progs/bootloader/arm64.S
b/tests/test-progs/bootloader/arm64.S
new file mode 100644
index 0000000..7cb4b6c
--- /dev/null
+++ b/tests/test-progs/bootloader/arm64.S
@@ -0,0 +1,6 @@
+.global _start
+_start:
+ ldr x0, =stack_top
+ mov sp, x0
+ mov x0, 0
+ bl main
diff --git a/tests/test-progs/hello.c b/tests/test-progs/hello.c
new file mode 100644
index 0000000..589b06e
--- /dev/null
+++ b/tests/test-progs/hello.c
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2020 ARM Limited
+ * All rights reserved
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdio.h>
+
+int main(void) {
+ puts("hello");
+}
diff --git a/tests/test-progs/hello_cpp.cpp b/tests/test-progs/hello_cpp.cpp
new file mode 100644
index 0000000..0cbf750
--- /dev/null
+++ b/tests/test-progs/hello_cpp.cpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2020 ARM Limited
+ * All rights reserved
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <iostream>
+
+int main() {
+ std::cout << "hello" << std::endl;
+}
diff --git a/tests/test-progs/link.ld b/tests/test-progs/link.ld
new file mode 100644
index 0000000..d3abb9e
--- /dev/null
+++ b/tests/test-progs/link.ld
@@ -0,0 +1,17 @@
+ENTRY(_start)
+SECTIONS
+{
+ .text : {
+ */bootloader.o(.text)
+ *(.text)
+ *(.rodata)
+ *(.data)
+ *(COMMON)
+ }
+ .bss : { *(.bss) }
+ heap_low = .;
+ . = . + 0x1000000;
+ heap_top = .;
+ . = . + 0x1000000;
+ stack_top = .;
+}
diff --git a/tests/test-progs/m5_checkpoint.c
b/tests/test-progs/m5_checkpoint.c
new file mode 100644
index 0000000..70bb6e7
--- /dev/null
+++ b/tests/test-progs/m5_checkpoint.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2020 ARM Limited
+ * All rights reserved
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <gem5/m5ops.h>
+
+int main(void) {
+ m5_checkpoint(0, 0);
+ m5_exit(0);
+}
diff --git a/tests/test-progs/m5_exit.c b/tests/test-progs/m5_exit.c
new file mode 100644
index 0000000..75932eb
--- /dev/null
+++ b/tests/test-progs/m5_exit.c
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2020 ARM Limited
+ * All rights reserved
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <gem5/m5ops.h>
+
+int main(void) {
+ m5_exit(0);
+}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27308
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ia6ad9e6c53dd9f2eba726ec89ba066ddf5c01680
Gerrit-Change-Number: 27308
Gerrit-PatchSet: 1
Gerrit-Owner: Ciro Santilli <ciro.santi...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev