- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is hard to figure out, help would be appreciated.
have the following code segment compiling and linking and executes when I use the Intel Compiler 64bit version, however I get the following error when I use th 32bit compiler.I have included the switches also:
icpc -O2 -Wall -m32 -g3 -use-masm
error: label "RAX" was referenced but not defined, mov RAX, 0x1
compliation aborted (code 2)
unsigned long long regRAX = 0;
__asm
{
mov RAX, 0x1
CPUID
move regRAX, RAX
}
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're trying to compile 64-bit assembler codes with 32-bit C++ compiler and, of course, it is Not supported. Here is a small example:
RTbool IsCPUFeaturePresent( RTuint uiRequestFeature )
{
RTuint uiFeatureRegCX = 0x0;
RTuint uiFeatureRegDX = 0x0;
__try
{
_asm
{
MOV eax, 1
CPUID
MOV uiFeatureRegCX, ecx
MOV uiFeatureRegDX, edx
}
}
...
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page