Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jun Sun <jsun@mvista.com>
To: Ralf Baechle <ralf@oss.sgi.com>
Cc: jim@jtan.com, "H . J . Lu" <hjl@lucon.org>, linux-mips@oss.sgi.com
Subject: Re: test machines; illegal instructions
Date: Sun, 7 Oct 2001 10:03:47 -0700	[thread overview]
Message-ID: <20011007100347.A11796@mvista.com> (raw)
In-Reply-To: <20011007033910.C4228@dea.linux-mips.net>; from ralf@oss.sgi.com on Sun, Oct 07, 2001 at 03:39:10AM +0200

[-- Attachment #1: Type: text/plain, Size: 716 bytes --]

On Sun, Oct 07, 2001 at 03:39:10AM +0200, Ralf Baechle wrote:
> On Fri, Oct 05, 2001 at 10:48:15AM -0700, Jun Sun wrote:
> 
> > If your cpu does not have ll/sc instruction, you might be suffering the famous
> > sysmips() problem.  The latest kernel should get you going.
> > 
> > There is also FPU emulation bug which may cause this problem, but that only
> > happens on heavy context switches and FPU usages.
> 
> I've checked in a major bundle of FPU emu fixes last week.  The kernel
> fp code should now produce accurate results and handle exceptions and
> the Flush to Zero bit as per spec.
> 

This particular problem seems still there.  Anybody can try the following
test program on a CPU *without* fpu.

Jun


[-- Attachment #2: kfpe_chk3.c --]
[-- Type: text/plain, Size: 890 bytes --]


/* mipel-linux-gcc -O -o kfpe_chk3 kfpe_chk3.c */

#include <stdio.h>
#include <math.h>
#include <signal.h>
#include <sys/time.h>


double count;
int dummy;
struct itimerval ival;
int icnt=0;

static void alarm_sig_handler(int signum)
{
    int i,j;
    double d;

    if( icnt++ > 500 ){
	icnt = 0;
	/*	printf("count = %f\n", count);*/
    }
    for( i = 0, d = 0.0; d < 1.0; i++, d+=0.1 ){
	count = d;
    }
    setitimer(ITIMER_REAL, &ival, NULL);
    //    alarm(1);
}

int main()
{
    int i,j;
    double d;
    signal(SIGALRM, alarm_sig_handler);

    ival.it_interval.tv_sec = 0;
    ival.it_interval.tv_usec = 0;
    ival.it_value.tv_sec = 0;
    ival.it_value.tv_usec = 10000;
    setitimer(ITIMER_REAL, &ival, NULL);
    //    alarm(1);
    for(;;){
	for( i = 0, d = 0.0; d < 10000.0; i++, d+=0.1 ){
	    count = d;
	}
	signal(SIGALRM, alarm_sig_handler);
    }
    return 0;
}

      reply	other threads:[~2001-10-07 17:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-27  2:12 test machines; illegal instructions Jim Paris
2001-09-27  3:26 ` H . J . Lu
2001-10-04  5:16   ` Jim Paris
2001-10-05 17:48     ` Jun Sun
2001-10-07  1:39       ` Ralf Baechle
2001-10-07 17:03         ` Jun Sun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011007100347.A11796@mvista.com \
    --to=jsun@mvista.com \
    --cc=hjl@lucon.org \
    --cc=jim@jtan.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=ralf@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox