This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: x86-64 XFmode long doubles


> Jan Hubicka <hubicka@ucw.cz> writes:
> 
> > Oops, sorry for that. Somehow I still think about these modes as defined
> > always.
> >
> > The problem is that I set format to encode_ieee_extended for 128bit
> > XFmode too. I now notice that IA-64 does use encode_ieee_extended_128.
> > The problem is that for i386 I do have both formats possible, so I need
> > runtime way choosing in between those two.
> 
> I have anticipated this need.  You want ADJUST_FLOAT_FORMAT.
This is the patch I am testing and will commit as obvious if passes.

2003-10-31  Jan Hubicka  <jh@suse.cz>
	* i386-modes.def: Add XFmode format adjustment.
Index: i386-modes.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386-modes.def,v
retrieving revision 1.5
diff -c -3 -p -r1.5 i386-modes.def
*** i386-modes.def	30 Oct 2003 21:01:15 -0000	1.5
--- i386-modes.def	30 Oct 2003 23:22:09 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 27,32 ****
--- 27,35 ----
     tables are correctly set up.  We correct its size below.  */
  
  FLOAT_MODE (XF, 12, ieee_extended_intel_96_format);
+ ADJUST_FLOAT_FORMAT (XF, (TARGET_128BIT_LONG_DOUBLE
+ 			  ? &ieee_extended_intel_128_format
+ 			  : &ieee_extended_intel_96_format));
  ADJUST_BYTESIZE  (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 12);
  ADJUST_ALIGNMENT (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 4);
  FLOAT_MODE (TF, 16, ieee_quad_format);


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