coreboot-kgpe-d16/util/romcc/tests/simple_test19.c
Eric Biederman 0babc1c116 - Implement support for structures, typedefs, and __builtin_rdmsr, __builtin_wrmsr in romcc
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@819 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2003-05-09 02:39:00 +00:00

24 lines
353 B
C

static void hlt(void)
{
__builtin_hlt();
}
typedef __builtin_msr_t msr_t;
static msr_t rdmsr(unsigned long index)
{
return __builtin_rdmsr(index);
}
static void wrmsr(unsigned long index, msr_t msr)
{
__builtin_wrmsr(index, msr.lo, msr.hi);
}
static void main(void)
{
msr_t msr;
msr = rdmsr(0x1234);
msr.lo &= ~(1<<5);
wrmsr(0x1234, msr);
}