xref: /freebsd/contrib/llvm-project/llvm/lib/Target/Sparc/SparcPrefetchTags.td (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1//===- SparcPrefetchTags.td --------------------------------*- tablegen -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the symbolic operands permitted for various kinds of
10// SPARCv9 prefetches.
11//
12//===----------------------------------------------------------------------===//
13
14class PrefetchTag<string name, bits<8> op> {
15  string Name = name;
16  bits<8> Encoding = op;
17}
18
19def PrefetchTagsList : GenericTable {
20  let FilterClass = "PrefetchTag";
21  let Fields = ["Name", "Encoding"];
22
23  let PrimaryKey = [ "Encoding" ];
24  let PrimaryKeyName = "lookupPrefetchTagByEncoding";
25}
26
27def lookupPrefetchTagByName : SearchIndex {
28  let Table = PrefetchTagsList;
29  let Key = [ "Name" ];
30}
31
32def : PrefetchTag<"n_reads", 0x0>;
33def : PrefetchTag<"one_read", 0x1>;
34def : PrefetchTag<"n_writes", 0x2>;
35def : PrefetchTag<"one_write", 0x3>;
36def : PrefetchTag<"page", 0x4>;
37def : PrefetchTag<"unified", 0x11>;
38def : PrefetchTag<"n_reads_strong", 0x14>;
39def : PrefetchTag<"one_read_strong", 0x15>;
40def : PrefetchTag<"n_writes_strong", 0x16>;
41def : PrefetchTag<"one_write_strong", 0x17>;
42