0001
0002
0003
0004
0005 #include <asm/ppc-opcode.h>
0006 #include <asm/reg.h>
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 static inline int vas_copy(void *crb, int offset)
0020 {
0021 asm volatile(PPC_COPY(%0, %1)";"
0022 :
0023 : "b" (offset), "b" (crb)
0024 : "memory");
0025
0026 return 0;
0027 }
0028
0029 static inline int vas_paste(void *paste_address, int offset)
0030 {
0031 u32 cr;
0032
0033 cr = 0;
0034 asm volatile(PPC_PASTE(%1, %2)";"
0035 "mfocrf %0, 0x80;"
0036 : "=r" (cr)
0037 : "b" (offset), "b" (paste_address)
0038 : "memory", "cr0");
0039
0040
0041 return (cr >> CR0_SHIFT) & 0xE;
0042 }