So I'm trying compile some C in GCC for windows. Long story short I can't get Visual Studios to compile an EXE that works on XP. So I thought I'd give GCC a try.
The code it's struggling with is:
__asm __volatile ("rdtsc": "=a" (lower), "=d"(upper));
And the error I'm getting is:
HITWxp.c:22:2: error: inconsistent operand constraints in an 'asm'
__asm __volatile ("rdtsc": "=A" (lower), "=D"(upper));
^
Now it compiles when I change the line to this:
__volatile ("rdtsc": "=A" (lower));
I have noticed its converting the "=a" from the first example to the capital "=A" in the second example. So I figured that it's not case sensitive.
The end result needs to be and EXE that works on WinXP/7/8/8.1 x86/x64.
Any ideas?
Thanks in advance!