I think i've found a bug, should / how do i report it.

Derek Parnell derek at psych.ward
Sun Mar 11 18:58:14 PDT 2007


On Mon, 12 Mar 2007 01:43:34 -0000, Chris Warwick wrote:

> Apologys for the previous jibberish.. i've been on honeymoon with D for the 
> last 4 days and havn't had much sleep lol.. So the problem is still there i 
> just wrote out the examples wrong.. getting my movd's and movq's all mixed 
> up.. Anyway copy and past this time so i dont feck up...
> 
> private ulong MMXZERO = 0x0;
>     movq       MM0,MMXZERO;
> 
> compiles fine, as expected.
> 
> But the addition of 'const'
> 
> private const ulong MMXZERO = 0x0;
>     movq       MM0,MMXZERO;
> 
> causes "bad type/size of operands 'movq'"
> 
> cheers
> 
> cw

The MMX instruction 'movq' requires that the source/destination is either
MMX register or an address of a 64-bit value, except that both can't be
addresses. I believe that the DMD compile optimizes the 'const' value to be
a literal zero so you end up with ...

   movq, MM0,0x0

which is not allowed.

-- 
Derek Parnell
Melbourne, Australia
"Justice for David Hicks!"
skype: derek.j.parnell


More information about the Digitalmars-d-learn mailing list