Q121368
The Disassembly window of the Visual Workbench Integrated Debugger does not display the correct information for modules containing Pentium-specific (P5) instructions. These instructions may be displayed as '???', and may cause assembly instructions that follow the Pentium-specific instruction to be displayed incorrectly.
The Visual C++ debugger does not support Pentium instructions in the disassembly window.
While the compiler supports Pentium optimizations (/G5), it does not
support generating Pentium-specific instructions. This problem will usually
occur only with tools such as the Microsoft Macro Assembler, which does
support Pentium instructions.
The following sample code demonstrates the problem by using the CPUID
command. Because the compiler and inline assembler won't generate this
instruction directly, the __asm _emit instruction is used to insert the
opcode directly into the code.
/* Compile options needed: Visual Workbench default options for
* debug build.
*/
#include <stdio.h>
void main (void)
{
int CPUType;
_asm {
_emit 0x0f ; CPUID (00001111 10100010) - This is a Pentium
; specific instruction which gets information on the
_emit 0xa2 ; processor. A Pentium family processor should set
; bits 11-8 of eax to 5.
mov CPUType, eax ; Move result of CPUID to CPU variable
}
CPUType = (CPUType >> 8) & 0x000f;
if (CPUType == 5)
printf("This is a Pentium family processor.\n");
else
printf("This is not a Pentium family processor.\n");
}
Additional query words:
Keywords : kbhw kbDebug kbide kbHardware
Issue type : kbprb
Technology :
|
Last Reviewed: July 30, 2001 |