__getReg() and __setReg()

getReg() and setReg() are intrinsics defined by the Intel C++ compiler (in ia64intrin.h) to get and set registers. These are not implemented by gcc (or I believe the Microsoft compiler), so to work around them in gcc you will need to just simply drop in a line of inline asm or use register variables. You should be able to declare variables that represent a register like :

register long r8 asm("r8");

or if you need the specific value of a register in a variable use

unsigned long value;
asm volatile ("mov %0=r8" : "=r"(value));

Registers are given special #defined names which are given on page 302 of the Intel C++ Compiler manual, available from http://www.intel.com/software/products/compilers/techtopics/c_ug_lnx.pdf

IA64wiki: getreg (last edited 2009-12-10 03:13:45 by localhost)

Gelato@UNSW is sponsored by
the University of New South Wales National ICT Australia The Gelato Federation Hewlett-Packard Company Australian Research Council
Please contact us with any questions or comments.