public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@codesourcery.com>
To: Yao Qi <yao@codesourcery.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Recognize branch instruction on MIPS in gdb.trace/entry-values.exp
Date: Mon, 29 Dec 2014 23:20:00 -0000	[thread overview]
Message-ID: <alpine.DEB.1.10.1412292255010.19155@tp.orcam.me.uk> (raw)
In-Reply-To: <1419840861-10723-1-git-send-email-yao@codesourcery.com>

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

  reply	other threads:[~2014-12-29 23:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29  8:15 Yao Qi
2014-12-29 23:20 ` Maciej W. Rozycki [this message]
2014-12-30 12:34   ` Yao Qi
2014-12-30 14:17     ` Maciej W. Rozycki
2015-01-04  8:42       ` Yao Qi
2015-01-07 23:22         ` Maciej W. Rozycki
2015-01-08  1:10           ` Yao Qi
2015-01-08  1:24             ` Maciej W. Rozycki
2015-01-08  3:47               ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.10.1412292255010.19155@tp.orcam.me.uk \
    --to=macro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).