delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/04/07/10:27:17

Date: Wed, 7 Apr 1993 09:35:44 -0400
From: ae1181t AT stnfor DOT ae DOT ge DOT com (Osman F Buyukisik)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: bug in double

This is produced by : cc -S foo.c  (on HP710 hpux 8.07)
        .SPACE  $TEXT$,SORT=8
        .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44,SORT=16
$THIS_LIT$

        .SUBSPA $LITSTATIC$,QUAD=0,ALIGN=8,ACCESS=44,SORT=16
$THIS_LITSTATIC$

        .SPACE  $PRIVATE$,SORT=16
        .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31,SORT=16
$THIS_DATA$

d
        .ALIGN  8
        .WORD  1305984297  ; = 0x4dd7bd29
        .WORD  -775390695  ; = 0xd1c87a19
        .WORD  1309518964  ; = 0x4e0dac74
        .WORD  1178245279  ; = 0x463a989f
        .WORD  1312984008  ; = 0x4e428bc8
        .WORD  -1411080348  ; = 0xabe49f64
        .WORD  1316433594  ; = 0x4e772eba
        .WORD  -690108611  ; = 0xd6ddc73d
        .WORD  1319959145  ; = 0x4eacfa69
        .WORD  -1936377588  ; = 0x8c95390c
        .SUBSPA $SHORTDATA$,QUAD=1,ALIGN=8,ACCESS=31,SORT=16
$THIS_SHORTDATA$

        .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
$THIS_BSS$

        .SUBSPA $SHORTBSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=80
$THIS_SHORTBSS$

        .SUBSPA $STATICDATA$,QUAD=1,ALIGN=8,ACCESS=31,SORT=16
$THIS_STATICDATA$

        .SUBSPA $SHORTSTATICDATA$,QUAD=1,ALIGN=8,ACCESS=31,SORT=24
$THIS_SHORTSTATICDATA$

        .SPACE  $PRIVATE$
        .SUBSPA $DATA$
        .EXPORT d
        .END
*********************************************************************
compiling and running the original maxdouble.c (using gcc2.3.3 HP710
and both hp as and gas same result, also the optimization flags didnt
change the result)
MAXDOUBLE = 1.79769313486231570000e+308, dd = 1.79769313486231570000e+308
*********************************************************************
On Ultrix  the second test :
	.verstamp	2 10
	.globl	d
	.data	
	.align	3
	.align	0
d:
	.double	9.9999999999999998e+66:1
	.double	9.9999999999999995e+67:1
	.double	1.0000000000000001e+69:1
	.double	1.0000000000000001e+70:1
	.double	1.0000000000000000e+71:1
**************************************************************************
and the original test:
MAXDOUBLE = 1.79769313486231570000e+308, dd = 1.79769313486231570000e+308
**************************************************************************
On my PC ps/2 model 70 gcc2.3.3 but libs 2.3.2.

	.file	"foo2.c"
gcc2_compiled.:
.globl _d
.data
	.align 2
_d:
	.double 0d1.00000000000000000000e+67
	.double 0d1.00000000000000000000e+68
	.double 0d1.00000000000000070000e+69
	.double 0d1.00000000000000070000e+70
and the original test :

MAXDOUBLE = 1.79769313486231670000e+308, dd = NaN
It looks like the pc  version has problems with the original test. 
However even the vax seems to produce not so correct .s file??
BTW, I could not tell if the hp's .s file is correct!!
Hope this helps. 8:)
Osman Buyukisik

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019