Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Oniel_K_Intel
Employee
115 Views

RDTSCP Question

Platform environment:
i5-661 on Intel TomCove board DH55TC, Win 7 Ultimate (x32), VS2008 w/SP1, Intel C++ Compiler version 11.0.066.

Question is trying to execute RDTSCP instruction. RDTSC works. Using Intel C++ in MS VS2008 IDE.

Error is:- "error: unkown opcode "RDTSCP" -- __asm"

When I switch to using Use Visual C++ RDTSCP code compiles and executes. Problem is I want to use Intel C++ Compiler.

code snippet:-

__int64 StartCPUCycle(void)

{

__int64 cyclesStart;

__asm

{// retrieve the clock-cycles for the start value:

RDTSC // works
//RDTSCP //does not work

mov DWORD PTR cyclesStart, eax

mov DWORD PTR [cyclesStart + 4], edx

}

return cyclesStart;

}


any thoughts, solutions???

Oniel...

0 Kudos
3 Replies
Feilong_H_Intel
Employee
115 Views

Hi Oniel,

Were you using which version of Visual Studio? I tried VS2008, which doesn't recognize RDTSCP either.

As a workaround, you may use the intrinsic __rdtscp. See http://msdn.microsoft.com/en-us/library/bb385235.aspx

Thanks,
Feilong
Oniel_K_Intel
Employee
115 Views

Hi Feilong,

Thanks for the link.

I am using VS2008 with SP1. I got RDTSCP to compile using VS2008 C++.

My question was more directed to why Intel C++ would not compile RDTSCP. After further analysis,
ia32intrin.h header file for Intel compiler does not support RDTSCP.

Oniel...
TimP
Black Belt
115 Views

Should be present in ICL . You may need an upgrade to support instructions which weren't present at the time your ICL was built.
Reply