- 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
This commit is contained in:
parent
ba8c25affb
commit
0babc1c116
|
@ -1,5 +1,5 @@
|
|||
VERSION:=0.21
|
||||
RELEASE_DATE:=7 April 2003
|
||||
VERSION:=0.23
|
||||
RELEASE_DATE:=08 May 2003
|
||||
PACKAGE:=romcc
|
||||
|
||||
|
||||
|
@ -30,6 +30,10 @@ TESTS=\
|
|||
simple_test13.c \
|
||||
simple_test14.c \
|
||||
simple_test15.c \
|
||||
simple_test16.c \
|
||||
simple_test17.c \
|
||||
simple_test18.c \
|
||||
simple_test19.c \
|
||||
raminit_test.c \
|
||||
raminit_test2.c
|
||||
|
||||
|
|
3241
util/romcc/romcc.c
3241
util/romcc/romcc.c
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,24 @@
|
|||
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);
|
||||
}
|
Loading…
Reference in New Issue