> 0x66 0x0F 0x3A 0x61 0x06 0x0D: PCMPESTRI for 16-bit characters
>    For this one I am attempting to add the 16-bit versions of those
>    PCMPxSTRx instructions already supported for 8-bit.  Once
>    I have tested it some, I will see about submitting a patch.
>    It's relatively straightforward.

Great.  Please be sure to add test cases to none/tests/amd64/pcmpstr64.c
as that's the only way you can be (even remotely) confident you have it
working correctly.

> 0x66 0xDD 0x4: FRSTOR with size-change prefix.
>    For AMD guest FRSTOR is completely commented out. I am guessing
>    it was originally copied from x86 (since the contents of the
>    commented our code correspond with guest_x86 code) but never
>    really "ported" to AMD. Several runs of HotSpot on DaCapo
>    benchmarks fail under valgrind because this instruction is
>    missing.

I would have thought that FSAVE/FRSTOR in 64 bit mode is essentially
useless, and the fact that we've not so far needed to implement them
kind of supports that suspicion.  Reason is that they don't save or 
restore the XMM registers.  The x86-64 bit ELF ABI requires floating point
values to be in the XMM registers; hence FSAVE/FRSTOR don't succeed in
correctly saving and restoring the CPU's floating point state.  What you
need for that is FXSAVE and FXRSTOR, and they are indeed implemented.

> Could someone perhaps clarify whether it simply hasn't been
> done or if there is some deeper reason why the code was
> commented out?

Instructions don't get implemented until a need arises and a test case is
created.  Experience shows that implementing instructions without proper
test cases leads to nearly impossible to find (literally) emulation bugs.

Oh, and be sure to do your hacking on the svn trunk, not on a tarball tree.
The x86_64 instruction decoding framework got overhauled recently and
you'll have rebasing difficulties if you don't work in the new framework.

J

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to