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]

[commit] Switch long double default for S/390 to 128-bit


Hello,

this patch switches the default long double type for S/390 to
128-bit IEEE quad (which all current distributions use).

Similar to what was done on PowerPC, I'm just switching the
default unconditionally; for binaries that still use 64-bit
long double, GDB will pick that up from the debug info.

Tested on s390-ibm-linux and s390x-ibm-linux.
Committed to mainline.

Bye,
Ulrich


ChangeLog:

	* s390-tdep.c (s390_gdbarch_init): Set default long double
	type to 128-bit IEEE quad.


Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.168
diff -c -p -r1.168 s390-tdep.c
*** gdb/s390-tdep.c	11 Jan 2008 13:20:02 -0000	1.168
--- gdb/s390-tdep.c	17 Jan 2008 15:33:50 -0000
*************** s390_gdbarch_init (struct gdbarch_info i
*** 2328,2333 ****
--- 2328,2339 ----
    set_gdbarch_believe_pcc_promotion (gdbarch, 0);
    set_gdbarch_char_signed (gdbarch, 0);
  
+   /* S/390 GNU/Linux uses either 64-bit or 128-bit long doubles.
+      We can safely let them default to 128-bit, since the debug info
+      will give the size of type actually used in each case.  */
+   set_gdbarch_long_double_bit (gdbarch, 128);
+   set_gdbarch_long_double_format (gdbarch, floatformats_ia64_quad);
+ 
    /* Amount PC must be decremented by after a breakpoint.  This is
       often the number of bytes returned by gdbarch_breakpoint_from_pc but not
       always.  */
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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