zephyr/include/arch/arc/tool-compat.h
Wayne Ren d67475ab6e ARC: handle the difference of assembly macro definition
GNU toolchain and MWDT (Metware) toolchain have different style
for accessing arguments in assembly macro. Implement the
preprocessor macro to handle the difference.

Make all ASM macros in swap_macros.h compatible for both ARC
toolchains.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-09-05 10:22:56 -05:00

26 lines
653 B
C

/*
* Copyright (c) 2020 Synopsys.
* Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ARCH_ARC_TOOL_COMPAT_H_
#define ZEPHYR_INCLUDE_ARCH_ARC_TOOL_COMPAT_H_
#ifdef _ASMLANGUAGE
/*
* GNU toolchain and MWDT (Metware) toolchain have different style for accessing
* arguments in assembly macro. Here is the preprocessor macro to handle the
* difference.
* __CCAC__ is a pre-defined macro of metaware compiler.
*/
#if defined(__CCAC__)
#define MACRO_ARG(x) x
#else
#define MACRO_ARG(x) \x
#endif
#endif /* _ASMLANGUAGE */
#endif /* ZEPHYR_INCLUDE_ARCH_ARC_TOOL_COMPAT_H_ */