1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 #ifndef __ASM_XWREG_H 3 #define __ASM_XWREG_H 4 5 #include <asm/types.h> 6 7 #define __xwreg_t_x u64 8 #define __xwreg_t_w u32 9 #define xwreg_t(xw) __xwreg_t_##xw 10 11 /* 12 * Zero extend 'v' from 'sz' bits (8/16/32/64) to fill an X or W register. 13 */ 14 #define xwreg_zero_extend(v, xw, sz) ((xwreg_t(xw))(u##sz)(v)) 15 16 #endif /* __ASM_XWREG_H */ 17