🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #300

gas 1.34/sparc floating point bug

#300
From: James Clark
Date: Tue, 18 Jul 1989 00:22
36 lines
1002 bytes
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
Technical Details
Message-ID: <8907180022.AA16873@jclark.uucp>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!watmath!uunet!ginosko!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!UUNET.UU.NET!jclark!jjc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!watmath!uunet!ginosko!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!UUNET.UU.NET!jclark!jjc
From: jclark!jjc@UUNET.UU.NET (James Clark)
Newsgroups: gnu.utils.bug
Subject: gas 1.34/sparc floating point bug
Message-ID: <8907180022.AA16873@jclark.uucp>
Date: 18 Jul 89 00:22:32 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 36