xref: /linux/arch/csky/abiv1/inc/abi/reg_ops.h (revision fd7d598270724cc787982ea48bbe17ad383a8b7f)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 
3 #ifndef __ABI_REG_OPS_H
4 #define __ABI_REG_OPS_H
5 #include <asm/reg_ops.h>
6 
7 #define cprcr(reg)					\
8 ({							\
9 	unsigned int tmp;				\
10 	asm volatile("cprcr %0, "reg"\n":"=b"(tmp));	\
11 	tmp;						\
12 })
13 
14 #define cpwcr(reg, val)					\
15 ({							\
16 	asm volatile("cpwcr %0, "reg"\n"::"b"(val));	\
17 })
18 
19 static inline unsigned int mfcr_hint(void)
20 {
21 	return mfcr("cr30");
22 }
23 
24 static inline unsigned int mfcr_ccr2(void) { return 0; }
25 
26 #endif /* __ABI_REG_OPS_H */
27