standard functions

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1195 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Greg Watson 2003-10-05 05:15:48 +00:00
parent b6a259b0d2
commit 5b3b9aa5de
1 changed files with 5 additions and 2 deletions

View File

@ -10,9 +10,12 @@
/* stringify is needed for macro expansion */
#define stringify(x) #x
#define ppc_getdcr(reg) ({unsigned int result; \
#define mfdcr(reg) ({unsigned int result; \
__asm__ volatile("mfdcr %0, " stringify(reg) \
: "=r" (result)); result;})
: "=r" (result)); result;})
#define mtdcr(reg, v) asm volatile("mtdcr " stringify(reg) ",%0" \
: : "r" (v))
extern unsigned ppc_getmsr(void);
extern unsigned ppc_gethid0(void);