xref: /kernel/linux/linux-5.10/arch/csky/include/asm/reg_ops.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/csky/include/asm/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci#ifndef __ASM_REGS_OPS_H
48c2ecf20Sopenharmony_ci#define __ASM_REGS_OPS_H
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#define mfcr(reg)		\
78c2ecf20Sopenharmony_ci({				\
88c2ecf20Sopenharmony_ci	unsigned int tmp;	\
98c2ecf20Sopenharmony_ci	asm volatile(		\
108c2ecf20Sopenharmony_ci	"mfcr %0, "reg"\n"	\
118c2ecf20Sopenharmony_ci	: "=r"(tmp)		\
128c2ecf20Sopenharmony_ci	:			\
138c2ecf20Sopenharmony_ci	: "memory");		\
148c2ecf20Sopenharmony_ci	tmp;			\
158c2ecf20Sopenharmony_ci})
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#define mtcr(reg, val)		\
188c2ecf20Sopenharmony_ci({				\
198c2ecf20Sopenharmony_ci	asm volatile(		\
208c2ecf20Sopenharmony_ci	"mtcr %0, "reg"\n"	\
218c2ecf20Sopenharmony_ci	:			\
228c2ecf20Sopenharmony_ci	: "r"(val)		\
238c2ecf20Sopenharmony_ci	: "memory");		\
248c2ecf20Sopenharmony_ci})
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#endif /* __ASM_REGS_OPS_H */
27

Indexes created Thu Nov 07 10:32:03 CST 2024