[Top] [All Lists]

Re: Switch FPU emulator trap to BREAK instruction

To: David Daney <>
Subject: Re: Switch FPU emulator trap to BREAK instruction
From: Muthu Kumaran <>
Date: Fri, 5 Feb 2010 20:29:12 +0000
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=zsV8Tb54eX4Oee3bTSEu13hF27faAt0sYklbXbiZDTo=; b=hRKiTLSIEDdl8IcfbKuqDNheZjcWFC+9jIOiugNNdXe2Z5mJFBuQm0xBn5RReTlMR6 izE+QAncEcKEcPohY7E2LFUr9unFD1eW3aDZPh2ebvbol3RK4DVXizrPdWpfXJ6j6WJZ L+k4+/eFlVnmNROwjL5SlFSSnw18i/C1kKi0o=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=dH3qQOO3PvTplJVi7oHQ8OCwMzaiXMdanRPeJjaeKwTN1GP/q1jJrl4cdH1MDVJKAe VWxe6tW+V2N0OMaar77RK5Ukp2KbjwMxN5oyti/rieGz/rTdRLZQqWp28SjlvxANytoQ Au2J2L13rGq9J/uGGPC/YRK81wu65/HsT5J7M=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
On 5 February 2010 17:36, David Daney <> wrote:
> Muthu Kumaran wrote:
>> I am using 2.6.18 linux version on MIPS32 core. One of the application
>> is using intensive floating point operations. This hardware doesn't
>> have FPU and also the application is not compiled for software
>> floating point support.
>> Hence, it is using the floating point emulation.
>> While running that application, On a timer interrupt there is a normal
>> integer div instruction which gives wrong result in the HI register.
>> However, when I applied the following patch, this problem disappeared.
>> When I looked into the patch, handling of invalid instruction
>> exception is moved from trap to break.
> Incorrect analysis.  It was changed from an Adress Error (ADE) exception to
> a BREAK.
I am sorry, I interpreted from the heading.  The following being
inserted to emulate the delay slot.
#define AdELOAD 0x8c000001      /* lw $0,1($0) */

>> There is no other behavioural change in this patch. I really don't
>> understand the need for this patch, May I ask someone to explain the
>> background information behind this patch? Is this for any known issue?
> The change log states the reason.  FPU emulator delay slot emulation was
> failing on some systems.
In the morning, Ralf had pointed me "This is required only for the
Cavium cnMIPS core; for all other cores
this is just a more elegant implementation."

I think, I put the question in wrong sentence. I intended to ask
whether this fix impact MIPS32 core.
Ralf also pointed me that this fix has nothing to do with the div
error that I am seeing. If I dont have this patch, when I run
intensive floating point operating, I am getting wrong result in HI
register for a div operation.

<Prev in Thread] Current Thread [Next in Thread>