Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
Subject: Re: [RFA] ARI fix: Remove OP at end of line in xstormy16-tdep.c
Date: Tue, 19 Apr 2011 11:08:00 -0000	[thread overview]
Message-ID: <201104191208.01363.pedro@codesourcery.com> (raw)
In-Reply-To: <006e01cbfe7e$5a8dadc0$0fa90940$@muller@ics-cnrs.unistra.fr>

On Tuesday 19 April 2011 11:41:34, Pierre Muller wrote:
> --- xstormy16-tdep.c    18 Mar 2011 18:52:32 -0000      1.114
> +++ xstormy16-tdep.c    19 Apr 2011 10:35:47 -0000
> @@ -264,11 +264,9 @@ xstormy16_push_dummy_call (struct gdbarc
>        val = value_contents (args[i]);
>        for (j = 0; j < typelen; j += xstormy16_reg_size)
>         regcache_cooked_write_unsigned (regcache, argreg++,
> -                       extract_unsigned_integer (val + j,
> -                                                 typelen - j ==
> -                                                 1 ? 1 :
> -                                                 xstormy16_reg_size,
> -                                                 byte_order));
> +         extract_unsigned_integer (val + j,
> +                                   typelen - j == 1 ? 1 :
> xstormy16_reg_size,
> +                                   byte_order));

A sign that temporary variables would help, IMO:

       for (j = 0; j < typelen; j += xstormy16_reg_size)
		  {
	       ULONGEST regval;
          int size;

			size = typelen - j == 1 ? 1 : xstormy16_reg_size;
          val = extract_unsigned_integer (val + j, size, byte_order);
          regcache_cooked_write_unsigned (regcache, argreg++, regval);
         );

-- 
Pedro Alves


  reply	other threads:[~2011-04-19 11:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 10:41 Pierre Muller
2011-04-19 11:08 ` Pedro Alves [this message]
2011-04-19 12:41   ` Pierre Muller
2011-04-19 12:52     ` Corinna Vinschen
2011-04-19 12:58       ` Pierre Muller

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=201104191208.01363.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /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