Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [ppc64-linux]: specify size of long double on PPC64 Linux
@ 2003-06-11  7:49 Jim Blandy
  2003-06-11 19:01 ` Mark Kettenis
  2003-06-11 19:18 ` Kevin Buettner
  0 siblings, 2 replies; 4+ messages in thread
From: Jim Blandy @ 2003-06-11  7:49 UTC (permalink / raw)
  To: gdb-patches


2003-06-11  Jim Blandy  <jimb@redhat.com>

	* ppc-linux-tdep.c (ppc_linux_init_abi): long doubles are 16 bytes
	long.

Index: gdb/ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.28.8.13
diff -c -r1.28.8.13 ppc-linux-tdep.c
*** gdb/ppc-linux-tdep.c	10 Jun 2003 18:00:30 -0000	1.28.8.13
--- gdb/ppc-linux-tdep.c	11 Jun 2003 06:43:41 -0000
***************
*** 1027,1032 ****
--- 1027,1034 ----
    
    if (tdep->wordsize == 8)
      {
+       set_gdbarch_long_double_bit (gdbarch, 16 * TARGET_CHAR_BIT);
+ 
        set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address);
  
        set_gdbarch_in_solib_call_trampoline


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ppc64-linux]: specify size of long double on PPC64 Linux
  2003-06-11  7:49 [ppc64-linux]: specify size of long double on PPC64 Linux Jim Blandy
@ 2003-06-11 19:01 ` Mark Kettenis
  2003-06-11 19:18 ` Kevin Buettner
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Kettenis @ 2003-06-11 19:01 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

Jim Blandy <jimb@redhat.com> writes:

> 2003-06-11  Jim Blandy  <jimb@redhat.com>
> 
> 	* ppc-linux-tdep.c (ppc_linux_init_abi): long doubles are 16 bytes
> 	long.
> 
> Index: gdb/ppc-linux-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
> retrieving revision 1.28.8.13
> diff -c -r1.28.8.13 ppc-linux-tdep.c
> *** gdb/ppc-linux-tdep.c	10 Jun 2003 18:00:30 -0000	1.28.8.13
> --- gdb/ppc-linux-tdep.c	11 Jun 2003 06:43:41 -0000
> ***************
> *** 1027,1032 ****
> --- 1027,1034 ----
>     
>     if (tdep->wordsize == 8)
>       {
> +       set_gdbarch_long_double_bit (gdbarch, 16 * TARGET_CHAR_BIT);

It's probably a matter of taste, but I'd use the plain number 128 here
instead of expressing things in TARGET_CHAR_BIT.

Mark


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ppc64-linux]: specify size of long double on PPC64 Linux
  2003-06-11  7:49 [ppc64-linux]: specify size of long double on PPC64 Linux Jim Blandy
  2003-06-11 19:01 ` Mark Kettenis
@ 2003-06-11 19:18 ` Kevin Buettner
  2003-06-12 21:00   ` Jim Blandy
  1 sibling, 1 reply; 4+ messages in thread
From: Kevin Buettner @ 2003-06-11 19:18 UTC (permalink / raw)
  To: Jim Blandy, gdb-patches

On Jun 11,  2:50am, Jim Blandy wrote:

> 2003-06-11  Jim Blandy  <jimb@redhat.com>
> 
> 	* ppc-linux-tdep.c (ppc_linux_init_abi): long doubles are 16 bytes
> 	long.
> 
> Index: gdb/ppc-linux-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
> retrieving revision 1.28.8.13
> diff -c -r1.28.8.13 ppc-linux-tdep.c
> *** gdb/ppc-linux-tdep.c	10 Jun 2003 18:00:30 -0000	1.28.8.13
> --- gdb/ppc-linux-tdep.c	11 Jun 2003 06:43:41 -0000
> ***************
> *** 1027,1032 ****
> --- 1027,1034 ----
>     
>     if (tdep->wordsize == 8)
>       {
> +       set_gdbarch_long_double_bit (gdbarch, 16 * TARGET_CHAR_BIT);
> + 
>         set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address);
>   
>         set_gdbarch_in_solib_call_trampoline

Do you really need to do this?

rs6000-tdep.c already has the following in it:

  if (sysv_abi)
    set_gdbarch_long_double_bit (gdbarch, 16 * TARGET_CHAR_BIT);
  else
    set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);

So, if I'm not mistaken, the size of long doubles should already be
set correctly.

Kevin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ppc64-linux]: specify size of long double on PPC64 Linux
  2003-06-11 19:18 ` Kevin Buettner
@ 2003-06-12 21:00   ` Jim Blandy
  0 siblings, 0 replies; 4+ messages in thread
From: Jim Blandy @ 2003-06-12 21:00 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches

Kevin Buettner <kevinb@redhat.com> writes:

> On Jun 11,  2:50am, Jim Blandy wrote:
> 
> > 2003-06-11  Jim Blandy  <jimb@redhat.com>
> > 
> > 	* ppc-linux-tdep.c (ppc_linux_init_abi): long doubles are 16 bytes
> > 	long.
> > 
> > Index: gdb/ppc-linux-tdep.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
> > retrieving revision 1.28.8.13
> > diff -c -r1.28.8.13 ppc-linux-tdep.c
> > *** gdb/ppc-linux-tdep.c	10 Jun 2003 18:00:30 -0000	1.28.8.13
> > --- gdb/ppc-linux-tdep.c	11 Jun 2003 06:43:41 -0000
> > ***************
> > *** 1027,1032 ****
> > --- 1027,1034 ----
> >     
> >     if (tdep->wordsize == 8)
> >       {
> > +       set_gdbarch_long_double_bit (gdbarch, 16 * TARGET_CHAR_BIT);
> > + 
> >         set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address);
> >   
> >         set_gdbarch_in_solib_call_trampoline
> 
> Do you really need to do this?
> 
> rs6000-tdep.c already has the following in it:
> 
>   if (sysv_abi)
>     set_gdbarch_long_double_bit (gdbarch, 16 * TARGET_CHAR_BIT);
>   else
>     set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
> 
> So, if I'm not mistaken, the size of long doubles should already be
> set correctly.

Ach, yes, I read that backwards.  Thanks for catching that.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-06-12 21:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-11  7:49 [ppc64-linux]: specify size of long double on PPC64 Linux Jim Blandy
2003-06-11 19:01 ` Mark Kettenis
2003-06-11 19:18 ` Kevin Buettner
2003-06-12 21:00   ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox