On Thu, Feb 10, 2005 at 10:08:20AM -0000, Charles Dobson wrote:
>I am not sure if I should post this here or on bugzilla.

Definitely here so that more people will see it and have a chance
to comment.

>While trying to get a Silicon Motion SM722 video controller
>working with Solaris, I have discovered a problem with the
>emulation of the SHLD and SHRD (double precision shift)
>instructions of the x86 emulator.
>According to the Intel Pentium User Guide Vol 3, these
>instructions can shift upto 31 bits with both 16 and 32
>bit operands. The emulator code will only work with shifts
>of upto 15 bits for 16 bit operands.

As Tim pointed out, that behaviour is documented as undefined.
However, if emulating it this way helps for that controller, then
that's probably how we should do it.

>The file is 
>xc/extras/x86emu/src/x86emu/prim_ops.c
>
>I have modified the two functions as below.
>I am not positive the flags are set correctly so
>would appreciated someone else to check these.

Since the flags are also undefined for that case, setting them this way
looks OK to me.

If there are no further comments, I'll commit your changes.

Thanks.

David
_______________________________________________
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel

Reply via email to