This is the mail archive of the gdb-patches@sourceware.org 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: [RFC] Linux-specific ppc32 ABI


Hi Mark,

> How about the attached diff?

Sounds like everyone is happy with the patch you suggested. Thiago
just mentioned one nit in your comments (repeated below). Can the patch
be checked in?  We'd like to have it for the release.

Thank you.

> Index: ppc-sysv-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/ppc-sysv-tdep.c,v
> retrieving revision 1.45
> diff -u -p -r1.45 ppc-sysv-tdep.c
> --- ppc-sysv-tdep.c	1 Jan 2008 22:53:12 -0000	1.45
> +++ ppc-sysv-tdep.c	26 Jan 2008 15:24:36 -0000
> @@ -129,17 +129,19 @@ ppc_sysv_abi_push_dummy_call (struct gdb
>  		}
>  	      else
>  		{
> -		  /* SysV ABI converts floats to doubles before
> -		     writing them to an 8 byte aligned stack location.  */
> -		  argoffset = align_up (argoffset, 8);
> +		  /* The SysV ABI tells us to convert floats to
> +		     doubles before writing them to an 8 byte aligned
> +		     stack location.  Unfortunately GCC does not do
> +		     that, and stores floats without into 4 bytes
                                             ^^^^^^^ should be removed
> +		     aligned locations without converting them to
> +		     doubles. */
> +
> +		  /* Align to 4 bytes or 8 bytes depending on the type of
> +		     the argument (float or double).  */
> +		  argoffset = align_up (argoffset, len);
>  		  if (write_pass)
> -		    {
> -		      char memval[8];
> -		      convert_typed_floating (val, type, memval,
> -					      builtin_type_ieee_double);
>  		      write_memory (sp + argoffset, val, len);
> -		    }
> -		  argoffset += 8;
> +		  argoffset += len;
>  		}
>  	    }
>  	  else if (TYPE_CODE (type) == TYPE_CODE_FLT

-- 
Joel


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