[gnu.utils.bug] gas 1.34/sparc floating point bug

jjc@UUNET.UU.NET (James Clark) (07/18/89)

The following assembled with gas 1.34 on the sparc outputs

1048575.9999999998

When assembled with /bin/as it correctly outputs 1048576.

gcc_compiled.:
.text
LC0:
	.ascii "%.17g\12\0"
	.align 8
LC1:
	.double 0r1.04857600000000000000e+06
	.align 4
.global _main
	.proc 1
_main:
	!#PROLOGUE# 0
	save %sp,-112,%sp
	!#PROLOGUE# 1
	sethi %hi(LC0),%o0
	or %lo(LC0),%o0,%o0
	sethi %hi(LC1),%g1
	sethi %hi(LC1),%g1
	ld [%lo(LC1)+%g1],%o1
	sethi %hi(LC1+4),%g1
	ld [%lo(LC1+4)+%g1],%o2
	call _printf,0
	nop
L1:
	ret
	restore


James Clark
jjc@jclark.uucp