This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cr5-6 registers on i386


hi everyone!
short question: if i include an assembler instruction like the following

__asm("movl %0, %%cr5" : : "r"(0x123));

or

__asm("movl %0, %%cr6" : : "r"(0x123));

in a c-program, i do not get any errors when compiling on a x86(i386) cpu. the 
binary codes of the generated statements also differ from

__asm("movl %0, %%cr3" : : "r"(0x123));

(their third hex-numbers are different - what makes sense)... the thing i 
don't understand is: are there registers cr5-cr20 (starting at cr-something 
near 20, i start getting errors that there is no such register).

Is that a bug caused by the multi-platform capability of gcc or are there such 
registers on i386 that i am not aware of (e.g. the intel manual does not name 
them!!)

The thing is: i am modifying a virtual machine and need new control 
registers... in case these control registers registers really don't exist but 
GCC generates useful binary-code, this would be just way cool :-)

hope someone can answer this for me - thanks and greetings,
  Clemens


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]