Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
assembler.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: Apache-2.0 */
2
/*
3
* Copyright (C) 2021 Synopsys, Inc. (www.synopsys.com)
4
*
5
* Author: Vineet Gupta <vgupta@synopsys.com>
6
*
7
* Top level include file provding ISA pseudo-mnemonics for use in assemmler
8
* and inline assembly.
9
*
10
* - Helps code reuse across ARC64/ARC32/ARCv2
11
* e.g. "LDR" maps to 'LD' on 32-bit ISA, 'LDL' on 64-bit ARCv2/ARC64
12
*
13
* - Provides emulation with multiple instructions if the case be
14
* e.g. "DBNZ" implemented using 'SUB' and 'BRNE'
15
*
16
* - Looks more complex than it really is: mainly because Kconfig defines
17
* are not "honored" in inline assembly. So each varaint is unconditional
18
* code in a standalone file with Kconfig based #ifdef'ry here. During the
19
* build process, the "C" preprocessor runs through this file, leaving
20
* just the final variant include in code fed to compiler/assembler.
21
*/
22
23
#ifndef __ASM_ARC_ASM_H
24
#define __ASM_ARC_ASM_H 1
25
26
#ifdef _ASMLANGUAGE
27
28
#if defined(CONFIG_ISA_ARCV3) && defined(CONFIG_64BIT)
29
#define ARC_PTR .xword
30
#define ARC_REGSZ 8
31
#define ARC_REGSHIFT 3
32
#include "
asm-macro-64-bit-gnu.h
"
33
#else
34
#define ARC_PTR .word
35
#define ARC_REGSZ 4
36
#define ARC_REGSHIFT 2
37
38
#if defined(__CCAC__)
39
#include "
asm-macro-32-bit-mwdt.h
"
40
#else
41
#include "
asm-macro-32-bit-gnu.h
"
42
#endif
/* defined(__CCAC__) */
43
44
#endif
45
46
#else
/* !_ASMLANGUAGE */
47
48
#error "asm-compat macroses used not in assembler code!"
49
50
#endif
/* _ASMLANGUAGE */
51
52
#endif
asm-macro-32-bit-gnu.h
asm-macro-32-bit-mwdt.h
asm-macro-64-bit-gnu.h
include
arch
arc
asm-compat
assembler.h
Generated on Sun Oct 9 2022 09:21:56 for Zephyr API Documentation by
1.9.4