The current code seems correct to me too (it is the same as the x86
"reference").
Fabrice.
Stefan Weil wrote:
Dirk Behme schrieb:
>
> Fix overflow conditions for MIPS add/subtract as proposed by
> Daniel Jacobowitz.
>
> http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00538.html
On Mon, May 01, 2006 at 08:42:08PM +0200, Stefan Weil wrote:
> >- if (((tmp ^ T1 ^ (-1)) & (T0 ^ T1)) >> 31) {
> >+ if (~(T0 ^ T1) & (T0 ^ tmp) & 0x8000) {
> Hello Dirk,
>
> which additions / subtractions are handled incorrectly by the current code?
> Here is the result of a test which shows
OK. I hope this is correct now :-)
Just a note : there is already a lot of code in QEMU to compute
correctly the overflow and carry flags (for example in the i386
target)... don't spend your time on reinventing them !
Fabrice.
Dirk Behme wrote:
Fix overflow conditions for MIPS add/subtract
Dirk Behme schrieb:
>
> Fix overflow conditions for MIPS add/subtract as proposed by
> Daniel Jacobowitz.
>
> http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00538.html
>
> Regards
>
> Dirk
>
>
>
>--- target-mips/op.c
Fix overflow conditions for MIPS add/subtract as proposed by
Daniel Jacobowitz.
http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00538.html
Regards
Dirk
--- target-mips/op.c_orig 2006-04-30 09:40:46.0 +0200
+++ target-mips/op.c2006-04-30 09:41:52.0 +0200
@@ -2
> > -if ((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31)) {
> > +if (((tmp ^ T1 ^ (-1)) & (T0 ^ T1)) >> 31) {
> > + /* operands of same sign, result different sign */
> > CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW);
> > }
>
> I see this went in, but - huh? The math doe
On Fri, Apr 28, 2006 at 04:51:39PM +0200, Dirk Behme wrote:
> Daniel Jacobowitz wrote:
> >I haven't tested the patched qemu, but I did test the expressions
> >themselves in standalone code, and they definitely do not detect
> >overflow.
>
> Maybe you can test Ralf's alternative proposal
>
> http:
Daniel Jacobowitz wrote:
I haven't tested the patched qemu, but I did test the expressions
themselves in standalone code, and they definitely do not detect
overflow.
Maybe you can test Ralf's alternative proposal
http://lists.gnu.org/archive/html/qemu-devel/2006-02/msg00154.html
as well?
Tha
On Thu, Apr 13, 2006 at 08:49:19PM +0200, Stefan Weil wrote:
> -if ((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31)) {
> +if (((tmp ^ T1 ^ (-1)) & (T0 ^ T1)) >> 31) {
> + /* operands of same sign, result different sign */
> CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW);
>
Hi,
I had problems with MIPS system emulation (AR7 based DSL router)
which were caused by wrong overflow exceptions.
With the patch given below emulation works. See this link for
first results: http://forum.openwrt.org/viewtopic.php?id=4381
In user mode emulation, the MIPS emulation currently i
10 matches
Mail list logo