Subject: port-m68k/3105: m68k/ldexp.S contains non-68060-only instructions
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/13/1997 22:19:22
>Number:         3105
>Category:       port-m68k
>Synopsis:       libc: m68k/gen/ldexp.S contains non-68060-only instructions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 13 13:35:03 1997
>Originator:     Ingolf Koch
Ingolf Koch     Balin@IRC
FSU Jena, Institut fuer Angewandte Mathematik, 07740 Jena
>Release:        1.2
System: NetBSD 1.2 NetBSD 1.2 (MAUS) #1: Sat Jan 11 04:28:31 MET 1997 amiga


The code for ldexp(3) located in usr/src/lib/libc/arch/m68k/gen/ldexp.S
contains instructions being emulated on 68060 processors.

The result is that a program which makes heavy use of ldexp() (eg. by
calling erand48(3) or so) slows down very much and its execution time
shows a system share of more than 80%.

As I've seen this on a 68040 machine, too, I believe the 68040 has the
same / a similar problem with ldexp().


Compile the following program (with -m68060 option if you want, but has
nearly no effect) and /usr/bin/time its execution time.

#include <math.h>

main(int, char **);

main(int ac, char **av) {
    int i;

    for(i=0; i<1000000; ++i)

    return 0;


None known as I'm no assembler expert.
Just replace the instructions in question by all-680x0 ones. :)