tests: tcg: add basic tests for e2k
This commit is contained in:
parent
a7e726dcb4
commit
88e79dcda9
|
@ -69,6 +69,7 @@ fi
|
|||
: ${cross_cc_cflags_sparc64="-m64 -mcpu=ultrasparc"}
|
||||
: ${cross_cc_x86_64="x86_64-pc-linux-gnu-gcc"}
|
||||
: ${cross_cc_cflags_x86_64="-m64"}
|
||||
: ${cross_cc_e2k="e2k-linux-cc"}
|
||||
|
||||
for target in $target_list; do
|
||||
arch=${target%%-*}
|
||||
|
@ -94,7 +95,7 @@ for target in $target_list; do
|
|||
xtensa|xtensaeb)
|
||||
arches=xtensa
|
||||
;;
|
||||
alpha|cris|hppa|i386|lm32|microblaze|microblazeel|m68k|openrisc|riscv64|s390x|sh4|sparc64)
|
||||
alpha|cris|hppa|i386|lm32|microblaze|microblazeel|m68k|openrisc|riscv64|s390x|sh4|sparc64|e2k)
|
||||
arches=$target
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# -*- Mode: makefile -*-
|
||||
#
|
||||
# Elbrus 2000 tests
|
||||
|
||||
E2K_SRC=$(SRC_PATH)/tests/tcg/e2k
|
||||
VPATH+=$(E2K_SRC)
|
||||
|
||||
E2K_TESTS=hello-e2k
|
||||
TESTS+=$(E2K_TESTS)
|
||||
|
||||
#
|
||||
# hello-e2k is a barebones app
|
||||
#
|
||||
hello-e2k: CFLAGS+=-ffreestanding
|
||||
hello-e2k: LDFLAGS+=-nostdlib
|
|
@ -0,0 +1,9 @@
|
|||
#include <asm/e2k_api.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#define MSG "Hello, world!\n"
|
||||
|
||||
void _start(void) {
|
||||
__E2K_SYSCALL_3(LINUX_SYSCALL64_TRAPNUM, __NR_write, 1, MSG, sizeof(MSG));
|
||||
__E2K_SYSCALL_1(LINUX_SYSCALL64_TRAPNUM, __NR_exit, 0);
|
||||
}
|
Loading…
Reference in New Issue