Jump to content
  • Advertisement
Sign in to follow this  
Austrian Coder

gcc-2.95 and cpuid

This topic is 5403 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!