www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Error: bad type/size of operands for the cmov instruction

reply "Joseph Cassman" <jc7919 outlook.com> writes:
I cannot figure out why I get this error

   b.d(6): Error: bad type/size of operands 'cmovz'
   Failed: 'dmd' '-v' '-o-' 'b.d' '-I.'

from the following code.

   void main() {
     asm {
       mov    CL,1;
       mov    AL,1;
       cmp    AL,0;
       cmovz  BL,CL;

I get the same error when I use a memory source for the cmov 
instruction, when the other variants of cmov are used, and when 
other register sizes are used (i.e. AX, EAX, and RAX).

Any ideas?
Oct 02 2013
parent "Joseph Cassman" <jc7919 outlook.com> writes:
On Wednesday, 2 October 2013 at 19:35:58 UTC, Joseph Cassman 
 Any ideas?
Looks like my testing was flawed. The docs say that byte values are not supported so I tried the above code with the other operand sizes and it works. Missed the right combination of instructions in testing. Please ignore this thread.
Oct 02 2013