1 /* SPDX-License-Identifier: Apache-2.0 */ 2 /* 3 * Copyright (C) 2021 Synopsys, Inc. (www.synopsys.com) 4 * 5 * ALU/Memory instructions pseudo-mnemonics for ARCv2 and ARC32 ISA 6 */ 7 8 .macro MOVR, d, s 9 mov\&$suffix d, s 10 .endm 11 12 13 .macro LDR, d, s, off 14 .if $narg == 2 15 ld\&$suffix d, [s] 16 .else 17 ld\&$suffix d, [s, off] 18 .endif 19 .endm 20 21 .macro STR, d, s, off 22 .if $narg == 2 23 st\&$suffix d, [s] 24 .else 25 st\&$suffix d, [s, off] 26 .endif 27 .endm 28 29 30 .macro PUSHR, r 31 push r 32 .endm 33 34 .macro POPR, r 35 pop r 36 .endm 37 38 .macro LRR, d, aux 39 lr d, aux 40 .endm 41 42 .macro SRR, d, aux 43 sr d, aux 44 .endm 45 46 47 .macro ADDR, d, s, v 48 add\&$suffix d, s, v 49 .endm 50 51 .macro ADD2R, d, s, v 52 add2\&$suffix d, s, v 53 .endm 54 55 .macro ADD3R, d, s, v 56 add3 d, s, v 57 .endm 58 59 .macro SUBR, d, s, v 60 sub d, s, v 61 .endm 62 63 .macro BMSKNR, d, s, v 64 bmskn d, s, v 65 .endm 66 67 .macro LSRR, d, s, v 68 lsr d, s, v 69 .endm 70 71 .macro ASLR, d, s, v 72 asl d, s, v 73 .endm 74 75 .macro ANDR, d, s, v 76 and d, s, v 77 .endm 78 79 .macro ORR, d, s, v 80 or d, s, v 81 .endm 82 83 .macro BRR, d, s, lbl 84 br\&$suffix d, s, lbl 85 .endm 86 87 .macro BREQR, d, s, lbl 88 breq d, s, lbl 89 .endm 90 91 .macro CMPR, op1, op2 92 cmp op1, op2 93 .endm 94