2 * Copyright (C) 2020 Collabora Ltd.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * Authors (Collabora):
24 * Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
27 #ifndef __BIFROST_COMPILER_H
28 #define __BIFROST_COMPILER_H
30 /* Bifrost opcodes are tricky -- the same op may exist on both FMA and
31 * ADD with two completely different opcodes, and opcodes can be varying
32 * length in some cases. Then we have different opcodes for int vs float
33 * and then sometimes even for different typesizes. Further, virtually
34 * every op has a number of flags which depend on the op. In constrast
35 * to Midgard where you have a strict ALU/LDST/TEX division and within
36 * ALU you have strict int/float and that's it... here it's a *lot* more
37 * involved. As such, we use something much higher level for our IR,
38 * encoding "classes" of operations, letting the opcode details get
39 * sorted out at emit time.
41 * Please keep this list alphabetized. Please use a dictionary if you
42 * don't know how to do that.
66 BI_SPECIAL
, /* _FAST, _TABLE on supported GPUs */
72 struct list_head link
; /* Must be first */
77 struct list_head link
; /* must be first */
78 struct list_head instructions
; /* list of bi_instructions */
83 struct list_head blocks
; /* list of bi_block */