From a7c587f5cd390f92970c2c4b5a538ac27ea3f119 Mon Sep 17 00:00:00 2001 From: Sergey Matyukevich Date: Tue, 20 Sep 2022 16:14:20 +0400 Subject: arc: add asm macros Add a header file with assembler macros to be able to handle in one place the differences between ARCv2 and ARCv3 ISAs. It is a preparatory step before the introduction of support for ARCv3 CPUs. Signed-off-by: Sergey Matyukevich Signed-off-by: Pavel Kozlov --- libc/sysdeps/linux/arc/asm.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 libc/sysdeps/linux/arc/asm.h (limited to 'libc/sysdeps/linux') diff --git a/libc/sysdeps/linux/arc/asm.h b/libc/sysdeps/linux/arc/asm.h new file mode 100644 index 000000000..f98eb239f --- /dev/null +++ b/libc/sysdeps/linux/arc/asm.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2022, Synopsys, Inc. (www.synopsys.com) + * + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. + */ + +#ifndef _ARC_ASM_H +#define _ARC_ASM_H + + +.macro PUSHR reg + push \reg +.endm + +.macro PUSHR_S reg + push_s \reg +.endm + +.macro POPR reg + pop \reg +.endm + +.macro POPR_S reg + pop_s \reg +.endm + + +#endif /* _ARC_ASM_H */ -- cgit v1.2.3