summaryrefslogtreecommitdiffstats
path: root/tests/tcg/arm/semihosting.c
diff options
context:
space:
mode:
authorPeter Maydell2020-01-10 14:19:34 +0100
committerPeter Maydell2020-01-10 14:19:34 +0100
commitf38a71b01f839c7b65ea73ddd507903cb9489ed6 (patch)
tree5b25ccbcf076e764d306a5133874e288f7f8e57e /tests/tcg/arm/semihosting.c
parentconfigure: check for gdbus-codegen presence (diff)
parenttests/tcg: add user version of dumb-as-bricks semiconsole test (diff)
downloadqemu-f38a71b01f839c7b65ea73ddd507903cb9489ed6.tar.gz
qemu-f38a71b01f839c7b65ea73ddd507903cb9489ed6.tar.xz
qemu-f38a71b01f839c7b65ea73ddd507903cb9489ed6.zip
Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-and-semihosting-090120-2' into staging
Testing fixes and semiconsole support: - build fix (missing x86-iommu stubs) - python fixes for freebsd and OSX - nicer reporting of acceptance failures - fix build nesting of fp-test (breaks bsds) - semihosting clean-ups - support for blocking semihosting console # gpg: Signature made Thu 09 Jan 2020 11:42:51 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-testing-and-semihosting-090120-2: tests/tcg: add user version of dumb-as-bricks semiconsole test tests/tcg: extract __semi_call into a header and expand tests/tcg: add a dumb-as-bricks semihosting console test semihosting: add qemu_semihosting_console_inc for SYS_READC target/arm: only update pc after semihosting completes target/arm: remove unused EXCP_SEMIHOST leg testing: don't nest build for fp-test travis.yml: install homebrew python for OS X travis.yml: duplicate before_script for MacOSX travis.yml: Detach build and test steps travis.yml: avocado: Print logs of non-pass tests only freebsd: use python37 tests/vm: update openbsd to release 6.6 hw/i386/x86-iommu: Add missing stubs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/tcg/arm/semihosting.c')
-rw-r--r--tests/tcg/arm/semihosting.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/tests/tcg/arm/semihosting.c b/tests/tcg/arm/semihosting.c
index 09c89cb481..33faac9916 100644
--- a/tests/tcg/arm/semihosting.c
+++ b/tests/tcg/arm/semihosting.c
@@ -8,26 +8,7 @@
*/
#include <stdint.h>
-
-#define SYS_WRITE0 0x04
-#define SYS_REPORTEXC 0x18
-
-void __semi_call(uintptr_t type, uintptr_t arg0)
-{
-#if defined(__arm__)
- register uintptr_t t asm("r0") = type;
- register uintptr_t a0 asm("r1") = arg0;
- asm("svc 0xab"
- : /* no return */
- : "r" (t), "r" (a0));
-#else
- register uintptr_t t asm("x0") = type;
- register uintptr_t a0 asm("x1") = arg0;
- asm("hlt 0xf000"
- : /* no return */
- : "r" (t), "r" (a0));
-#endif
-}
+#include "semicall.h"
int main(int argc, char *argv[argc])
{