]> git.proxmox.com Git - qemu.git/commitdiff
target-xtensa: improve unit tests debugging
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 15 Mar 2012 21:24:57 +0000 (01:24 +0400)
committerMax Filippov <jcmvbkbc@gmail.com>
Fri, 13 Apr 2012 23:48:08 +0000 (03:48 +0400)
- add testcase announcement;
- add global symbols for individual tests;
- add host-debug-* makefile target.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
tests/tcg/xtensa/Makefile
tests/tcg/xtensa/macros.inc

index 7e1e619d238ea792eb698b1f733de219eca06d8f..0ff0ccfb8ce204a31149b22282beeed0ba2a1bb5 100644 (file)
@@ -72,5 +72,8 @@ run-test_fail.tst: test_fail.tst
 debug-%.tst: %.tst
        $(SIM) $(SIMDEBUG) $(SIMFLAGS) ./$<
 
+host-debug-%.tst: %.tst
+       gdb --args $(SIM) $(SIMFLAGS) ./$<
+
 clean:
        $(RM) -fr $(TESTCASES) $(CRT)
index 2d4515e14fe0f72ca2aa3e400d297c22ee5896f1..23bf3e96c8b11f0b54579bd2d775e43fd646af10 100644 (file)
@@ -29,7 +29,24 @@ main:
     exit
 .endm
 
+.macro print text
+.data
+97: .ascii "\text\n"
+98:
+    .align 4
+.text
+    movi    a2, 4
+    movi    a3, 2
+    movi    a4, 97b
+    movi    a5, 98b
+    sub     a5, a5, a4
+    simcall
+.endm
+
 .macro test name
+    //print test_\name
+test_\name:
+.global test_\name
 .endm
 
 .macro test_end