aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-04-24 11:49:57 -0700
committerRichard Henderson <richard.henderson@linaro.org>2024-04-24 11:49:57 -0700
commit85b597413d4370cb168f711192eaef2eb70535ac (patch)
tree053a71341133d6a6b1bec52db369a565994400a6 /tests
parentbffc14efd9219bc11fed568f1dbd70f03be3103a (diff)
parent2d9cbbea64e67d90c3c22d7e2d5ab530d830eb33 (diff)
Merge tag 'housekeeping-20240424' of https://github.com/philmd/qemu into staging
Removal of deprecated code - Remove the Nios II target and hardware - Remove pvrdma device and rdmacm-mux helper - Remove GlusterFS RDMA protocol handling - Update Sriram Yagnaraman mail address # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmYpE0YACgkQ4+MsLN6t # wN5PIA//egomANjRHAUAf9tdjljgT/JR49ejM7iInyxspR/xaiq0TlP2kP6aDNps # y1HAWBwfj5lGxeMgQ1mSKJGka3v2AIPWb7RbNT+9AaiWHv+sx5OrEytozUsFHLo8 # gSgRQocq0NY2a9dPbtkDqfbmq/rkCC7wgZzwroHsyOdiqYsWDKPJFleBDMjGmEaf # colhiDmhUPgvE3NNpwfEVNh/2SzxUxY8k5FHal6qij5z56ZqBglgnziDZEvGVCZ1 # uF4Hca/kh7TV2MVsdStPbGWZYDhJ/Np/2FnRoThD1Hc4qq8d/SH997m2F94tSOud # YeH54Vp5lmCeYgba5y8VP0ZPx/b9XnTtLvKggNdoqB+T2LBWPRt8kehqoaxvammF # ALzbY/t2vUxL6nIVbosOaTyqVOXvynk3/Js5S0jbnlu+vP2WvvFEzfYKIs2DIA8w # z56o/rG4KfyxF0aDB+CvLNwtJS8THqeivPqmYoKTdN9FPpN2RyBNLITrKo389ygF # 3oWy3+xsKGIPdNFY0a4l25xntqWNhND89ejzyL9M6G1cQ9RdEmTIUGTrinPQQmfP # oHIJMBeTdj7EqPL4LB3BR/htw9U5PobeMNYKFsRkS39PjGDqba5wbIdk3w5/Rcxa # s/PKdspDKWPwZ5jhcLD0qxAGJFnqM2UFjPo+U8qyI3RXKXFAn0E= # =c8Aj # -----END PGP SIGNATURE----- # gpg: Signature made Wed 24 Apr 2024 07:12:22 AM PDT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] * tag 'housekeeping-20240424' of https://github.com/philmd/qemu: block/gluster: Remove deprecated RDMA protocol handling hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helper hw/timer: Remove the ALTERA_TIMER model target/nios2: Remove the deprecated Nios II target MAINTAINERS: Update Sriram Yagnaraman mail address Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/avocado/boot_linux_console.py8
-rw-r--r--tests/avocado/replay_kernel.py11
-rw-r--r--tests/docker/Makefile.include5
-rwxr-xr-xtests/docker/dockerfiles/debian-nios2-cross.d/build-toolchain.sh87
-rw-r--r--tests/qtest/machine-none-test.c1
-rw-r--r--tests/tcg/nios2/10m50-ghrd.ld70
-rw-r--r--tests/tcg/nios2/Makefile.softmmu-target32
-rw-r--r--tests/tcg/nios2/Makefile.target11
-rw-r--r--tests/tcg/nios2/boot.S218
-rw-r--r--tests/tcg/nios2/intr.S31
-rw-r--r--tests/tcg/nios2/semicall.h28
-rw-r--r--tests/tcg/nios2/test-shadow-1.S40
12 files changed, 0 insertions, 542 deletions
diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
index 989b65111c..180ac17326 100644
--- a/tests/avocado/boot_linux_console.py
+++ b/tests/avocado/boot_linux_console.py
@@ -1426,14 +1426,6 @@ class BootLinuxConsole(LinuxKernelTest):
tar_hash = '20334cdaf386108c530ff0badaecc955693027dd'
self.do_test_advcal_2018('20', tar_hash, 'vmlinux')
- def test_nios2_10m50(self):
- """
- :avocado: tags=arch:nios2
- :avocado: tags=machine:10m50-ghrd
- """
- tar_hash = 'e4251141726c412ac0407c5a6bceefbbff018918'
- self.do_test_advcal_2018('14', tar_hash, 'vmlinux.elf')
-
def test_ppc64_e500(self):
"""
:avocado: tags=arch:ppc64
diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
index 10d99403a4..2c81412dba 100644
--- a/tests/avocado/replay_kernel.py
+++ b/tests/avocado/replay_kernel.py
@@ -382,17 +382,6 @@ class ReplayKernelNormal(ReplayKernelBase):
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
self.do_test_advcal_2018(file_path, 'vmlinux')
- def test_nios2_10m50(self):
- """
- :avocado: tags=arch:nios2
- :avocado: tags=machine:10m50-ghrd
- """
- tar_hash = 'e4251141726c412ac0407c5a6bceefbbff018918'
- tar_url = ('https://qemu-advcal.gitlab.io'
- '/qac-best-of-multiarch/download/day14.tar.xz')
- file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
- self.do_test_advcal_2018(file_path, 'vmlinux.elf')
-
def test_ppc_g3beige(self):
"""
:avocado: tags=arch:ppc
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 5ba5b50ab9..8df50a0ca0 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -114,13 +114,8 @@ docker-image-debian-microblaze-cross: $(DOCKER_FILES_DIR)/debian-toolchain.docke
$(DOCKER_FILES_DIR)/debian-microblaze-cross.d/build-toolchain.sh
$(call debian-toolchain, $@)
-docker-image-debian-nios2-cross: $(DOCKER_FILES_DIR)/debian-toolchain.docker \
- $(DOCKER_FILES_DIR)/debian-nios2-cross.d/build-toolchain.sh
- $(call debian-toolchain, $@)
-
# These images may be good enough for building tests but not for test builds
DOCKER_PARTIAL_IMAGES += debian-microblaze-cross
-DOCKER_PARTIAL_IMAGES += debian-nios2-cross
DOCKER_PARTIAL_IMAGES += debian-xtensa-cross
DOCKER_PARTIAL_IMAGES += fedora-cris-cross
diff --git a/tests/docker/dockerfiles/debian-nios2-cross.d/build-toolchain.sh b/tests/docker/dockerfiles/debian-nios2-cross.d/build-toolchain.sh
deleted file mode 100755
index ba3c9d8aff..0000000000
--- a/tests/docker/dockerfiles/debian-nios2-cross.d/build-toolchain.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/bash
-
-set -e
-
-TARGET=nios2-linux-gnu
-LINUX_ARCH=nios2
-
-J=$(expr $(nproc) / 2)
-TOOLCHAIN_INSTALL=/usr/local
-TOOLCHAIN_BIN=${TOOLCHAIN_INSTALL}/bin
-CROSS_SYSROOT=${TOOLCHAIN_INSTALL}/$TARGET/sys-root
-
-export PATH=${TOOLCHAIN_BIN}:$PATH
-
-#
-# Grab all of the source for the toolchain bootstrap.
-#
-
-wget https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.xz
-wget https://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.xz
-wget https://ftp.gnu.org/gnu/glibc/glibc-2.34.tar.xz
-wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.70.tar.xz
-
-tar axf binutils-2.37.tar.xz
-tar axf gcc-11.2.0.tar.xz
-tar axf glibc-2.34.tar.xz
-tar axf linux-5.10.70.tar.xz
-
-mv binutils-2.37 src-binu
-mv gcc-11.2.0 src-gcc
-mv glibc-2.34 src-glibc
-mv linux-5.10.70 src-linux
-
-mkdir -p bld-hdr bld-binu bld-gcc bld-glibc
-mkdir -p ${CROSS_SYSROOT}/usr/include
-
-#
-# Install kernel and glibc headers
-#
-
-cd src-linux
-make headers_install ARCH=${LINUX_ARCH} INSTALL_HDR_PATH=${CROSS_SYSROOT}/usr
-cd ..
-
-cd bld-hdr
-../src-glibc/configure --prefix=/usr --host=${TARGET}
-make install-headers DESTDIR=${CROSS_SYSROOT}
-touch ${CROSS_SYSROOT}/usr/include/gnu/stubs.h
-cd ..
-
-#
-# Build binutils
-#
-
-cd bld-binu
-../src-binu/configure --disable-werror \
- --prefix=${TOOLCHAIN_INSTALL} --with-sysroot --target=${TARGET}
-make -j${J}
-make install
-cd ..
-
-#
-# Build gcc, without shared libraries, because we do not yet
-# have a shared libc against which to link.
-#
-
-cd bld-gcc
-../src-gcc/configure --disable-werror --disable-shared \
- --prefix=${TOOLCHAIN_INSTALL} --with-sysroot --target=${TARGET} \
- --enable-languages=c --disable-libssp --disable-libsanitizer \
- --disable-libatomic --disable-libgomp --disable-libquadmath
-make -j${J}
-make install
-cd ..
-
-#
-# Build glibc
-# There are a few random things that use c++ but we didn't build that
-# cross-compiler. We can get away without them. Disable CXX so that
-# glibc doesn't try to use the host c++ compiler.
-#
-
-cd bld-glibc
-CXX=false ../src-glibc/configure --prefix=/usr --host=${TARGET}
-make -j${j}
-make install DESTDIR=${CROSS_SYSROOT}
-cd ..
diff --git a/tests/qtest/machine-none-test.c b/tests/qtest/machine-none-test.c
index 31cc0bfb01..05da7bc72d 100644
--- a/tests/qtest/machine-none-test.c
+++ b/tests/qtest/machine-none-test.c
@@ -38,7 +38,6 @@ static struct arch2cpu cpus_map[] = {
{ "mipsel", "I7200" },
{ "mips64", "20Kc" },
{ "mips64el", "I6500" },
- { "nios2", "FIXME" },
{ "or1k", "or1200" },
{ "ppc", "604" },
{ "ppc64", "power8e_v2.1" },
diff --git a/tests/tcg/nios2/10m50-ghrd.ld b/tests/tcg/nios2/10m50-ghrd.ld
deleted file mode 100644
index 71cdda450c..0000000000
--- a/tests/tcg/nios2/10m50-ghrd.ld
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Link script for the Nios2 10m50-ghrd board.
- *
- * Copyright Linaro Ltd 2022
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-MEMORY
-{
- tpf (rx) : ORIGIN = 0xc0000000, LENGTH = 1K
- ram (rwx) : ORIGIN = 0xc8000000, LENGTH = 128M
-}
-
-PHDRS
-{
- RAM PT_LOAD;
-}
-
-ENTRY(_start)
-EXTERN(_start)
-EXTERN(_interrupt)
-EXTERN(_fast_tlb_miss)
-
-SECTIONS
-{
- /* Begin at the (hardcoded) _interrupt entry point. */
- .text 0xc8000120 : {
- *(.text.intr)
- *(.text .text.* .gnu.linkonce.t.*)
- } >ram :RAM
-
- .rodata : ALIGN(4) {
- *(.rodata .rodata.* .gnu.linkonce.r.*)
- } > ram :RAM
-
- .eh_frame_hdr : ALIGN (4) {
- KEEP (*(.eh_frame_hdr))
- *(.eh_frame_entry .eh_frame_entry.*)
- } >ram :RAM
- .eh_frame : ALIGN (4) {
- KEEP (*(.eh_frame)) *(.eh_frame.*)
- } >ram :RAM
-
- .data : ALIGN(4) {
- *(.shdata)
- *(.data .data.* .gnu.linkonce.d.*)
- } >ram :RAM
-
- HIDDEN (_gp = ALIGN(16) + 0x7ff0);
- PROVIDE_HIDDEN (gp = _gp);
- .got : ALIGN(4) {
- *(.got.plt) *(.igot.plt) *(.got) *(.igot)
- } >ram :RAM
-
- .sdata : ALIGN(4) {
- *(.sdata .sdata.* .gnu.linkonce.s.*)
- } >ram :RAM
-
- .bss : ALIGN(4) {
- __bss_start = ABSOLUTE(.);
- *(.sbss .sbss.* .gnu.linkonce.sb.*)
- *(.scommon)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end = ABSOLUTE(.);
- } >ram :RAM
-
- __stack = ORIGIN(ram) + LENGTH(ram);
-}
diff --git a/tests/tcg/nios2/Makefile.softmmu-target b/tests/tcg/nios2/Makefile.softmmu-target
deleted file mode 100644
index bc7fd55060..0000000000
--- a/tests/tcg/nios2/Makefile.softmmu-target
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Nios2 system tests
-#
-# Copyright Linaro Ltd 2022
-# SPDX-License-Identifier: GPL-2.0-or-later
-#
-
-NIOS2_SYSTEM_SRC = $(SRC_PATH)/tests/tcg/nios2
-VPATH += $(NIOS2_SYSTEM_SRC)
-
-# These objects provide the basic boot code and helper functions for all tests
-CRT_OBJS = boot.o intr.o $(MINILIB_OBJS)
-LINK_SCRIPT = $(NIOS2_SYSTEM_SRC)/10m50-ghrd.ld
-
-CFLAGS += -nostdlib -g -O0 $(MINILIB_INC)
-LDFLAGS += -Wl,-T$(LINK_SCRIPT) -static -nostdlib $(CRT_OBJS) -lgcc
-
-%.o: %.S
- $(call quiet-command, $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@, AS, $@)
-
-%.o: %.c
- $(call quiet-command, $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@, CC, $@)
-
-# Build and link the tests
-%: %.o $(LINK_SCRIPT) $(CRT_OBJS)
- $(call quiet-command, $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS), LD, $@)
-
-QEMU_OPTS = -M 10m50-ghrd,vic=on -semihosting-config enable=on,target=native,chardev=output -kernel
-
-memory: CFLAGS+=-DCHECK_UNALIGNED=0
-TESTS += $(MULTIARCH_TESTS)
-TESTS += test-shadow-1
diff --git a/tests/tcg/nios2/Makefile.target b/tests/tcg/nios2/Makefile.target
deleted file mode 100644
index b38e2352b7..0000000000
--- a/tests/tcg/nios2/Makefile.target
+++ /dev/null
@@ -1,11 +0,0 @@
-# nios2 specific test tweaks
-
-# Currently nios2 signal handling is broken
-run-signals: signals
- $(call skip-test, $<, "BROKEN")
-run-plugin-signals-with-%:
- $(call skip-test, $<, "BROKEN")
-run-linux-test: linux-test
- $(call skip-test, $<, "BROKEN")
-run-plugin-linux-test-with-%:
- $(call skip-test, $<, "BROKEN")
diff --git a/tests/tcg/nios2/boot.S b/tests/tcg/nios2/boot.S
deleted file mode 100644
index f6771cbc81..0000000000
--- a/tests/tcg/nios2/boot.S
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Minimal Nios2 system boot code.
- *
- * Copyright Linaro Ltd 2022
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-#include "semicall.h"
-
- .text
- .set noat
-
-_start:
- /* Linker script defines stack at end of ram. */
- movia sp, __stack
-
- /* Install trampoline to _fast_tlb_miss at hardcoded vector. */
- movia r4, 0xc0000100
- movia r5, _ftm_tramp
- movi r6, .L__ftm_end - _ftm_tramp
- call memcpy
-
- /* Zero the bss to satisfy C. */
- movia r4, __bss_start
- movia r6, __bss_end
- sub r6, r6, r4
- movi r5, 0
- call memset
-
- /* Test! */
- call main
-
- /* Exit with main's return value. */
- movi r4, HOSTED_EXIT
- mov r5, r2
- semihosting_call
-
- .globl _start
- .type _start, @function
- .size _start, . - _start
-
-_ftm_tramp:
- movia et, _fast_tlb_miss
- jmp et
-.L__ftm_end:
-
- .type _ftm_tramp, @function
- .size _ftm_tramp, . - _ftm_tramp
-
-#define dst r4
-#define src r5
-#define len r6
-
-memcpy:
- /* Store return value right away, per API */
- mov r2, dst
-
- /* Check for both dst and src aligned. */
- or at, dst, src
- andi at, at, 3
- bne at, zero, .L_mc_test1
-
- /* Copy blocks of 8. */
-
- movi at, 8
- bltu len, at, .L_mc_test4
-
-.L_mc_loop8:
- ldw r8, 0(src)
- ldw r9, 4(src)
- addi src, src, 8
- addi dst, dst, 8
- subi len, len, 8
- stw r8, -8(dst)
- stw r9, -4(dst)
- bgeu len, at, .L_mc_loop8
-
- /* Copy final aligned block of 4. */
-
-.L_mc_test4:
- movi at, 4
- bltu len, at, .L_mc_test1
-
- ldw r8, 0(src)
- addi src, src, 4
- addi dst, dst, 4
- subi len, len, 4
- stw r8, -4(dst)
-
- /* Copy single bytes to finish. */
-
-.L_mc_test1:
- beq len, zero, .L_mc_done
-
-.L_mc_loop1:
- ldb r8, 0(src)
- addi src, src, 1
- addi dst, dst, 1
- subi len, len, 1
- stb r8, -1(dst)
- bne len, zero, .L_mc_loop1
-
-.L_mc_done:
- ret
-
-#undef dst
-#undef src
-#undef len
-
- .global memcpy
- .type memcpy, @function
- .size memcpy, . - memcpy
-
-#define dst r4
-#define val r5
-#define len r6
-
-memset:
- /* Store return value right away, per API */
- mov r2, dst
-
- /* Check for small blocks; fall back to bytewise. */
- movi r3, 8
- bltu len, r3, .L_ms_test1
-
- /* Replicate the byte across the word. */
- andi val, val, 0xff
- slli at, val, 8
- or val, val, at
- slli at, val, 16
- or val, val, at
-
- /* Check for destination alignment; realign if needed. */
- andi at, dst, 3
- bne at, zero, .L_ms_align
-
- /* Set blocks of 8. */
-
-.L_ms_loop8:
- stw val, 0(dst)
- stw val, 4(dst)
- addi dst, dst, 8
- subi len, len, 8
- bgeu len, r3, .L_ms_loop8
-
- /* Set final aligned block of 4. */
-
-.L_ms_test4:
- movi at, 4
- bltu len, at, .L_ms_test1
-
- stw r8, 0(dst)
- addi dst, dst, 4
- subi len, len, 4
- stw r8, -4(dst)
-
- /* Set single bytes to finish. */
-
-.L_ms_test1:
- beq len, zero, .L_ms_done
-
-.L_ms_loop1:
- stb r8, 0(dst)
- addi dst, dst, 1
- subi len, len, 1
- bne len, zero, .L_ms_loop1
-
-.L_ms_done:
- ret
-
- /* Realign for a large block, len >= 8. */
-.L_ms_align:
- andi at, dst, 1
- beq at, zero, 2f
-
- stb val, 0(dst)
- addi dst, dst, 1
- subi len, len, 1
-
-2: andi at, dst, 2
- beq at, zero, 4f
-
- sth val, 0(dst)
- addi dst, dst, 2
- subi len, len, 2
-
-4: bgeu len, r3, .L_ms_loop8
- br .L_ms_test4
-
-#undef dst
-#undef val
-#undef len
-
- .global memset
- .type memset, @function
- .size memset, . - memset
-
-/*
- * void __sys_outc(char c);
- */
-__sys_outc:
- subi sp, sp, 16
- stb r4, 0(sp) /* buffer[0] = c */
- movi at, 1
- stw at, 4(sp) /* STDOUT_FILENO */
- stw sp, 8(sp) /* buffer */
- stw at, 12(sp) /* len */
-
- movi r4, HOSTED_WRITE
- addi r5, sp, 4
- semihosting_call
-
- addi sp, sp, 16
- ret
-
- .global __sys_outc
- .type __sys_outc, @function
- .size __sys_outc, . - __sys_outc
diff --git a/tests/tcg/nios2/intr.S b/tests/tcg/nios2/intr.S
deleted file mode 100644
index c1730692ba..0000000000
--- a/tests/tcg/nios2/intr.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Minimal Nios2 system boot code -- exit on interrupt.
- *
- * Copyright Linaro Ltd 2022
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-#include "semicall.h"
-
- .section .text.intr, "ax"
- .global _interrupt
- .type _interrupt, @function
-
-_interrupt:
- rdctl r5, exception /* extract exception.CAUSE */
- srli r5, r5, 2
- movi r4, HOSTED_EXIT
- semihosting_call
-
- .size _interrupt, . - _interrupt
-
- .text
- .global _fast_tlb_miss
- .type _fast_tlb_miss, @function
-
-_fast_tlb_miss:
- movi r5, 32
- movi r4, HOSTED_EXIT
- semihosting_call
-
- .size _fast_tlb_miss, . - _fast_tlb_miss
diff --git a/tests/tcg/nios2/semicall.h b/tests/tcg/nios2/semicall.h
deleted file mode 100644
index 6ad4978099..0000000000
--- a/tests/tcg/nios2/semicall.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Nios2 semihosting interface.
- *
- * Copyright Linaro Ltd 2022
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-#ifndef SEMICALL_H
-#define SEMICALL_H
-
-#define HOSTED_EXIT 0
-#define HOSTED_INIT_SIM 1
-#define HOSTED_OPEN 2
-#define HOSTED_CLOSE 3
-#define HOSTED_READ 4
-#define HOSTED_WRITE 5
-#define HOSTED_LSEEK 6
-#define HOSTED_RENAME 7
-#define HOSTED_UNLINK 8
-#define HOSTED_STAT 9
-#define HOSTED_FSTAT 10
-#define HOSTED_GETTIMEOFDAY 11
-#define HOSTED_ISATTY 12
-#define HOSTED_SYSTEM 13
-
-#define semihosting_call break 1
-
-#endif /* SEMICALL_H */
diff --git a/tests/tcg/nios2/test-shadow-1.S b/tests/tcg/nios2/test-shadow-1.S
deleted file mode 100644
index 79ef69db12..0000000000
--- a/tests/tcg/nios2/test-shadow-1.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Regression test for TCG indirect global lowering.
- *
- * Copyright Linaro Ltd 2022
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-#include "semicall.h"
-
- .text
- .set noat
- .align 2
- .globl main
- .type main, @function
-
-main:
- /* Initialize r0 in shadow register set 1. */
- movhi at, 1 /* PRS=1, CRS=0, RSIE=0, PIE=0 */
- wrctl status, at
- wrprs zero, zero
-
- /* Change current register set to 1. */
- movi at, 1 << 10 /* PRS=0, CRS=1, RSIE=0, PIE=0 */
- wrctl estatus, at
- movia ea, 1f
- eret
-
- /* Load address for callr, then end TB. */
-1: movia at, 3f
- br 2f
-
- /* Test case! TCG abort on indirect lowering across brcond. */
-2: callr at
-
- /* exit(0) */
-3: movi r4, HOSTED_EXIT
- movi r5, 0
- semihosting_call
-
- .size main, . - main