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