Subject: port-pc532/2279: /usr/bin/as hangs on sourcefiles containing constants in the form 0fInf
To: None <gnats-bugs@NetBSD.ORG>
From: None <leo@marco.de>
List: netbsd-bugs
Date: 04/01/1996 10:59:00
>Number: 2279
>Category: port-pc532
>Synopsis: /usr/bin/as hangs on sourcefiles containing constants in the form 0fInf
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 1 04:20:01 1996
>Last-Modified:
>Originator: Matthias Pfaller
>Organization:
leo@dachau.marco.de in real life: Matthias Pfaller
marco GmbH, 85221 Dachau, Germany tel: +49 8131 516142
>Release: 960328
>Environment:
System: NetBSD klondike 1.1B NetBSD 1.1B (KLONDIKE) #99: Sat Mar 30 00:49:14 MET 1996 leo@klondike:/usr/src/sys/arch/pc532/compile/KLONDIKE pc532
>Description:
On the pc532 /usr/bin/as does not terminate when compiling files
containing floatingpoint constants in the form 0fInf.
Also the ns32k architecture uses the ieee floatingpoint format,
a special ns32k atof is used. I can see no reason for this and
the code seems to contain a bug that causes /usr/bin/as to enter
an endless loop when trying to convert a constant like 0fInf.
The appended patch changes as to use atof_ieee instead of atof_ns32k.
I didn't debug atof_ns32k because atof_ieee works for me.
>How-To-Repeat:
$ echo ".double 0fInf" >/tmp/tst.s
$ as /tmp/tst.s
>Fix:
--- gnu/usr.bin/gas/config/tc-ns32k.c.ORIG Thu Feb 22 22:41:19 1996
+++ gnu/usr.bin/gas/config/tc-ns32k.c Sat Mar 30 16:28:41 1996
@@ -1337,7 +1337,7 @@
int prec;
LITTLENUM_TYPE words[MAX_LITTLENUMS];
LITTLENUM_TYPE *wordP;
- extern char *atof_ns32k();
+ extern char *atof_ieee();
char *t;
switch (type) {
@@ -1352,12 +1352,12 @@
*sizeP = 0;
return "Bad call to MD_ATOF()";
}
- t = atof_ns32k(input_line_pointer, type, words);
+ t = atof_ieee(input_line_pointer, type, words);
if (t)
input_line_pointer=t;
*sizeP = prec * sizeof(LITTLENUM_TYPE);
- for (wordP = words +prec; prec--;) {
+ for (wordP = words + prec; prec--;) {
md_number_to_chars(litP, (long)(*--wordP), sizeof(LITTLENUM_TYPE));
litP+=sizeof(LITTLENUM_TYPE);
}
--- gnu/usr.bin/gas/config/Makefile.ns32k.ORIG Sat Oct 14 01:14:33 1995
+++ gnu/usr.bin/gas/config/Makefile.ns32k Sat Mar 30 16:27:03 1996
@@ -1,4 +1,4 @@
# $Id: Makefile.ns32k,v 1.1 1994/04/08 08:39:04 phil Exp $
CFLAGS+= -DPIC -DNS32532 -DNS32381
-SRCS+= tc-ns32k.c atof-ns32k.c
+SRCS+= tc-ns32k.c atof-ieee.c
>Audit-Trail:
>Unformatted: