xref: /freebsd-src/contrib/llvm-project/llvm/lib/Target/CSKY/CSKYInstrAlias.td (revision 81ad626541db97eb356e2c1d4a20eb2a26a766ab)
1*81ad6265SDimitry Andric//===-- CSKYInstrAlias.td - Target Description for CSKY ----*- tablegen -*-===//
2*81ad6265SDimitry Andric//
3*81ad6265SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*81ad6265SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
5*81ad6265SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*81ad6265SDimitry Andric//
7*81ad6265SDimitry Andric//===----------------------------------------------------------------------===//
8*81ad6265SDimitry Andric//
9*81ad6265SDimitry Andric// This file describes the CSKY instructions alias.
10*81ad6265SDimitry Andric//
11*81ad6265SDimitry Andric//===----------------------------------------------------------------------===//
12*81ad6265SDimitry Andric
13*81ad6265SDimitry Andricdef : InstAlias<"nop", (MOV16 R0, R0)>;
14*81ad6265SDimitry Andricdef : InstAlias<"nop", (MOV32 R0, R0)>, Requires<[iHasE2]>;
15*81ad6265SDimitry Andric
16*81ad6265SDimitry Andricdef : InstAlias<"bgeni16 $dst, $imm", (BGENI GPR:$dst, uimm5:$imm)>;
17*81ad6265SDimitry Andricdef : InstAlias<"bgeni32 $dst, $imm", (BGENI GPR:$dst, uimm5:$imm)>;
18*81ad6265SDimitry Andric
19*81ad6265SDimitry Andricdef : InstAlias<"bsr $dst", (BSR32 call_symbol:$dst)>;
20*81ad6265SDimitry Andric
21*81ad6265SDimitry Andricdef : InstAlias<"grs\t$rz, $offset", (GRS32 GPR:$rz, bare_symbol:$offset)>;
22*81ad6265SDimitry Andric
23*81ad6265SDimitry Andricdef : InstAlias<"jbsr\t$src1", (JBSR32 call_symbol:$src1)>;
24*81ad6265SDimitry Andric
25*81ad6265SDimitry Andricdef : InstAlias<"jbr $dst", (JBR16 br_symbol_16bit:$dst)>;
26*81ad6265SDimitry Andricdef : InstAlias<"jbt $dst", (JBT16 C, br_symbol_16bit:$dst)>;
27*81ad6265SDimitry Andricdef : InstAlias<"jbf $dst", (JBF16 C, br_symbol_16bit:$dst)>;
28*81ad6265SDimitry Andric
29*81ad6265SDimitry Andricdef : InstAlias<"lrw $rz, $src", (PseudoLRW16 mGPR:$rz, bare_symbol:$src)>;
30*81ad6265SDimitry Andricdef : InstAlias<"lrw $rz, $src", (LRW16 mGPR:$rz, constpool_symbol_16bit:$src)>;
31*81ad6265SDimitry Andricdef : InstAlias<"lrw $rz, $src", (PseudoLRW32 GPR:$rz, bare_symbol:$src)>;
32*81ad6265SDimitry Andricdef : InstAlias<"lrw $rz, $src", (LRW32 GPR:$rz, constpool_symbol:$src)>;
33*81ad6265SDimitry Andric
34*81ad6265SDimitry Andricdef : InstAlias<"jsri $dst", (PseudoJSRI32 call_symbol:$dst)>;
35*81ad6265SDimitry Andricdef : InstAlias<"jsri $dst", (JSRI32 constpool_symbol:$dst)>;
36*81ad6265SDimitry Andric
37*81ad6265SDimitry Andricdef : InstAlias<"jmpi $dst", (PseudoJMPI32 br_symbol:$dst)>;
38*81ad6265SDimitry Andricdef : InstAlias<"jmpi $dst", (JMPI32 constpool_symbol:$dst)>;