From patchwork Tue Mar 25 14:47:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 271 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (caibbdcaaahb.dreamhost.com [208.113.200.71]) by wilcox.dreamhost.com (Postfix) with ESMTP id EFE25360148 for ; Tue, 25 Mar 2014 07:47:54 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14314964) id 9BB932A173CB; Tue, 25 Mar 2014 07:47:54 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 6C2892780976 for ; Tue, 25 Mar 2014 07:47:54 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:subject:to:date:from:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=OVu qaf5yRDTl8rJqNF6vBpE4Rh3epF4rK/OXJX12Nhr4u64UpyuXDK8+xfgzEttniEW 7hI7xZUwzgt7+Gw5P106c02Yrqo+Gar0KkrqaYLWN2iph6lG5+zQ2i/T7T24SIuj KWIhkqcdm4Z/wF9UbfLWZoenIr1qdITE5VxJEDJ0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:subject:to:date:from:mime-version :content-type:content-transfer-encoding; s=default; bh=+6925VZoY ouJIzZmGJdPGiwdV0E=; b=pCtDxIFT4qHqVwDiugef4ERxXNzE2dFCSXsasR86H tzNFACg5dmGvFbfdvd+1p98BKmjPhuQWghyfp8YAZE37xaUxXJkp+lybXY7jUxmB Lc5BhVQWw7zz0LL6oyNMxp0NoU9F72ZQaMdS7XT48KkxxOSllUO9egdsZabweaDH b0= Received: (qmail 13408 invoked by alias); 25 Mar 2014 14:47:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 13396 invoked by uid 89); 25 Mar 2014 14:47:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD, SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: e37.co.us.ibm.com Received: from e37.co.us.ibm.com (HELO e37.co.us.ibm.com) (32.97.110.158) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 25 Mar 2014 14:47:50 +0000 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Mar 2014 08:47:49 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 25 Mar 2014 08:47:47 -0600 Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id D444219D8048 for ; Tue, 25 Mar 2014 08:47:42 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08025.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s2PElkgL10813800 for ; Tue, 25 Mar 2014 15:47:46 +0100 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s2PElk34024877 for ; Tue, 25 Mar 2014 08:47:46 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id s2PEliof024646 for ; Tue, 25 Mar 2014 08:47:44 -0600 Message-Id: <201403251447.s2PEliof024646@d03av02.boulder.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 25 Mar 2014 15:47:43 +0100 Subject: [commit] Support gdb.asm/asm-source.exp on powerpc64le To: gdb-patches@sourceware.org Date: Tue, 25 Mar 2014 15:47:43 +0100 (CET) From: "Ulrich Weigand" MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14032514-7164-0000-0000-0000008C0BAE X-DH-Original-To: gdb@patchwork.siddhesh.in Hello, this patch adds a new powerpc64le.inc file appropriate for the ELFv2 ABI and uses it to support the asm-source.exp test case on powerpc64le (which previously resulted in UNTESTED). Tested on powerpc64le-linux. Pushed to mainline. Bye, Ulrich ChangeLog: * gdb.asm/asm-source.exp: Handle powerpc64le-* targets. * gdb.asm/powerpc64le.inc: New file. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b7bc990..678be17 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-03-25 Ulrich Weigand + + * gdb.asm/asm-source.exp: Handle powerpc64le-* targets. + * gdb.asm/powerpc64le.inc: New file. + 2014-03-25 Pedro Alves Doug Evans diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp index 51aca8e..fa4585c 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -97,6 +97,11 @@ switch -glob -- [istarget] { "mips*-*" { set asm-arch mips } + "powerpc64le-*" { + set asm-arch powerpc64le + set asm-flags "-a64 -I${srcdir}/${subdir} $obj_include" + append link-flags " -m elf64lppc" + } "powerpc*-*" { if { [is_lp64_target] } { set asm-arch powerpc64 diff --git a/gdb/testsuite/gdb.asm/powerpc64le.inc b/gdb/testsuite/gdb.asm/powerpc64le.inc new file mode 100644 index 0000000..d559f66 --- /dev/null +++ b/gdb/testsuite/gdb.asm/powerpc64le.inc @@ -0,0 +1,47 @@ + comment "subroutine prologue" + .macro gdbasm_enter + stdu 1, -32(1) + mflr 0 + std 0, 48(1) + .endm + + comment "subroutine epilogue" + .macro gdbasm_leave + ld 0, 48(1) + mtlr 0 + ld 1, 0(1) + blr + .endm + + .macro gdbasm_call subr + bl \subr + nop + .endm + + .macro gdbasm_several_nops + nop + nop + nop + nop + .endm + + comment "exit (0)" + .macro gdbasm_exit0 + comment "sys_exit" + li 0, 1 + sc + .endm + + comment "crt0 startup" + .macro gdbasm_startup + .abiversion 2 + .p2align 2 + .endm + + comment "Declare a data variable" + .purgem gdbasm_datavar + .macro gdbasm_datavar name value + .section ".data" +\name: + .long \value + .endm