Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] sh-tdep.c: Fix double handling in LE mode
Date: Thu, 25 Mar 2004 17:10:00 -0000	[thread overview]
Message-ID: <20040325171024.GZ17229@cygbert.vinschen.de> (raw)

Hi,

the below pretty trivial patch fixes two FAILs on SH4 and SH4a in
little endian mode.

Ok, to apply?

Corinna

	* sh-tdep.c (sh3e_sh4_store_return_value): Correctly store
	double values in little endian mode.

Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.167
diff -u -p -r1.167 sh-tdep.c
--- sh-tdep.c	8 Mar 2004 10:18:13 -0000	1.167
+++ sh-tdep.c	25 Mar 2004 17:07:51 -0000
@@ -1147,7 +1147,11 @@ sh3e_sh4_store_return_value (struct type
       int len = TYPE_LENGTH (type);
       int i, regnum = FP0_REGNUM;
       for (i = 0; i < len; i += 4)
-	regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
+	if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
+	  regcache_raw_write (regcache, regnum++,
+			      (char *) valbuf + len - 4 - i);
+	else
+	  regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
     }
   else
     sh_default_store_return_value (type, regcache, valbuf);
 
-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.


             reply	other threads:[~2004-03-25 17:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25 17:10 Corinna Vinschen [this message]
2004-04-29 12:44 ` Corinna Vinschen
2004-06-01 16:07 ` Elena Zannoni
2004-06-03 11:47   ` Corinna Vinschen

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=20040325171024.GZ17229@cygbert.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=gdb-patches@sources.redhat.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