This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] sh-tdep.c: Fix double handling in LE mode


Ping?

On Mar 25 18:10, Corinna Vinschen wrote:
> 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.

-- 
Corinna Vinschen
Cygwin Co-Project Leader
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]