Re: Problem with compiling the VP31 Codec source code.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Oops, wrote that without trying...

__asm _emit 0x66
__asm _emit 0x0F
__asm _emit 0x57
__asm _emit 0xc0

This looks better in the disassembly.

"Gabest" <gabest@xxxxxxxxxxx> wrote in message
news:%23al3dJ2RGHA.5644@xxxxxxxxxxxxxxxxxxxxxxx
Or replace the original __asm line with these two. But I cannot remember
if vc6 understands _emit.

__asm _emit 0x0F
__asm _emit 0x57

They might wanted to check for OS support afterall. (looking at the
function's name tell me this... :)

"Gabest" <gabest@xxxxxxxxxxx> wrote in message
news:uScXjF2RGHA.5108@xxxxxxxxxxxxxxxxxxxxxxx

Try this instead of that weird approach.

int WillametteNewInstructionOSSupport()
{
unsigned int i = 0;
__asm mov eax, 1
__asm cpuid
__asm mov i, edx
return (i & 0x04000000) ? 1 : 0;
}

<ngxfer001@xxxxxxxxx> wrote in message
news:1142257325.972939.283700@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Experts,

I have problem when compiling the VP31 Codec source code. I am using
Visual Studio 6 with the installation of Service Pack 5. I have already
install the pocessor pack and include the "iaxmm.inc".

The ASM files are compiled perfectly. Unfortunately, the inline
assembling code can not recognize the xmm0 to 7 valuables.

I am sure that the ASM files with xmm0 to 7 is recognized and compiled
with no error. But in inline assembler, it compained. Can someone
please point me to the right direction to solve this problem.

To show the error more clearly, a choicen error code segment is shown
below:

int WillametteNewInstructionOSSupport()
{
__try
{
__asm xorpd xmm0, xmm0
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
if(_exception_code())
{
return 0;
}
return 0;
}
return 1;
}

The error is :
C:\Documents and
Settings\ferdinandn\Desktop\vp32\tar\CoreLibs\CpuID\Win32\Wmt_CpuID.cpp(136)
: error C2400: inline assembler syntax error in 'opcode'; found 'xmm0'

I am suspecting that my setup is something wrong, I also place the
linking setting of this project.
/nologo /G6 /MTd /W3 /Gm /GX /Zi /Od /I "..\..\Include" /I
"..\..\..\Include" /I "Include" /I "..\..\..\Include\VP31" /I
"..\..\Include\VP31" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D
"_USRDLL" /D "VP31VFW_EXPORTS" /D "VP30_COMPRESS" /D "DXV_DECOMPRESS"
/Fo"Debug/" /Fd"Debug/" /FD /GZ /c

Thank you for helping me.

Best Regards
Ferdinand







.



Relevant Pages

  • Re: Problem with compiling the VP31 Codec source code.
    ... Or replace the original __asm line with these two. ... int WillametteNewInstructionOSSupport() ... I have problem when compiling the VP31 Codec source code. ... I am sure that the ASM files with xmm0 to 7 is recognized and compiled ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Problem with compiling the VP31 Codec source code.
    ... int WillametteNewInstructionOSSupport() ... __asm mov eax, 1 ... I am sure that the ASM files with xmm0 to 7 is recognized and compiled ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Performance of hand-optimised assembly
    ... Why not use unsigned for sum in the test harness? ... int is better yet because the output will then be same across machines. ... gcc -O3 seems ... but taking an average by eye my best asm version was *slower* than ...
    (comp.lang.c)
  • Re: 13 year old C source code
    ... old ASM and C source code for the purpose of compiling a ... The source code was last modified in November of 1998 and was compiled ... why do you want to preserve the ASM ... for suggested search phrases. ...
    (comp.lang.c)
  • Re: inline assembly
    ... The word 'asm' is a syntax error. ... named asm which takes char * and returns int, ... The keyword asm has been a part of the C language for a long time. ... The following extensions are widely used in many systems, ...
    (comp.lang.c)