Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
asm-macro-32-bit-gnu.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 * ALU/Memory instructions pseudo-mnemonics for ARCv2 and ARC32 ISA
8 */
9
10.irp cc,,.hi,.nz
11.macro MOVR\cc d, s
12 mov\cc \d, \s
13.endm
14.endr
15
16.irp aa,,.ab,.as,.aw
17.macro LDR\aa d, s, off=0
18 ld\aa \d, [\s, \off]
19.endm
20.endr
21
22.irp aa,,.ab,.as,.aw
23.macro STR\aa d, s, off=0
24 ; workaround assembler barfing for ST r, [@symb, 0]
25 .if \off == 0
26 st\aa \d, [\s]
27 .else
28 st\aa \d, [\s, \off]
29 .endif
30.endm
31.endr
32
33.macro PUSHR r
34 push \r
35.endm
36
37.macro POPR r
38 pop \r
39.endm
40
41.macro LRR d, aux
42 lr \d, \aux
43.endm
44
45.macro SRR d, aux
46 sr \d, \aux
47.endm
48
49.irp cc,,.nz
50.macro ADDR\cc d, s, v
51 add\cc \d, \s, \v
52.endm
53.endr
54
55.irp cc,,.nz
56.macro ADD2R\cc d, s, v
57 add2\cc \d, \s, \v
58.endm
59.endr
60
61.macro ADD3R d, s, v
62 add3 \d, \s, \v
63.endm
64
65.macro SUBR d, s, v
66 sub \d, \s, \v
67.endm
68
69.macro BMSKNR d, s, v
70 bmskn \d, \s, \v
71.endm
72
73.macro LSRR d, s, v
74 lsr \d, \s, \v
75.endm
76
77.macro ASLR d, s, v
78 asl \d, \s, \v
79.endm
80
81.macro ANDR d, s, v
82 and \d, \s, \v
83.endm
84
85.macro ORR, d, s, v
86 or \d, \s, \v
87.endm
88
89.irp cc,ne,eq
90.macro BRR\cc d, s, lbl
91 br\cc \d, \s, \lbl
92.endm
93.endr
94
95.macro BREQR d, s, lbl
96 breq \d, \s, \lbl
97.endm
98
99.macro CMPR op1, op2
100 cmp \op1, \op2
101.endm
workaround assembler barfing for ST if else st aa endif endm endr macro PUSHR r push r endm macro POPR r pop r endm macro LRR aux lr aux endm macro SRR aux sr aux endm irp nz macro ADDR cc v add cc v endm endr irp nz macro ADD2R cc v add2 cc v endm endr macro ADD3R v add3 v endm macro SUBR v sub v endm macro BMSKNR v bmskn v endm macro LSRR v lsr v endm macro ASLR v asl v endm macro ANDR v and v endm macro v or v endm irp eq macro BRR cc lbl br cc lbl endm endr macro BREQR lbl breq lbl endm macro CMPR op1
Definition asm-macro-32-bit-gnu.h:99
irp nz macro MOVR cc s mov cc s endm endr irp aw macro LDR aa s
Definition asm-macro-32-bit-gnu.h:17
irp cc
Definition asm-macro-32-bit-gnu.h:10
irp nz macro MOVR cc s mov cc s endm endr irp aa
Definition asm-macro-32-bit-gnu.h:16
workaround assembler barfing for ST if else st aa endif endm endr macro PUSHR r push r endm macro POPR r pop r endm macro LRR aux lr aux endm macro SRR aux sr aux endm irp nz macro ADDR cc v add cc v endm endr irp nz macro ADD2R cc v add2 cc v endm endr macro ADD3R v add3 v endm macro SUBR v sub v endm macro BMSKNR v bmskn v endm macro LSRR v lsr v endm macro ASLR v asl v endm macro ANDR v and v endm macro v or v endm irp ne
Definition asm-macro-32-bit-gnu.h:89
irp nz macro MOVR cc d
Definition asm-macro-32-bit-gnu.h:11
workaround assembler barfing for ST if else st aa endif endm endr macro PUSHR r push r endm macro POPR r pop r endm macro LRR aux lr aux endm macro SRR aux sr aux endm irp nz macro ADDR cc v add cc v endm endr irp nz macro ADD2R cc v add2 cc v endm endr macro ADD3R v add3 v endm macro SUBR v sub v endm macro BMSKNR v bmskn v endm macro LSRR v lsr v endm macro ASLR v asl v endm macro ANDR v and v endm macro ORR
Definition asm-macro-32-bit-gnu.h:85
irp nz macro MOVR cc s mov cc s endm endr irp aw macro LDR aa off
Definition asm-macro-32-bit-gnu.h:17
workaround assembler barfing for ST r
Definition asm-macro-32-bit-gnu.h:24
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro POPR
Definition asm-macro-32-bit-mwdt.h:34
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro r pop r endm macro aux lr aux endm macro aux sr aux endm macro v add &$suffix v endm macro v add2 &$suffix v endm macro v add3 v endm macro SUBR
Definition asm-macro-32-bit-mwdt.h:59
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro r pop r endm macro aux lr aux endm macro aux sr aux endm macro v add &$suffix v endm macro v add2 &$suffix v endm macro v add3 v endm macro v sub v endm macro v bmskn v endm macro v lsr v endm macro v asl v endm macro v and v endm macro v or v endm macro lbl br &$suffix lbl endm macro lbl breq lbl endm macro CMPR
Definition asm-macro-32-bit-mwdt.h:91
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro r pop r endm macro aux lr aux endm macro SRR
Definition asm-macro-32-bit-mwdt.h:42
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro r pop r endm macro aux lr aux endm macro aux sr aux endm macro v add &$suffix v endm macro v add2 &$suffix v endm macro v add3 v endm macro v sub v endm macro v bmskn v endm macro LSRR
Definition asm-macro-32-bit-mwdt.h:67
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro r pop r endm macro aux lr aux endm macro aux sr aux endm macro v add &$suffix v endm macro v add2 &$suffix v endm macro ADD3R
Definition asm-macro-32-bit-mwdt.h:55
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro r pop r endm macro aux lr aux endm macro aux sr aux endm macro v add &$suffix v endm macro v add2 &$suffix v endm macro v add3 v endm macro v sub v endm macro BMSKNR
Definition asm-macro-32-bit-mwdt.h:63
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro PUSHR
Definition asm-macro-32-bit-mwdt.h:30
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro r pop r endm macro aux lr aux endm macro aux sr aux endm macro v add &$suffix v endm macro v add2 &$suffix v endm macro v add3 v endm macro v sub v endm macro v bmskn v endm macro v lsr v endm macro ASLR
Definition asm-macro-32-bit-mwdt.h:71
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro r pop r endm macro aux lr aux endm macro aux sr aux endm macro v add &$suffix v endm macro v add2 &$suffix v endm macro v add3 v endm macro v sub v endm macro v bmskn v endm macro v lsr v endm macro v asl v endm macro v and v endm macro v or v endm macro lbl br &$suffix lbl endm macro BREQR
Definition asm-macro-32-bit-mwdt.h:87
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro r pop r endm macro aux lr aux endm macro aux sr aux endm macro v add &$suffix v endm macro v add2 &$suffix v endm macro v add3 v endm macro v sub v endm macro v bmskn v endm macro v lsr v endm macro v asl v endm macro ANDR
Definition asm-macro-32-bit-mwdt.h:75
macro s mov &$suffix s endm macro off if else ld &$suffix endif endm macro off if else st &$suffix endif endm macro r push r endm macro r pop r endm macro LRR
Definition asm-macro-32-bit-mwdt.h:38