Skip to main content
GameDev.net gamedev.net
🔒 Locked

gcc-2.95 and cpuid

Started by Austrian Coder Oct 7, 2004 at 10:40 AM 0 replies 950+ views
Original Post
Austrian Coder
Austrian Coder
Hi. This little snip compiles fine on a gcc-3.x, but not on a 2.95.

bool cDxr3CPU::Cpuid(unsigned long function, unsigned long& out_eax, unsigned long& out_ebx, unsigned long& out_ecx, unsigned long& out_edx)
{
	asm("cpuid": "=a" (out_eax), "=b" (out_ebx), "=c" (out_ecx), "=d" (out_edx) : "a" (function));
	return true;
}
dxr3cpu.c: In method bool cDxr3CPU::cpuid(long unsigned int, long unsigned int &, long unsigned int &, long unsigned int &, long unsigned int &)': dxr3cpu.c:125: Invalid asm' statement: dxr3cpu.c:125: fixed or forbidden register 3 (bx) was spilled for class BREG. I hope somebody can help me. Thanks, Christian

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.