Most of x87 is unimplemented, partially because x87 is largely
unnecessary these days, and partially because we never decided on a
solid strategy for implementing it. Some of the basics are there like
the floating point registers behaving like a stack. As far as the
floating point status register, off hand I don't think it's of much
practical use for many things people would want to run on gem5. For most
things I don't think rounding modes or exception bits matter much. I
think glibc sets up that register when it starts, but that's probably
just to put it in a known/default state.

Gabe

On 05/20/12 20:51, Marc Orr wrote:
> Hi All,
>
> I was looking at 2 of the outstanding spec06 patches from Vince Weaver
> that implement x87 instructions. One implements the x87 fsincos
> instruction. The other implements the x87 fnstsw instruction. I wrote
> a little test program to exercise both of these instructions. The
> program runs on a real x86 machine correctly. When I run it in the
> simulator, even with these patches applied, it does not work.
>
> What I found was that other x87 instructions, normally used in
> conjunction with these two instructions seem unimplemented.
>
> fsincos: Gets its source from the floating point stack. All of the
> instructions I came across that operate on the floating point stack
> (fld, fst, fstp, fxchg) are not currently implemented in gem5.
> fnstsw: Retrieves a value from the floating point status register.
> When I did a grep on the gem5 source, I didn't see any instructions
> updating the floating point status register.
>
> I am missing something here? Is there any way to exercise these
> instructions in gem5? Can we put stuff on the floating point stack so
> that fsincos is actually useful? Do any instructions ever actually
> update the floating point status register?
>
> Thanks,
> Marc
> _______________________________________________
> gem5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/gem5-dev

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to