From patchwork Sat Apr 14 01:00:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 152464 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E8226B7016 for ; Sat, 14 Apr 2012 11:00:56 +1000 (EST) Received: from localhost ([::1]:44137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIrME-00010V-QZ for incoming@patchwork.ozlabs.org; Fri, 13 Apr 2012 21:00:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIrLy-0000qr-VS for qemu-devel@nongnu.org; Fri, 13 Apr 2012 21:00:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SIrLx-0007dm-D8 for qemu-devel@nongnu.org; Fri, 13 Apr 2012 21:00:38 -0400 Received: from mail-lpp01m010-f45.google.com ([209.85.215.45]:57232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIrLx-0007ct-2t for qemu-devel@nongnu.org; Fri, 13 Apr 2012 21:00:37 -0400 Received: by lahe6 with SMTP id e6so2872980lah.4 for ; Fri, 13 Apr 2012 18:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=cNR5J0W73/eMJ23fkz/bRrtICNfUKQjIynLMrN2iCW4=; b=lUkpgLeECvVN9dKdi1INu+/NrgCCSLAKqerW/FKe7dPAucYyr664XF9GNdpkOGPXE4 Kg3lJ+p6UYQ9nazc5TZfBz3g2jy18o3U/vpMQbwNews0MjqRsvzJAcsKs8WLswlXtXps 56QOSy8cUeCPrCy4q/dat6FW901m3Tgj2pzJtGNFeBT8SRRtY8q1MvL3KY3Aza+Qh0Qz XVlWcBgqGw8WjzuqABlqc6THAETPJFahPtMoRscZO7jjkWUgILaJgpjSvwmw/MT+1wDy tMK8cmHg33nWEIAo6h9L+ESYfTz+/xCtEZTqKcg1kzuwgIzfzS5z/3k2/GYrK3udwCT7 l+YQ== Received: by 10.112.84.42 with SMTP id v10mr1627291lby.50.1334365234836; Fri, 13 Apr 2012 18:00:34 -0700 (PDT) Received: from octofox.metropolis ([188.134.19.124]) by mx.google.com with ESMTPS id mk9sm11148911lab.0.2012.04.13.18.00.33 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Apr 2012 18:00:33 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Sat, 14 Apr 2012 05:00:10 +0400 Message-Id: <1334365213-15986-3-git-send-email-jcmvbkbc@gmail.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1334365213-15986-1-git-send-email-jcmvbkbc@gmail.com> References: <1334365213-15986-1-git-send-email-jcmvbkbc@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.45 Cc: Blue Swirl , Max Filippov , Anthony Liguori Subject: [Qemu-devel] [PATCH 2/5] target-xtensa: improve unit tests debugging X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org - add testcase announcement; - add global symbols for individual tests; - add host-debug-* makefile target. Signed-off-by: Max Filippov --- tests/tcg/xtensa/Makefile | 3 +++ tests/tcg/xtensa/macros.inc | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile index 7e1e619..0ff0ccf 100644 --- a/tests/tcg/xtensa/Makefile +++ b/tests/tcg/xtensa/Makefile @@ -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) diff --git a/tests/tcg/xtensa/macros.inc b/tests/tcg/xtensa/macros.inc index 2d4515e..23bf3e9 100644 --- a/tests/tcg/xtensa/macros.inc +++ b/tests/tcg/xtensa/macros.inc @@ -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