[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [Paolo Mantegazza <mantegazza@aero.polimi.it>] (fwd)



>From owner-rtl Thu May 17 08:54:54 2001
Received: from server.aero.polimi.it (server.aero.polimi.it [131.175.154.199])
	by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f4HEsrr17964
	for <rtl@rtlinux.org>; Thu, 17 May 2001 08:54:54 -0600
Received: from aero.polimi.it (mante@pc-mante.aero.polimi.it [131.175.154.67])
	by server.aero.polimi.it (8.11.0/8.11.0) with ESMTP id f4HEnkc25913;
	Thu, 17 May 2001 16:49:50 +0200 (MEST)
Sender: mante@aero.polimi.it
Message-ID: <3B03CC9A.947FEB43@aero.polimi.it>
Date: Thu, 17 May 2001 15:05:30 +0200
From: Paolo Mantegazza <mantegazza@aero.polimi.it>
Organization: Dipartimento di Ingegneria Aerospaziale, Politecnico di Milano
X-Mailer: Mozilla 4.04 [en] (X11; I; Linux 2.4.0-test1 i686)
MIME-Version: 1.0
To: Laurent.Kersten@alcatel.be, rtl@rtlinux.org
Subject: Re: [rtl] Bug in llimd in RTAI (version 1.5 and 1.6)
References: <C1256A4E.00342E59.00@bemail04.net.alcatel.be>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Laurent.Kersten@alcatel.be wrote:
> 
> Hello,
> 
> Whether I try to use llimd with a negative number as first argument, I got a crash (or an
> arithmetic exception if I use the function in a normal linux process).
> 
> The following call crash : llimd ( -25 000 000,400 000 000, 1000 000)
> But the following seems OK :   llimd ( 25 000 000,400 000 000, 1000 000)
> 
> In a non RT task, the exception is generated by the first div instruction. According to Intel's
> documentation, it should trigger an exception when the result is too big for the target register, this seems not to be the case (as long as we don't treat the EDX:EAX pairs has an unsigned number but as a negative one, it should be no problem).
> 
> Does anybody have a clue for that ?

The name is a misnomer, it should be ullmid. It so by design, it is up
to you to wrap it with a test for the sign. See nano2count and
count2nano in RTAI schedulers.

Ciao, Paolo..