CPUID for x64 Platforms and Microsoft Visual Studio* .NET 2005
Visual Studio .NET 2005 Training Tutorial 64 Bit vs 32 Bit: When targeting x64 platforms in Visual Studio .NET 2005, programmers are no longer able to use inline assembly code as they did for 32-bit code. This forces the programmer to either rely on C/C++ code using intrinsics, or to tediously create a 64-bit MASM (.asm) version of the function.

by Eric Palmer

When targeting x64 platforms in Visual Studio .NET* 2005, programmers are no longer able to use inline assembly code as they did for 32-bit code. This forces the programmer to either rely on C/C++ code using intrinsics, or to tediously create a 64-bit MASM (.asm) version of the function. Unfortunately, the VS .Net 2005 implementation of the intrinsic for CPUID (__cpuid) recognizes only input arguments in the register eax, and not the more recently defined inputs in ecx, which are required for queries regarding cache parameters and certain multi-core characteristics. Thus, a 64-bit .asm listing is required for full use of the CPUID instruction.

The following code samples demonstrate how to use the CPUID and RDTSC instructions with VS .Net 2005 for 64-bit (x64) platforms. The CPUID instruction is commonly used to obtain detailed information about the system’s CPU(s), and RDTSC is used to read the CPU’s internal time-stamp counter for timing and performance-measurement purposes. The RDTSC intrinsic (__rdtsc) does work as expected and can be used to replace inline assembly.

If you're interested in this topic, these articles may be helpful:

User's Guide: Intel Persistant Storage Manager (Intel PSM): Software for Microsoft Windows CE
Intel® PSM Software Overview Intel® Persistent Storage Mana...
Creating C# wrappers for Intel Integrated Performance Primitives using Microsoft .NET interoperability mechanisms
from Intel Corp. One of the beauties of .NET is that an object wri...
Microsoft Plans to Support Intel Virtualization Technology in 2006
“Over the next couple of years, virtualization will transform th...
How to use all of CPUID for x64 platforms under Microsoft Visual Studio .NET 2005
by Eric Palmer. Intel Corp. When targeting x64 platforms in Visual ...
Microsoft Windows Vista and Intel vPro Technology: Transform your Workplace
Get Ready to Transform Your Workplace Inspiring New Levels of Agili...

Related Jobs:

Lead Software Development Engineer #142625 - WA - Redmond - Microsoft Corporation
Do you want to be part of the team that defines the next generation dr...
Ims V9 Database Analyst #330 - KY - Louisville - RCG Information Technology
Description: All applicants must have a minimum of 3 years IT Indu...
Engineer-Embedded Software #18620 - MI - Auburn Hills - MSX International
Description: We are currently seeking an Embedded Software Engineer...
C/C++ Embedded Software/Firmware Engineer - IL - Glen Ellyn - SSI Embedded Systems Programming
Full-time Permanent Job Description: From written specifications, th...
Software Development Engineer in Test #151333 - WA - Redmond - Microsoft Corporation
The Common Language Runtime -CLR- stress test team is looking for a so...
Sr. Data Base Administrator/Architect, Oracle 10g #05-141 - CA - San Carlos - Postini, Inc.
05-141 Job Title: Sr. Data Base Administrator/Architect, Oracle 1...
Senior Consultant #151594 - WA - Bellevue - Microsoft Corporation
This position requires a mix of advanced technology and strategic busi...
Engagement Manager or Sr. Systems Engineer - MD - Fredrick - Yakabod
Join in the Adventure. Yakabod, a web software and services company, ...
Software Development Engineer #149943 - WA - Redmond - Microsoft Corporation
Have you been part of the explosion in authoring movies, photos, and m...
Software Development Engineer #150234 - WA - Redmond - Microsoft Corporation
We here at adCenter are dedicated to create high end and innovative ad...