Why doesn't this works ???

Why doesn't this works ???

Hello all.

The following snippet compiles fine using the MSVC 6 compiler, but doesn't using intel C++ 8 compiler.
I got these errors (both twice, so 4 errors...):

error: too many C symbol replacements in an assembly language instruction mov res.LowPart, eax
error: label "mov" was referenced but not defined

And this is the code:

static __inline LARGE_INTEGER _GetTicks( void )
__asm {
mov res.HighPart, edx
mov res.LowPart, eax
return res;

How can I solve them??


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

For Intel C++ 8.1 and 9.0, the Microsoft intrinsic
__rdtsc() is implemented. I don't know whether this depends on having the msvc7 library. It's supported in the MS C++ 2003 toolkit. Microsoft has obsoleted application use of asm{} for this purpose. I don't exactly when the corresponding change came into the various Intel 8.x compilers.

There is a small difference in the way this would work on the newer machines. Rather than tieing the counter to the CPU clock, as it used to do, the instruction returns a count of front side bus base clock, multiplied by the intended multiplier corresponding to the full clock speed of the chip. Thus, rdtsc() should continue to run proportional to front side bus speed, regardless of power saving adjustments to CPU speed.

Leave a Comment

Please sign in to add a comment. Not a member? Join today