2 * Copyright 2016-17 IBM Corp.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
9 #include <asm/ppc-opcode.h>
14 * Copy/paste instructions:
17 * Copy contents of address (RA) + effective_address(RB)
18 * to internal copy-buffer.
21 * Paste contents of internal copy-buffer to the address
22 * (RA) + effective_address(RB)
24 static inline int vas_copy(void *crb, int offset)
26 asm volatile(PPC_COPY(%0, %1)";"
28 : "b" (offset), "b" (crb)
34 static inline int vas_paste(void *paste_address, int offset)
39 asm volatile(PPC_PASTE(%1, %2)";"
42 : "b" (offset), "b" (paste_address)
45 /* We mask with 0xE to ignore SO */
46 return (cr >> CR0_SHIFT) & 0xE;