From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3314 invoked by alias); 29 Dec 2014 23:20:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 3301 invoked by uid 89); 29 Dec 2014 23:20:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Dec 2014 23:20:49 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Y5jcD-00055T-Me from Maciej_Rozycki@mentor.com for gdb-patches@sourceware.org; Mon, 29 Dec 2014 15:20:45 -0800 Received: from localhost (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 29 Dec 2014 23:20:44 +0000 Date: Mon, 29 Dec 2014 23:20:00 -0000 From: "Maciej W. Rozycki" To: Yao Qi CC: Subject: Re: [PATCH] Recognize branch instruction on MIPS in gdb.trace/entry-values.exp In-Reply-To: <1419840861-10723-1-git-send-email-yao@codesourcery.com> Message-ID: References: <1419840861-10723-1-git-send-email-yao@codesourcery.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-12/txt/msg00671.txt.bz2 On Mon, 29 Dec 2014, Yao Qi wrote: > The test entry-values.exp doesn't recognize the call instruction "jal" > on MIPS, so this patch sets call_insn "jal" first. > > Currently, we assume the next instruction address of call instruction > is the address returned from foo, however it is not correct on MIPS > which has delay slot. We extend variable call_insn to match one > instruction after jal, so that $returned_from_foo is correct on MIPS. What's the semantics of the test case and the changes you're making? I'm asking because the MIPS architecture has several instructions used to make procedure calls, depending on the ISA and ABI selected, and also compiler options. Besides JAL these instructions include JALS, JALX, JALR, JALRC, JALRS, BAL and BALS. It looks to me you need to modify the pattern here to take these into account; JALRC does not have a delay slot. > All tests in entry-values.exp are PASS. Which target and ABI(s) did you ran your testing on? Please try at least these: o32/MIPS, o32/MIPS16, o32/microMIPS, n64 on a Linux and a bare-metal target each; testing o32/MIPS16 with the `-mflip-mips16' GCC option too will be appreciated. These combinations should trigger some (although not all) of the other possible instructions. Maciej