NO

Author Topic: MMX value doesn't display  (Read 3174 times)

gerdk

  • Guest
MMX value doesn't display
« on: October 12, 2005, 02:03:50 AM »
Hallo, I played around with the IDE (I saw it, i liked it :) great job) and found that this small piece of code didn't match what I expect. The mmx register keeps empty instead of filling with the src[] bytes and the st0 register goes to -infinity (thats what the ide debugger display). I then checked the exe (full debug info, compiled as console app) with Jeremy Gordons Win32 Debugger GoBug and everything goes fine. Could someone check this?

unsigned char src[8] = {10,20,30,40,50,60,70,80};
unsigned char dst[8] = {1,2,3,4,5,6,7,8};

int main(int argc, char *argv[])
{
   /* Inline Assembler */
   __asm
   {
      mov eax, offset src;
      movq mm0,[eax];   // load first 8 bytes of src
      /* ...  */
   }
    return 0;
}


gerdk

gerdk

  • Guest
MMX value doesn't display
« Reply #1 on: October 12, 2005, 02:19:45 PM »
I forgot to tell, this behaves only under my Windows 98 SE (no problem under XP).

gerdk

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
MMX value doesn't display
« Reply #2 on: October 13, 2005, 03:21:29 PM »
I try to look at the Tag Word to see which set of registers is valid: floating-point (stack) or MMX. At least some docs suggest it should be all special (=0xAAAA) when using MMX, which is what I get on Win XP - but I get 0x5556 on Win 98 SE (from GetThreadContext API function).

At the moment I can't find anything about this in the official Intel docs...

Pelle
/Pelle