Message-ID: <3294F710.32E6@skygames.com> Date: Thu, 21 Nov 1996 16:42:56 -0800 From: Kevin Baca Organization: BlueSky Software MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: pentium RDMSR instruction References: <571ku3$gf1 AT news2 DOT noc DOT netcom DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit mcarter@@delorie.com wrote: > > I've got the new DJGPP binaries 2.7 for v2.1 and the assembler now recognizes > Pentium instructions - great! RDTSC works fine but RDMSR does not. It gets > encoded as 0x0F,0x32 which is right but I get the following error when it is run: > > >Exiting due to signal SIGILL > >Invalid Opcode at eip=00001581 > >eax=d2504e7b ebx=0004e080 ecx=00000011 edx=00000dcf esi=00000054 edi=0000c4d0 > >ebp=0004c4a4 esp=0004c488 program=C:\UTILS\GNU\A.EXE > >cs: sel=00d7 base=00400000 limit=0005ffff > >ds: sel=00df base=00400000 limit=0005ffff > >es: sel=00df base=00400000 limit=0005ffff > >fs: sel=00b7 base=0001dfe0 limit=0000ffff > >gs: sel=00ef base=00000000 limit=ffffffff > >ss: sel=00df base=00400000 limit=0005ffff > > > >Call frame traceback EIPs: > > 0x00001581 > > 0x00001b2e > > Anyone else get this problem? Should I have posted this to an assembly > news group? I gave the wrong answer on this same question today. I suggested using __asm__ __volatile__ instead of just plain __asm__. The real problem (I think) is that these instructions are priveleged instructions and therefore can only be executed from a ring 0 process (e.g. kernel code). You need a DPMI host that allows your program to run in ring 0. I'm not sure if Windows does this. I know CWSDPMI does not. But CWSDPR0 does. You should be able to get CWSDPRO.EXE from the same place you got CWSDPMI.EXE (I think). -Kevin