I'm having problems getting double-precision floating-point to work in
m5 for the MIPS isa.

The 32-bit MIPS isa has 32 32-bit floating-point registers.
Double-precision floating-point numbers are stored in pairs of
floating-point registers.  At least that's how I understand it.

Simple floating point math used to work in m5 until changeset
781969fbeca9.  After the change, it seams that m5 does not read two
32-bit floating point registers to get a double-precision
floating-point operand, but only one 32-bit floating-point register
(when it's simulating an add_d instruction, for example).  This
results in incorrect floating point arithmetic.

I have the following C program (compiled for MIPS) that exercises the problem:

#include<stdio.h>

int main (void)
{
        double x, y, z;

        x = 5.0;
        y = 0.1;

        z = x + y;

        printf ("z = %lf\n", z);

        return 0;
}

It should print "z = 5.1", but it doesn't because the simulation of
the floating-point addition is wrong.

Can anyone tell me why this change was made that seems to break the
simulation of double-precision floating-point arithmetic in m5?

Thanks.

-- 
Cheers,
Matt
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to