Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
asm-macro-64-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 * pseudo-mnemonics for ALU/Memory instructions for ARC64 ISA
8 */
9
10.irp cc,,.hi,.nz
11.macro MOVR\cc d, s
12 movl\cc \d, \s
13.endm
14.endr
15
16.irp aa,,.ab,.as,.aw
17.macro LDR\aa d, s, off=0
18 ldl\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 stl\aa \d, [\s]
27 .else
28 stl\aa \d, [\s, \off]
29 .endif
30.endm
31.endr
32
33.macro STR d, s, off=0
34 .if \off == 0
35 stl \d, [\s]
36 .else
37 .if \off > 255
38 STR.as \d, \s, \off / 8
39 .else
40 stl \d, [\s, \off]
41 .endif
42 .endif
43.endm
44
45.macro PUSHR r
46 pushl \r
47.endm
48
49.macro POPR r
50 popl \r
51.endm
52
53.macro LRR d, aux
54 lrl \d, \aux
55.endm
56
57.macro SRR d, aux
58 srl \d, \aux
59.endm
60
61.irp cc,,.nz
62.macro ADDR\cc d, s, v
63 addl\cc \d, \s, \v
64.endm
65.endr
66
67.irp cc,,.nz
68.macro ADD2R\cc d, s, v
69 add2l\cc \d, \s, \v
70.endm
71.endr
72
73.macro ADD3R d, s, v
74 add3l \d, \s, \v
75.endm
76
77.macro SUBR d, s, v
78 subl \d, \s, \v
79.endm
80
81.macro BMSKNR d, s, v
82 bmsknl \d, \s, \v
83.endm
84
85.macro LSRR d, s, v
86 lsrl \d, \s, \v
87.endm
88
89.macro ASLR d, s, v
90 asll \d, \s, \v
91.endm
92
93.macro ANDR d, s, v
94 andl \d, \s, \v
95.endm
96
97.macro ORR, d, s, v
98 orl \d, \s, \v
99.endm
100
101.irp cc,ne,eq
102.macro BRR\cc d, s, lbl
103 br\cc\‍()l \d, \s, \lbl
104.endm
105.endr
106
107.macro BREQR d, s, lbl
108 breql \d, \s, \lbl
109.endm
110
111.macro CMPR op1, op2
112 cmpl \op1, \op2
113.endm
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 STR
Definition: asm-macro-32-bit-mwdt.h:21
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
workaround assembler barfing for ST if else stl aa endif endm endr macro STR else if off STR as off else stl endif endif endm macro PUSHR r pushl r endm macro POPR r popl r endm macro LRR aux lrl aux endm macro SRR aux srl aux endm irp nz macro ADDR cc v addl cc v endm endr irp nz macro ADD2R cc v add2l cc v endm endr macro ADD3R v add3l v endm macro SUBR v subl v endm macro BMSKNR v bmsknl v endm macro LSRR v lsrl v endm macro ASLR v asll v endm macro ANDR v andl v endm macro v orl v endm irp eq macro BRR cc lbl br lbl endm endr macro BREQR lbl breql lbl endm macro CMPR op1
Definition: asm-macro-64-bit-gnu.h:111
irp nz macro MOVR cc s movl cc s endm endr irp aw macro LDR aa s
Definition: asm-macro-64-bit-gnu.h:17
irp cc
Definition: asm-macro-64-bit-gnu.h:10
workaround assembler barfing for ST if else stl aa endif endm endr macro STR else if off STR as off else stl endif endif endm macro PUSHR r pushl r endm macro POPR r popl r endm macro LRR aux lrl aux endm macro SRR aux srl aux endm irp nz macro ADDR cc v addl cc v endm endr irp nz macro ADD2R cc v add2l cc v endm endr macro ADD3R v add3l v endm macro SUBR v subl v endm macro BMSKNR v bmsknl v endm macro LSRR v lsrl v endm macro ASLR v asll v endm macro ANDR v andl v endm macro v orl v endm irp ne
Definition: asm-macro-64-bit-gnu.h:101
irp nz macro MOVR cc d
Definition: asm-macro-64-bit-gnu.h:11
workaround assembler barfing for ST if else stl aa endif endm endr macro STR else if off STR as off else stl endif endif endm macro PUSHR r pushl r endm macro POPR r popl r endm macro LRR aux lrl aux endm macro SRR aux srl aux endm irp nz macro ADDR cc v addl cc v endm endr irp nz macro ADD2R cc v add2l cc v endm endr macro ADD3R v add3l v endm macro SUBR v subl v endm macro BMSKNR v bmsknl v endm macro LSRR v lsrl v endm macro ASLR v asll v endm macro ANDR v andl v endm macro ORR
Definition: asm-macro-64-bit-gnu.h:97
irp nz macro MOVR cc s movl cc s endm endr irp aa
Definition: asm-macro-64-bit-gnu.h:16
irp nz macro MOVR cc s movl cc s endm endr irp aw macro LDR aa off
Definition: asm-macro-64-bit-gnu.h:17
workaround assembler barfing for ST r
Definition: asm-macro-64-bit-gnu.h:24