summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-05-05 02:19:08 -0300
committerGravatar ameerj2021-07-22 21:51:30 -0400
commitb10cf64c486d8730fcfeb53a333814915b3b5fbe (patch)
tree59cb4f62ac806071e0f0a341589c164017520f3a
parentshader: ISET.X implementation (diff)
downloadyuzu-b10cf64c486d8730fcfeb53a333814915b3b5fbe.tar.gz
yuzu-b10cf64c486d8730fcfeb53a333814915b3b5fbe.tar.xz
yuzu-b10cf64c486d8730fcfeb53a333814915b3b5fbe.zip
glasm: Add GLASM backend infrastructure
-rw-r--r--src/shader_recompiler/CMakeLists.txt34
-rw-r--r--src/shader_recompiler/backend/glasm/emit_context.cpp7
-rw-r--r--src/shader_recompiler/backend/glasm/emit_context.h21
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm.cpp95
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm.h23
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_barriers.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_bitwise_conversion.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_composite.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_control_flow.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_convert.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_image.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_image_atomic.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_instructions.h650
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp2155
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_select.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_shared_memory.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_special.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp0
-rw-r--r--src/shader_recompiler/backend/glasm/reg_alloc.cpp82
-rw-r--r--src/shader_recompiler/backend/glasm/reg_alloc.h46
-rw-r--r--src/shader_recompiler/frontend/ir/value.h6
28 files changed, 3115 insertions, 4 deletions
diff --git a/src/shader_recompiler/CMakeLists.txt b/src/shader_recompiler/CMakeLists.txt
index 6523615aa..f829b8d32 100644
--- a/src/shader_recompiler/CMakeLists.txt
+++ b/src/shader_recompiler/CMakeLists.txt
@@ -1,5 +1,31 @@
1add_library(shader_recompiler STATIC 1add_library(shader_recompiler STATIC
2 backend/bindings.h 2 backend/bindings.h
3 backend/glasm/emit_context.cpp
4 backend/glasm/emit_context.h
5 backend/glasm/emit_glasm.cpp
6 backend/glasm/emit_glasm.h
7 backend/glasm/emit_glasm_atomic.cpp
8 backend/glasm/emit_glasm_barriers.cpp
9 backend/glasm/emit_glasm_bitwise_conversion.cpp
10 backend/glasm/emit_glasm_composite.cpp
11 backend/glasm/emit_glasm_context_get_set.cpp
12 backend/glasm/emit_glasm_control_flow.cpp
13 backend/glasm/emit_glasm_convert.cpp
14 backend/glasm/emit_glasm_floating_point.cpp
15 backend/glasm/emit_glasm_image.cpp
16 backend/glasm/emit_glasm_image_atomic.cpp
17 backend/glasm/emit_glasm_instructions.h
18 backend/glasm/emit_glasm_integer.cpp
19 backend/glasm/emit_glasm_logical.cpp
20 backend/glasm/emit_glasm_memory.cpp
21 backend/glasm/emit_glasm_not_implemented.cpp
22 backend/glasm/emit_glasm_select.cpp
23 backend/glasm/emit_glasm_shared_memory.cpp
24 backend/glasm/emit_glasm_special.cpp
25 backend/glasm/emit_glasm_undefined.cpp
26 backend/glasm/emit_glasm_warp.cpp
27 backend/glasm/reg_alloc.cpp
28 backend/glasm/reg_alloc.h
3 backend/spirv/emit_context.cpp 29 backend/spirv/emit_context.cpp
4 backend/spirv/emit_context.h 30 backend/spirv/emit_context.h
5 backend/spirv/emit_spirv.cpp 31 backend/spirv/emit_spirv.cpp
@@ -104,8 +130,8 @@ add_library(shader_recompiler STATIC
104 frontend/maxwell/translate/impl/half_floating_point_helper.cpp 130 frontend/maxwell/translate/impl/half_floating_point_helper.cpp
105 frontend/maxwell/translate/impl/half_floating_point_helper.h 131 frontend/maxwell/translate/impl/half_floating_point_helper.h
106 frontend/maxwell/translate/impl/half_floating_point_multiply.cpp 132 frontend/maxwell/translate/impl/half_floating_point_multiply.cpp
107 frontend/maxwell/translate/impl/half_floating_point_set_predicate.cpp
108 frontend/maxwell/translate/impl/half_floating_point_set.cpp 133 frontend/maxwell/translate/impl/half_floating_point_set.cpp
134 frontend/maxwell/translate/impl/half_floating_point_set_predicate.cpp
109 frontend/maxwell/translate/impl/impl.cpp 135 frontend/maxwell/translate/impl/impl.cpp
110 frontend/maxwell/translate/impl/impl.h 136 frontend/maxwell/translate/impl/impl.h
111 frontend/maxwell/translate/impl/integer_add.cpp 137 frontend/maxwell/translate/impl/integer_add.cpp
@@ -145,11 +171,11 @@ add_library(shader_recompiler STATIC
145 frontend/maxwell/translate/impl/surface_load_store.cpp 171 frontend/maxwell/translate/impl/surface_load_store.cpp
146 frontend/maxwell/translate/impl/texture_fetch.cpp 172 frontend/maxwell/translate/impl/texture_fetch.cpp
147 frontend/maxwell/translate/impl/texture_fetch_swizzled.cpp 173 frontend/maxwell/translate/impl/texture_fetch_swizzled.cpp
148 frontend/maxwell/translate/impl/texture_gather_swizzled.cpp
149 frontend/maxwell/translate/impl/texture_gather.cpp 174 frontend/maxwell/translate/impl/texture_gather.cpp
175 frontend/maxwell/translate/impl/texture_gather_swizzled.cpp
150 frontend/maxwell/translate/impl/texture_gradient.cpp 176 frontend/maxwell/translate/impl/texture_gradient.cpp
151 frontend/maxwell/translate/impl/texture_load_swizzled.cpp
152 frontend/maxwell/translate/impl/texture_load.cpp 177 frontend/maxwell/translate/impl/texture_load.cpp
178 frontend/maxwell/translate/impl/texture_load_swizzled.cpp
153 frontend/maxwell/translate/impl/texture_mipmap_level.cpp 179 frontend/maxwell/translate/impl/texture_mipmap_level.cpp
154 frontend/maxwell/translate/impl/texture_query.cpp 180 frontend/maxwell/translate/impl/texture_query.cpp
155 frontend/maxwell/translate/impl/video_helper.cpp 181 frontend/maxwell/translate/impl/video_helper.cpp
@@ -173,8 +199,8 @@ add_library(shader_recompiler STATIC
173 ir_opt/texture_pass.cpp 199 ir_opt/texture_pass.cpp
174 ir_opt/verification_pass.cpp 200 ir_opt/verification_pass.cpp
175 object_pool.h 201 object_pool.h
176 program_header.h
177 profile.h 202 profile.h
203 program_header.h
178 shader_info.h 204 shader_info.h
179) 205)
180 206
diff --git a/src/shader_recompiler/backend/glasm/emit_context.cpp b/src/shader_recompiler/backend/glasm/emit_context.cpp
new file mode 100644
index 000000000..02c4d8a5d
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_context.cpp
@@ -0,0 +1,7 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "shader_recompiler/backend/glasm/emit_context.h" \ No newline at end of file
diff --git a/src/shader_recompiler/backend/glasm/emit_context.h b/src/shader_recompiler/backend/glasm/emit_context.h
new file mode 100644
index 000000000..ae91069c8
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_context.h
@@ -0,0 +1,21 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <string>
8
9#include "shader_recompiler/backend/glasm/reg_alloc.h"
10
11namespace Shader::Backend::GLASM {
12
13class EmitContext {
14public:
15 std::string code;
16 RegAlloc reg_alloc;
17
18private:
19};
20
21} // namespace Shader::Backend::GLASM
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
new file mode 100644
index 000000000..59d7c0f96
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
@@ -0,0 +1,95 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <string>
6#include <tuple>
7
8#include "shader_recompiler/backend/bindings.h"
9#include "shader_recompiler/backend/glasm/emit_context.h"
10#include "shader_recompiler/backend/glasm/emit_glasm.h"
11#include "shader_recompiler/backend/glasm/emit_glasm_instructions.h"
12#include "shader_recompiler/frontend/ir/program.h"
13#include "shader_recompiler/profile.h"
14
15namespace Shader::Backend::GLASM {
16namespace {
17template <class Func>
18struct FuncTraits {};
19
20template <class ReturnType_, class... Args>
21struct FuncTraits<ReturnType_ (*)(Args...)> {
22 using ReturnType = ReturnType_;
23
24 static constexpr size_t NUM_ARGS = sizeof...(Args);
25
26 template <size_t I>
27 using ArgType = std::tuple_element_t<I, std::tuple<Args...>>;
28};
29
30template <typename ArgType>
31auto Arg(EmitContext& ctx, const IR::Value& arg) {
32 if constexpr (std::is_same_v<ArgType, std::string_view>) {
33 return ctx.reg_alloc.Consume(arg);
34 } else if constexpr (std::is_same_v<ArgType, const IR::Value&>) {
35 return arg;
36 } else if constexpr (std::is_same_v<ArgType, u32>) {
37 return arg.U32();
38 } else if constexpr (std::is_same_v<ArgType, IR::Block*>) {
39 return arg.Label();
40 } else if constexpr (std::is_same_v<ArgType, IR::Attribute>) {
41 return arg.Attribute();
42 } else if constexpr (std::is_same_v<ArgType, IR::Patch>) {
43 return arg.Patch();
44 } else if constexpr (std::is_same_v<ArgType, IR::Reg>) {
45 return arg.Reg();
46 }
47}
48
49template <auto func, bool is_first_arg_inst, size_t... I>
50void Invoke(EmitContext& ctx, IR::Inst* inst, std::index_sequence<I...>) {
51 using Traits = FuncTraits<decltype(func)>;
52 if constexpr (is_first_arg_inst) {
53 func(ctx, inst, Arg<typename Traits::template ArgType<I + 2>>(ctx, inst->Arg(I))...);
54 } else {
55 func(ctx, Arg<typename Traits::template ArgType<I + 1>>(ctx, inst->Arg(I))...);
56 }
57}
58
59template <auto func>
60void Invoke(EmitContext& ctx, IR::Inst* inst) {
61 using Traits = FuncTraits<decltype(func)>;
62 static_assert(Traits::NUM_ARGS >= 1, "Insufficient arguments");
63 if constexpr (Traits::NUM_ARGS == 1) {
64 Invoke<func, false>(ctx, inst, std::make_index_sequence<0>{});
65 } else {
66 using FirstArgType = typename Traits::template ArgType<1>;
67 static constexpr bool is_first_arg_inst = std::is_same_v<FirstArgType, IR::Inst*>;
68 using Indices = std::make_index_sequence<Traits::NUM_ARGS - (is_first_arg_inst ? 2 : 1)>;
69 Invoke<func, is_first_arg_inst>(ctx, inst, Indices{});
70 }
71}
72
73void EmitInst(EmitContext& ctx, IR::Inst* inst) {
74 switch (inst->GetOpcode()) {
75#define OPCODE(name, result_type, ...) \
76 case IR::Opcode::name: \
77 return Invoke<&Emit##name>(ctx, inst);
78#include "shader_recompiler/frontend/ir/opcodes.inc"
79#undef OPCODE
80 }
81 throw LogicError("Invalid opcode {}", inst->GetOpcode());
82}
83} // Anonymous namespace
84
85std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) {
86 EmitContext ctx;
87 for (IR::Block* const block : program.blocks) {
88 for (IR::Inst& inst : block->Instructions()) {
89 EmitInst(ctx, &inst);
90 }
91 }
92 return ctx.code;
93}
94
95} // namespace Shader::Backend::GLASM
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.h b/src/shader_recompiler/backend/glasm/emit_glasm.h
new file mode 100644
index 000000000..a0dfdd818
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm.h
@@ -0,0 +1,23 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <string>
8
9#include "shader_recompiler/backend/bindings.h"
10#include "shader_recompiler/frontend/ir/program.h"
11#include "shader_recompiler/profile.h"
12
13namespace Shader::Backend::GLASM {
14
15[[nodiscard]] std::string EmitGLASM(const Profile& profile, IR::Program& program,
16 Bindings& binding);
17
18[[nodiscard]] inline std::string EmitGLASM(const Profile& profile, IR::Program& program) {
19 Bindings binding;
20 return EmitGLASM(profile, program, binding);
21}
22
23} // namespace Shader::Backend::GLASM
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_barriers.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_barriers.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_barriers.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_bitwise_conversion.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_bitwise_conversion.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_bitwise_conversion.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_composite.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_composite.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_composite.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_control_flow.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_control_flow.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_control_flow.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_convert.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_convert.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_convert.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_image_atomic.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_image_atomic.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_image_atomic.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h
new file mode 100644
index 000000000..21d6af914
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h
@@ -0,0 +1,650 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <string_view>
8
9#include "common/common_types.h"
10
11namespace Shader::IR {
12enum class Attribute : u64;
13enum class Patch : u64;
14class Inst;
15class Value;
16} // namespace Shader::IR
17
18namespace Shader::Backend::GLASM {
19
20class EmitContext;
21
22// Microinstruction emitters
23void EmitPhi(EmitContext& ctx, IR::Inst* inst);
24void EmitVoid(EmitContext& ctx);
25void EmitIdentity(EmitContext& ctx, const IR::Value& value);
26void EmitBranch(EmitContext& ctx, std::string_view label);
27void EmitBranchConditional(EmitContext& ctx, std::string_view condition,
28 std::string_view true_label, std::string_view false_label);
29void EmitLoopMerge(EmitContext& ctx, std::string_view merge_label, std::string_view continue_label);
30void EmitSelectionMerge(EmitContext& ctx, std::string_view merge_label);
31void EmitReturn(EmitContext& ctx);
32void EmitJoin(EmitContext& ctx);
33void EmitUnreachable(EmitContext& ctx);
34void EmitDemoteToHelperInvocation(EmitContext& ctx, std::string_view continue_label);
35void EmitBarrier(EmitContext& ctx);
36void EmitWorkgroupMemoryBarrier(EmitContext& ctx);
37void EmitDeviceMemoryBarrier(EmitContext& ctx);
38void EmitPrologue(EmitContext& ctx);
39void EmitEpilogue(EmitContext& ctx);
40void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream);
41void EmitEndPrimitive(EmitContext& ctx, const IR::Value& stream);
42void EmitGetRegister(EmitContext& ctx);
43void EmitSetRegister(EmitContext& ctx);
44void EmitGetPred(EmitContext& ctx);
45void EmitSetPred(EmitContext& ctx);
46void EmitSetGotoVariable(EmitContext& ctx);
47void EmitGetGotoVariable(EmitContext& ctx);
48void EmitSetIndirectBranchVariable(EmitContext& ctx);
49void EmitGetIndirectBranchVariable(EmitContext& ctx);
50void EmitGetCbufU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
51void EmitGetCbufS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
52void EmitGetCbufU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
53void EmitGetCbufS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
54void EmitGetCbufU32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
55void EmitGetCbufF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
56void EmitGetCbufU32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
57void EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view vertex);
58void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value,
59 std::string_view vertex);
60void EmitGetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view vertex);
61void EmitSetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view value,
62 std::string_view vertex);
63void EmitGetPatch(EmitContext& ctx, IR::Patch patch);
64void EmitSetPatch(EmitContext& ctx, IR::Patch patch, std::string_view value);
65void EmitSetFragColor(EmitContext& ctx, u32 index, u32 component, std::string_view value);
66void EmitSetSampleMask(EmitContext& ctx, std::string_view value);
67void EmitSetFragDepth(EmitContext& ctx, std::string_view value);
68void EmitGetZFlag(EmitContext& ctx);
69void EmitGetSFlag(EmitContext& ctx);
70void EmitGetCFlag(EmitContext& ctx);
71void EmitGetOFlag(EmitContext& ctx);
72void EmitSetZFlag(EmitContext& ctx);
73void EmitSetSFlag(EmitContext& ctx);
74void EmitSetCFlag(EmitContext& ctx);
75void EmitSetOFlag(EmitContext& ctx);
76void EmitWorkgroupId(EmitContext& ctx);
77void EmitLocalInvocationId(EmitContext& ctx);
78void EmitInvocationId(EmitContext& ctx);
79void EmitSampleId(EmitContext& ctx);
80void EmitIsHelperInvocation(EmitContext& ctx);
81void EmitYDirection(EmitContext& ctx);
82void EmitLoadLocal(EmitContext& ctx, std::string_view word_offset);
83void EmitWriteLocal(EmitContext& ctx, std::string_view word_offset, std::string_view value);
84void EmitUndefU1(EmitContext& ctx);
85void EmitUndefU8(EmitContext& ctx);
86void EmitUndefU16(EmitContext& ctx);
87void EmitUndefU32(EmitContext& ctx);
88void EmitUndefU64(EmitContext& ctx);
89void EmitLoadGlobalU8(EmitContext& ctx);
90void EmitLoadGlobalS8(EmitContext& ctx);
91void EmitLoadGlobalU16(EmitContext& ctx);
92void EmitLoadGlobalS16(EmitContext& ctx);
93void EmitLoadGlobal32(EmitContext& ctx, std::string_view address);
94void EmitLoadGlobal64(EmitContext& ctx, std::string_view address);
95void EmitLoadGlobal128(EmitContext& ctx, std::string_view address);
96void EmitWriteGlobalU8(EmitContext& ctx);
97void EmitWriteGlobalS8(EmitContext& ctx);
98void EmitWriteGlobalU16(EmitContext& ctx);
99void EmitWriteGlobalS16(EmitContext& ctx);
100void EmitWriteGlobal32(EmitContext& ctx, std::string_view address, std::string_view value);
101void EmitWriteGlobal64(EmitContext& ctx, std::string_view address, std::string_view value);
102void EmitWriteGlobal128(EmitContext& ctx, std::string_view address, std::string_view value);
103void EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
104void EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
105void EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
106void EmitLoadStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
107void EmitLoadStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
108void EmitLoadStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
109void EmitLoadStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
110void EmitWriteStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
111 std::string_view value);
112void EmitWriteStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
113 std::string_view value);
114void EmitWriteStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
115 std::string_view value);
116void EmitWriteStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
117 std::string_view value);
118void EmitWriteStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
119 std::string_view value);
120void EmitWriteStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
121 std::string_view value);
122void EmitWriteStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
123 std::string_view value);
124void EmitLoadSharedU8(EmitContext& ctx, std::string_view offset);
125void EmitLoadSharedS8(EmitContext& ctx, std::string_view offset);
126void EmitLoadSharedU16(EmitContext& ctx, std::string_view offset);
127void EmitLoadSharedS16(EmitContext& ctx, std::string_view offset);
128void EmitLoadSharedU32(EmitContext& ctx, std::string_view offset);
129void EmitLoadSharedU64(EmitContext& ctx, std::string_view offset);
130void EmitLoadSharedU128(EmitContext& ctx, std::string_view offset);
131void EmitWriteSharedU8(EmitContext& ctx, std::string_view offset, std::string_view value);
132void EmitWriteSharedU16(EmitContext& ctx, std::string_view offset, std::string_view value);
133void EmitWriteSharedU32(EmitContext& ctx, std::string_view offset, std::string_view value);
134void EmitWriteSharedU64(EmitContext& ctx, std::string_view offset, std::string_view value);
135void EmitWriteSharedU128(EmitContext& ctx, std::string_view offset, std::string_view value);
136void EmitCompositeConstructU32x2(EmitContext& ctx, std::string_view e1, std::string_view e2);
137void EmitCompositeConstructU32x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
138 std::string_view e3);
139void EmitCompositeConstructU32x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
140 std::string_view e3, std::string_view e4);
141void EmitCompositeExtractU32x2(EmitContext& ctx, std::string_view composite, u32 index);
142void EmitCompositeExtractU32x3(EmitContext& ctx, std::string_view composite, u32 index);
143void EmitCompositeExtractU32x4(EmitContext& ctx, std::string_view composite, u32 index);
144void EmitCompositeInsertU32x2(EmitContext& ctx, std::string_view composite, std::string_view object,
145 u32 index);
146void EmitCompositeInsertU32x3(EmitContext& ctx, std::string_view composite, std::string_view object,
147 u32 index);
148void EmitCompositeInsertU32x4(EmitContext& ctx, std::string_view composite, std::string_view object,
149 u32 index);
150void EmitCompositeConstructF16x2(EmitContext& ctx, std::string_view e1, std::string_view e2);
151void EmitCompositeConstructF16x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
152 std::string_view e3);
153void EmitCompositeConstructF16x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
154 std::string_view e3, std::string_view e4);
155void EmitCompositeExtractF16x2(EmitContext& ctx, std::string_view composite, u32 index);
156void EmitCompositeExtractF16x3(EmitContext& ctx, std::string_view composite, u32 index);
157void EmitCompositeExtractF16x4(EmitContext& ctx, std::string_view composite, u32 index);
158void EmitCompositeInsertF16x2(EmitContext& ctx, std::string_view composite, std::string_view object,
159 u32 index);
160void EmitCompositeInsertF16x3(EmitContext& ctx, std::string_view composite, std::string_view object,
161 u32 index);
162void EmitCompositeInsertF16x4(EmitContext& ctx, std::string_view composite, std::string_view object,
163 u32 index);
164void EmitCompositeConstructF32x2(EmitContext& ctx, std::string_view e1, std::string_view e2);
165void EmitCompositeConstructF32x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
166 std::string_view e3);
167void EmitCompositeConstructF32x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
168 std::string_view e3, std::string_view e4);
169void EmitCompositeExtractF32x2(EmitContext& ctx, std::string_view composite, u32 index);
170void EmitCompositeExtractF32x3(EmitContext& ctx, std::string_view composite, u32 index);
171void EmitCompositeExtractF32x4(EmitContext& ctx, std::string_view composite, u32 index);
172void EmitCompositeInsertF32x2(EmitContext& ctx, std::string_view composite, std::string_view object,
173 u32 index);
174void EmitCompositeInsertF32x3(EmitContext& ctx, std::string_view composite, std::string_view object,
175 u32 index);
176void EmitCompositeInsertF32x4(EmitContext& ctx, std::string_view composite, std::string_view object,
177 u32 index);
178void EmitCompositeConstructF64x2(EmitContext& ctx);
179void EmitCompositeConstructF64x3(EmitContext& ctx);
180void EmitCompositeConstructF64x4(EmitContext& ctx);
181void EmitCompositeExtractF64x2(EmitContext& ctx);
182void EmitCompositeExtractF64x3(EmitContext& ctx);
183void EmitCompositeExtractF64x4(EmitContext& ctx);
184void EmitCompositeInsertF64x2(EmitContext& ctx, std::string_view composite, std::string_view object,
185 u32 index);
186void EmitCompositeInsertF64x3(EmitContext& ctx, std::string_view composite, std::string_view object,
187 u32 index);
188void EmitCompositeInsertF64x4(EmitContext& ctx, std::string_view composite, std::string_view object,
189 u32 index);
190void EmitSelectU1(EmitContext& ctx, std::string_view cond, std::string_view true_value,
191 std::string_view false_value);
192void EmitSelectU8(EmitContext& ctx, std::string_view cond, std::string_view true_value,
193 std::string_view false_value);
194void EmitSelectU16(EmitContext& ctx, std::string_view cond, std::string_view true_value,
195 std::string_view false_value);
196void EmitSelectU32(EmitContext& ctx, std::string_view cond, std::string_view true_value,
197 std::string_view false_value);
198void EmitSelectU64(EmitContext& ctx, std::string_view cond, std::string_view true_value,
199 std::string_view false_value);
200void EmitSelectF16(EmitContext& ctx, std::string_view cond, std::string_view true_value,
201 std::string_view false_value);
202void EmitSelectF32(EmitContext& ctx, std::string_view cond, std::string_view true_value,
203 std::string_view false_value);
204void EmitSelectF64(EmitContext& ctx, std::string_view cond, std::string_view true_value,
205 std::string_view false_value);
206void EmitBitCastU16F16(EmitContext& ctx);
207void EmitBitCastU32F32(EmitContext& ctx, std::string_view value);
208void EmitBitCastU64F64(EmitContext& ctx);
209void EmitBitCastF16U16(EmitContext& ctx);
210void EmitBitCastF32U32(EmitContext& ctx, std::string_view value);
211void EmitBitCastF64U64(EmitContext& ctx);
212void EmitPackUint2x32(EmitContext& ctx, std::string_view value);
213void EmitUnpackUint2x32(EmitContext& ctx, std::string_view value);
214void EmitPackFloat2x16(EmitContext& ctx, std::string_view value);
215void EmitUnpackFloat2x16(EmitContext& ctx, std::string_view value);
216void EmitPackHalf2x16(EmitContext& ctx, std::string_view value);
217void EmitUnpackHalf2x16(EmitContext& ctx, std::string_view value);
218void EmitPackDouble2x32(EmitContext& ctx, std::string_view value);
219void EmitUnpackDouble2x32(EmitContext& ctx, std::string_view value);
220void EmitGetZeroFromOp(EmitContext& ctx);
221void EmitGetSignFromOp(EmitContext& ctx);
222void EmitGetCarryFromOp(EmitContext& ctx);
223void EmitGetOverflowFromOp(EmitContext& ctx);
224void EmitGetSparseFromOp(EmitContext& ctx);
225void EmitGetInBoundsFromOp(EmitContext& ctx);
226void EmitFPAbs16(EmitContext& ctx, std::string_view value);
227void EmitFPAbs32(EmitContext& ctx, std::string_view value);
228void EmitFPAbs64(EmitContext& ctx, std::string_view value);
229void EmitFPAdd16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
230void EmitFPAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
231void EmitFPAdd64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
232void EmitFPFma16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
233 std::string_view c);
234void EmitFPFma32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
235 std::string_view c);
236void EmitFPFma64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
237 std::string_view c);
238void EmitFPMax32(EmitContext& ctx, std::string_view a, std::string_view b);
239void EmitFPMax64(EmitContext& ctx, std::string_view a, std::string_view b);
240void EmitFPMin32(EmitContext& ctx, std::string_view a, std::string_view b);
241void EmitFPMin64(EmitContext& ctx, std::string_view a, std::string_view b);
242void EmitFPMul16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
243void EmitFPMul32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
244void EmitFPMul64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
245void EmitFPNeg16(EmitContext& ctx, std::string_view value);
246void EmitFPNeg32(EmitContext& ctx, std::string_view value);
247void EmitFPNeg64(EmitContext& ctx, std::string_view value);
248void EmitFPSin(EmitContext& ctx, std::string_view value);
249void EmitFPCos(EmitContext& ctx, std::string_view value);
250void EmitFPExp2(EmitContext& ctx, std::string_view value);
251void EmitFPLog2(EmitContext& ctx, std::string_view value);
252void EmitFPRecip32(EmitContext& ctx, std::string_view value);
253void EmitFPRecip64(EmitContext& ctx, std::string_view value);
254void EmitFPRecipSqrt32(EmitContext& ctx, std::string_view value);
255void EmitFPRecipSqrt64(EmitContext& ctx, std::string_view value);
256void EmitFPSqrt(EmitContext& ctx, std::string_view value);
257void EmitFPSaturate16(EmitContext& ctx, std::string_view value);
258void EmitFPSaturate32(EmitContext& ctx, std::string_view value);
259void EmitFPSaturate64(EmitContext& ctx, std::string_view value);
260void EmitFPClamp16(EmitContext& ctx, std::string_view value, std::string_view min_value,
261 std::string_view max_value);
262void EmitFPClamp32(EmitContext& ctx, std::string_view value, std::string_view min_value,
263 std::string_view max_value);
264void EmitFPClamp64(EmitContext& ctx, std::string_view value, std::string_view min_value,
265 std::string_view max_value);
266void EmitFPRoundEven16(EmitContext& ctx, std::string_view value);
267void EmitFPRoundEven32(EmitContext& ctx, std::string_view value);
268void EmitFPRoundEven64(EmitContext& ctx, std::string_view value);
269void EmitFPFloor16(EmitContext& ctx, std::string_view value);
270void EmitFPFloor32(EmitContext& ctx, std::string_view value);
271void EmitFPFloor64(EmitContext& ctx, std::string_view value);
272void EmitFPCeil16(EmitContext& ctx, std::string_view value);
273void EmitFPCeil32(EmitContext& ctx, std::string_view value);
274void EmitFPCeil64(EmitContext& ctx, std::string_view value);
275void EmitFPTrunc16(EmitContext& ctx, std::string_view value);
276void EmitFPTrunc32(EmitContext& ctx, std::string_view value);
277void EmitFPTrunc64(EmitContext& ctx, std::string_view value);
278void EmitFPOrdEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
279void EmitFPOrdEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
280void EmitFPOrdEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
281void EmitFPUnordEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
282void EmitFPUnordEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
283void EmitFPUnordEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
284void EmitFPOrdNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
285void EmitFPOrdNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
286void EmitFPOrdNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
287void EmitFPUnordNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
288void EmitFPUnordNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
289void EmitFPUnordNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
290void EmitFPOrdLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
291void EmitFPOrdLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
292void EmitFPOrdLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
293void EmitFPUnordLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
294void EmitFPUnordLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
295void EmitFPUnordLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
296void EmitFPOrdGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
297void EmitFPOrdGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
298void EmitFPOrdGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
299void EmitFPUnordGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
300void EmitFPUnordGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
301void EmitFPUnordGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
302void EmitFPOrdLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
303void EmitFPOrdLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
304void EmitFPOrdLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
305void EmitFPUnordLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
306void EmitFPUnordLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
307void EmitFPUnordLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
308void EmitFPOrdGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
309void EmitFPOrdGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
310void EmitFPOrdGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
311void EmitFPUnordGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
312void EmitFPUnordGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
313void EmitFPUnordGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
314void EmitFPIsNan16(EmitContext& ctx, std::string_view value);
315void EmitFPIsNan32(EmitContext& ctx, std::string_view value);
316void EmitFPIsNan64(EmitContext& ctx, std::string_view value);
317void EmitIAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
318void EmitIAdd64(EmitContext& ctx, std::string_view a, std::string_view b);
319void EmitISub32(EmitContext& ctx, std::string_view a, std::string_view b);
320void EmitISub64(EmitContext& ctx, std::string_view a, std::string_view b);
321void EmitIMul32(EmitContext& ctx, std::string_view a, std::string_view b);
322void EmitINeg32(EmitContext& ctx, std::string_view value);
323void EmitINeg64(EmitContext& ctx, std::string_view value);
324void EmitIAbs32(EmitContext& ctx, std::string_view value);
325void EmitIAbs64(EmitContext& ctx, std::string_view value);
326void EmitShiftLeftLogical32(EmitContext& ctx, std::string_view base, std::string_view shift);
327void EmitShiftLeftLogical64(EmitContext& ctx, std::string_view base, std::string_view shift);
328void EmitShiftRightLogical32(EmitContext& ctx, std::string_view base, std::string_view shift);
329void EmitShiftRightLogical64(EmitContext& ctx, std::string_view base, std::string_view shift);
330void EmitShiftRightArithmetic32(EmitContext& ctx, std::string_view base, std::string_view shift);
331void EmitShiftRightArithmetic64(EmitContext& ctx, std::string_view base, std::string_view shift);
332void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
333void EmitBitwiseOr32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
334void EmitBitwiseXor32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
335void EmitBitFieldInsert(EmitContext& ctx, std::string_view base, std::string_view insert,
336 std::string_view offset, std::string_view count);
337void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base,
338 std::string_view offset, std::string_view count);
339void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base,
340 std::string_view offset, std::string_view count);
341void EmitBitReverse32(EmitContext& ctx, std::string_view value);
342void EmitBitCount32(EmitContext& ctx, std::string_view value);
343void EmitBitwiseNot32(EmitContext& ctx, std::string_view value);
344void EmitFindSMsb32(EmitContext& ctx, std::string_view value);
345void EmitFindUMsb32(EmitContext& ctx, std::string_view value);
346void EmitSMin32(EmitContext& ctx, std::string_view a, std::string_view b);
347void EmitUMin32(EmitContext& ctx, std::string_view a, std::string_view b);
348void EmitSMax32(EmitContext& ctx, std::string_view a, std::string_view b);
349void EmitUMax32(EmitContext& ctx, std::string_view a, std::string_view b);
350void EmitSClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min,
351 std::string_view max);
352void EmitUClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min,
353 std::string_view max);
354void EmitSLessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
355void EmitULessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
356void EmitIEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
357void EmitSLessThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
358void EmitULessThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
359void EmitSGreaterThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
360void EmitUGreaterThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
361void EmitINotEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
362void EmitSGreaterThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
363void EmitUGreaterThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
364void EmitSharedAtomicIAdd32(EmitContext& ctx, std::string_view pointer_offset,
365 std::string_view value);
366void EmitSharedAtomicSMin32(EmitContext& ctx, std::string_view pointer_offset,
367 std::string_view value);
368void EmitSharedAtomicUMin32(EmitContext& ctx, std::string_view pointer_offset,
369 std::string_view value);
370void EmitSharedAtomicSMax32(EmitContext& ctx, std::string_view pointer_offset,
371 std::string_view value);
372void EmitSharedAtomicUMax32(EmitContext& ctx, std::string_view pointer_offset,
373 std::string_view value);
374void EmitSharedAtomicInc32(EmitContext& ctx, std::string_view pointer_offset,
375 std::string_view value);
376void EmitSharedAtomicDec32(EmitContext& ctx, std::string_view pointer_offset,
377 std::string_view value);
378void EmitSharedAtomicAnd32(EmitContext& ctx, std::string_view pointer_offset,
379 std::string_view value);
380void EmitSharedAtomicOr32(EmitContext& ctx, std::string_view pointer_offset,
381 std::string_view value);
382void EmitSharedAtomicXor32(EmitContext& ctx, std::string_view pointer_offset,
383 std::string_view value);
384void EmitSharedAtomicExchange32(EmitContext& ctx, std::string_view pointer_offset,
385 std::string_view value);
386void EmitSharedAtomicExchange64(EmitContext& ctx, std::string_view pointer_offset,
387 std::string_view value);
388void EmitStorageAtomicIAdd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
389 std::string_view value);
390void EmitStorageAtomicSMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
391 std::string_view value);
392void EmitStorageAtomicUMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
393 std::string_view value);
394void EmitStorageAtomicSMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
395 std::string_view value);
396void EmitStorageAtomicUMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
397 std::string_view value);
398void EmitStorageAtomicInc32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
399 std::string_view value);
400void EmitStorageAtomicDec32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
401 std::string_view value);
402void EmitStorageAtomicAnd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
403 std::string_view value);
404void EmitStorageAtomicOr32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
405 std::string_view value);
406void EmitStorageAtomicXor32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
407 std::string_view value);
408void EmitStorageAtomicExchange32(EmitContext& ctx, const IR::Value& binding,
409 const IR::Value& offset, std::string_view value);
410void EmitStorageAtomicIAdd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
411 std::string_view value);
412void EmitStorageAtomicSMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
413 std::string_view value);
414void EmitStorageAtomicUMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
415 std::string_view value);
416void EmitStorageAtomicSMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
417 std::string_view value);
418void EmitStorageAtomicUMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
419 std::string_view value);
420void EmitStorageAtomicAnd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
421 std::string_view value);
422void EmitStorageAtomicOr64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
423 std::string_view value);
424void EmitStorageAtomicXor64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
425 std::string_view value);
426void EmitStorageAtomicExchange64(EmitContext& ctx, const IR::Value& binding,
427 const IR::Value& offset, std::string_view value);
428void EmitStorageAtomicAddF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
429 std::string_view value);
430void EmitStorageAtomicAddF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
431 std::string_view value);
432void EmitStorageAtomicAddF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
433 std::string_view value);
434void EmitStorageAtomicMinF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
435 std::string_view value);
436void EmitStorageAtomicMinF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
437 std::string_view value);
438void EmitStorageAtomicMaxF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
439 std::string_view value);
440void EmitStorageAtomicMaxF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
441 std::string_view value);
442void EmitGlobalAtomicIAdd32(EmitContext& ctx);
443void EmitGlobalAtomicSMin32(EmitContext& ctx);
444void EmitGlobalAtomicUMin32(EmitContext& ctx);
445void EmitGlobalAtomicSMax32(EmitContext& ctx);
446void EmitGlobalAtomicUMax32(EmitContext& ctx);
447void EmitGlobalAtomicInc32(EmitContext& ctx);
448void EmitGlobalAtomicDec32(EmitContext& ctx);
449void EmitGlobalAtomicAnd32(EmitContext& ctx);
450void EmitGlobalAtomicOr32(EmitContext& ctx);
451void EmitGlobalAtomicXor32(EmitContext& ctx);
452void EmitGlobalAtomicExchange32(EmitContext& ctx);
453void EmitGlobalAtomicIAdd64(EmitContext& ctx);
454void EmitGlobalAtomicSMin64(EmitContext& ctx);
455void EmitGlobalAtomicUMin64(EmitContext& ctx);
456void EmitGlobalAtomicSMax64(EmitContext& ctx);
457void EmitGlobalAtomicUMax64(EmitContext& ctx);
458void EmitGlobalAtomicInc64(EmitContext& ctx);
459void EmitGlobalAtomicDec64(EmitContext& ctx);
460void EmitGlobalAtomicAnd64(EmitContext& ctx);
461void EmitGlobalAtomicOr64(EmitContext& ctx);
462void EmitGlobalAtomicXor64(EmitContext& ctx);
463void EmitGlobalAtomicExchange64(EmitContext& ctx);
464void EmitGlobalAtomicAddF32(EmitContext& ctx);
465void EmitGlobalAtomicAddF16x2(EmitContext& ctx);
466void EmitGlobalAtomicAddF32x2(EmitContext& ctx);
467void EmitGlobalAtomicMinF16x2(EmitContext& ctx);
468void EmitGlobalAtomicMinF32x2(EmitContext& ctx);
469void EmitGlobalAtomicMaxF16x2(EmitContext& ctx);
470void EmitGlobalAtomicMaxF32x2(EmitContext& ctx);
471void EmitLogicalOr(EmitContext& ctx, std::string_view a, std::string_view b);
472void EmitLogicalAnd(EmitContext& ctx, std::string_view a, std::string_view b);
473void EmitLogicalXor(EmitContext& ctx, std::string_view a, std::string_view b);
474void EmitLogicalNot(EmitContext& ctx, std::string_view value);
475void EmitConvertS16F16(EmitContext& ctx, std::string_view value);
476void EmitConvertS16F32(EmitContext& ctx, std::string_view value);
477void EmitConvertS16F64(EmitContext& ctx, std::string_view value);
478void EmitConvertS32F16(EmitContext& ctx, std::string_view value);
479void EmitConvertS32F32(EmitContext& ctx, std::string_view value);
480void EmitConvertS32F64(EmitContext& ctx, std::string_view value);
481void EmitConvertS64F16(EmitContext& ctx, std::string_view value);
482void EmitConvertS64F32(EmitContext& ctx, std::string_view value);
483void EmitConvertS64F64(EmitContext& ctx, std::string_view value);
484void EmitConvertU16F16(EmitContext& ctx, std::string_view value);
485void EmitConvertU16F32(EmitContext& ctx, std::string_view value);
486void EmitConvertU16F64(EmitContext& ctx, std::string_view value);
487void EmitConvertU32F16(EmitContext& ctx, std::string_view value);
488void EmitConvertU32F32(EmitContext& ctx, std::string_view value);
489void EmitConvertU32F64(EmitContext& ctx, std::string_view value);
490void EmitConvertU64F16(EmitContext& ctx, std::string_view value);
491void EmitConvertU64F32(EmitContext& ctx, std::string_view value);
492void EmitConvertU64F64(EmitContext& ctx, std::string_view value);
493void EmitConvertU64U32(EmitContext& ctx, std::string_view value);
494void EmitConvertU32U64(EmitContext& ctx, std::string_view value);
495void EmitConvertF16F32(EmitContext& ctx, std::string_view value);
496void EmitConvertF32F16(EmitContext& ctx, std::string_view value);
497void EmitConvertF32F64(EmitContext& ctx, std::string_view value);
498void EmitConvertF64F32(EmitContext& ctx, std::string_view value);
499void EmitConvertF16S8(EmitContext& ctx, std::string_view value);
500void EmitConvertF16S16(EmitContext& ctx, std::string_view value);
501void EmitConvertF16S32(EmitContext& ctx, std::string_view value);
502void EmitConvertF16S64(EmitContext& ctx, std::string_view value);
503void EmitConvertF16U8(EmitContext& ctx, std::string_view value);
504void EmitConvertF16U16(EmitContext& ctx, std::string_view value);
505void EmitConvertF16U32(EmitContext& ctx, std::string_view value);
506void EmitConvertF16U64(EmitContext& ctx, std::string_view value);
507void EmitConvertF32S8(EmitContext& ctx, std::string_view value);
508void EmitConvertF32S16(EmitContext& ctx, std::string_view value);
509void EmitConvertF32S32(EmitContext& ctx, std::string_view value);
510void EmitConvertF32S64(EmitContext& ctx, std::string_view value);
511void EmitConvertF32U8(EmitContext& ctx, std::string_view value);
512void EmitConvertF32U16(EmitContext& ctx, std::string_view value);
513void EmitConvertF32U32(EmitContext& ctx, std::string_view value);
514void EmitConvertF32U64(EmitContext& ctx, std::string_view value);
515void EmitConvertF64S8(EmitContext& ctx, std::string_view value);
516void EmitConvertF64S16(EmitContext& ctx, std::string_view value);
517void EmitConvertF64S32(EmitContext& ctx, std::string_view value);
518void EmitConvertF64S64(EmitContext& ctx, std::string_view value);
519void EmitConvertF64U8(EmitContext& ctx, std::string_view value);
520void EmitConvertF64U16(EmitContext& ctx, std::string_view value);
521void EmitConvertF64U32(EmitContext& ctx, std::string_view value);
522void EmitConvertF64U64(EmitContext& ctx, std::string_view value);
523void EmitBindlessImageSampleImplicitLod(EmitContext&);
524void EmitBindlessImageSampleExplicitLod(EmitContext&);
525void EmitBindlessImageSampleDrefImplicitLod(EmitContext&);
526void EmitBindlessImageSampleDrefExplicitLod(EmitContext&);
527void EmitBindlessImageGather(EmitContext&);
528void EmitBindlessImageGatherDref(EmitContext&);
529void EmitBindlessImageFetch(EmitContext&);
530void EmitBindlessImageQueryDimensions(EmitContext&);
531void EmitBindlessImageQueryLod(EmitContext&);
532void EmitBindlessImageGradient(EmitContext&);
533void EmitBindlessImageRead(EmitContext&);
534void EmitBindlessImageWrite(EmitContext&);
535void EmitBoundImageSampleImplicitLod(EmitContext&);
536void EmitBoundImageSampleExplicitLod(EmitContext&);
537void EmitBoundImageSampleDrefImplicitLod(EmitContext&);
538void EmitBoundImageSampleDrefExplicitLod(EmitContext&);
539void EmitBoundImageGather(EmitContext&);
540void EmitBoundImageGatherDref(EmitContext&);
541void EmitBoundImageFetch(EmitContext&);
542void EmitBoundImageQueryDimensions(EmitContext&);
543void EmitBoundImageQueryLod(EmitContext&);
544void EmitBoundImageGradient(EmitContext&);
545void EmitBoundImageRead(EmitContext&);
546void EmitBoundImageWrite(EmitContext&);
547void EmitImageSampleImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
548 std::string_view coords, std::string_view bias_lc,
549 const IR::Value& offset);
550void EmitImageSampleExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
551 std::string_view coords, std::string_view lod_lc,
552 const IR::Value& offset);
553void EmitImageSampleDrefImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
554 std::string_view coords, std::string_view dref,
555 std::string_view bias_lc, const IR::Value& offset);
556void EmitImageSampleDrefExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
557 std::string_view coords, std::string_view dref,
558 std::string_view lod_lc, const IR::Value& offset);
559void EmitImageGather(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
560 std::string_view coords, const IR::Value& offset, const IR::Value& offset2);
561void EmitImageGatherDref(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
562 std::string_view coords, const IR::Value& offset, const IR::Value& offset2,
563 std::string_view dref);
564void EmitImageFetch(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
565 std::string_view coords, std::string_view offset, std::string_view lod,
566 std::string_view ms);
567void EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
568 std::string_view lod);
569void EmitImageQueryLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
570 std::string_view coords);
571void EmitImageGradient(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
572 std::string_view coords, std::string_view derivates, std::string_view offset,
573 std::string_view lod_clamp);
574void EmitImageRead(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
575 std::string_view coords);
576void EmitImageWrite(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
577 std::string_view coords, std::string_view color);
578void EmitBindlessImageAtomicIAdd32(EmitContext&);
579void EmitBindlessImageAtomicSMin32(EmitContext&);
580void EmitBindlessImageAtomicUMin32(EmitContext&);
581void EmitBindlessImageAtomicSMax32(EmitContext&);
582void EmitBindlessImageAtomicUMax32(EmitContext&);
583void EmitBindlessImageAtomicInc32(EmitContext&);
584void EmitBindlessImageAtomicDec32(EmitContext&);
585void EmitBindlessImageAtomicAnd32(EmitContext&);
586void EmitBindlessImageAtomicOr32(EmitContext&);
587void EmitBindlessImageAtomicXor32(EmitContext&);
588void EmitBindlessImageAtomicExchange32(EmitContext&);
589void EmitBoundImageAtomicIAdd32(EmitContext&);
590void EmitBoundImageAtomicSMin32(EmitContext&);
591void EmitBoundImageAtomicUMin32(EmitContext&);
592void EmitBoundImageAtomicSMax32(EmitContext&);
593void EmitBoundImageAtomicUMax32(EmitContext&);
594void EmitBoundImageAtomicInc32(EmitContext&);
595void EmitBoundImageAtomicDec32(EmitContext&);
596void EmitBoundImageAtomicAnd32(EmitContext&);
597void EmitBoundImageAtomicOr32(EmitContext&);
598void EmitBoundImageAtomicXor32(EmitContext&);
599void EmitBoundImageAtomicExchange32(EmitContext&);
600void EmitImageAtomicIAdd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
601 std::string_view coords, std::string_view value);
602void EmitImageAtomicSMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
603 std::string_view coords, std::string_view value);
604void EmitImageAtomicUMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
605 std::string_view coords, std::string_view value);
606void EmitImageAtomicSMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
607 std::string_view coords, std::string_view value);
608void EmitImageAtomicUMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
609 std::string_view coords, std::string_view value);
610void EmitImageAtomicInc32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
611 std::string_view coords, std::string_view value);
612void EmitImageAtomicDec32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
613 std::string_view coords, std::string_view value);
614void EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
615 std::string_view coords, std::string_view value);
616void EmitImageAtomicOr32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
617 std::string_view coords, std::string_view value);
618void EmitImageAtomicXor32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
619 std::string_view coords, std::string_view value);
620void EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
621 std::string_view coords, std::string_view value);
622void EmitLaneId(EmitContext& ctx);
623void EmitVoteAll(EmitContext& ctx, std::string_view pred);
624void EmitVoteAny(EmitContext& ctx, std::string_view pred);
625void EmitVoteEqual(EmitContext& ctx, std::string_view pred);
626void EmitSubgroupBallot(EmitContext& ctx, std::string_view pred);
627void EmitSubgroupEqMask(EmitContext& ctx);
628void EmitSubgroupLtMask(EmitContext& ctx);
629void EmitSubgroupLeMask(EmitContext& ctx);
630void EmitSubgroupGtMask(EmitContext& ctx);
631void EmitSubgroupGeMask(EmitContext& ctx);
632void EmitShuffleIndex(EmitContext& ctx, IR::Inst* inst, std::string_view value,
633 std::string_view index, std::string_view clamp,
634 std::string_view segmentation_mask);
635void EmitShuffleUp(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view index,
636 std::string_view clamp, std::string_view segmentation_mask);
637void EmitShuffleDown(EmitContext& ctx, IR::Inst* inst, std::string_view value,
638 std::string_view index, std::string_view clamp,
639 std::string_view segmentation_mask);
640void EmitShuffleButterfly(EmitContext& ctx, IR::Inst* inst, std::string_view value,
641 std::string_view index, std::string_view clamp,
642 std::string_view segmentation_mask);
643void EmitFSwizzleAdd(EmitContext& ctx, std::string_view op_a, std::string_view op_b,
644 std::string_view swizzle);
645void EmitDPdxFine(EmitContext& ctx, std::string_view op_a);
646void EmitDPdyFine(EmitContext& ctx, std::string_view op_a);
647void EmitDPdxCoarse(EmitContext& ctx, std::string_view op_a);
648void EmitDPdyCoarse(EmitContext& ctx, std::string_view op_a);
649
650} // namespace Shader::Backend::GLASM
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_logical.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
new file mode 100644
index 000000000..e90224e15
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
@@ -0,0 +1,2155 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <string_view>
6
7#include "shader_recompiler/backend/glasm/emit_context.h"
8#include "shader_recompiler/backend/glasm/emit_glasm_instructions.h"
9#include "shader_recompiler/frontend/ir/program.h"
10#include "shader_recompiler/frontend/ir/value.h"
11
12#ifdef _MSC_VER
13#pragma warning(disable : 4100)
14#endif
15
16namespace Shader::Backend::GLASM {
17
18static void NotImplemented() {
19 throw NotImplementedException("GLASM instruction");
20}
21
22void EmitPhi(EmitContext& ctx, IR::Inst* inst) {
23 NotImplemented();
24}
25
26void EmitVoid(EmitContext& ctx) {
27 NotImplemented();
28}
29
30void EmitIdentity(EmitContext& ctx, const IR::Value& value) {
31 NotImplemented();
32}
33
34void EmitBranch(EmitContext& ctx, std::string_view label) {
35 NotImplemented();
36}
37
38void EmitBranchConditional(EmitContext& ctx, std::string_view condition,
39 std::string_view true_label, std::string_view false_label) {
40 NotImplemented();
41}
42
43void EmitLoopMerge(EmitContext& ctx, std::string_view merge_label,
44 std::string_view continue_label) {
45 NotImplemented();
46}
47
48void EmitSelectionMerge(EmitContext& ctx, std::string_view merge_label) {
49 NotImplemented();
50}
51
52void EmitReturn(EmitContext& ctx) {
53 NotImplemented();
54}
55
56void EmitJoin(EmitContext& ctx) {
57 NotImplemented();
58}
59
60void EmitUnreachable(EmitContext& ctx) {
61 NotImplemented();
62}
63
64void EmitDemoteToHelperInvocation(EmitContext& ctx, std::string_view continue_label) {
65 NotImplemented();
66}
67
68void EmitBarrier(EmitContext& ctx) {
69 NotImplemented();
70}
71
72void EmitWorkgroupMemoryBarrier(EmitContext& ctx) {
73 NotImplemented();
74}
75
76void EmitDeviceMemoryBarrier(EmitContext& ctx) {
77 NotImplemented();
78}
79
80void EmitPrologue(EmitContext& ctx) {
81 NotImplemented();
82}
83
84void EmitEpilogue(EmitContext& ctx) {
85 NotImplemented();
86}
87
88void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) {
89 NotImplemented();
90}
91
92void EmitEndPrimitive(EmitContext& ctx, const IR::Value& stream) {
93 NotImplemented();
94}
95
96void EmitGetRegister(EmitContext& ctx) {
97 NotImplemented();
98}
99
100void EmitSetRegister(EmitContext& ctx) {
101 NotImplemented();
102}
103
104void EmitGetPred(EmitContext& ctx) {
105 NotImplemented();
106}
107
108void EmitSetPred(EmitContext& ctx) {
109 NotImplemented();
110}
111
112void EmitSetGotoVariable(EmitContext& ctx) {
113 NotImplemented();
114}
115
116void EmitGetGotoVariable(EmitContext& ctx) {
117 NotImplemented();
118}
119
120void EmitSetIndirectBranchVariable(EmitContext& ctx) {
121 NotImplemented();
122}
123
124void EmitGetIndirectBranchVariable(EmitContext& ctx) {
125 NotImplemented();
126}
127
128void EmitGetCbufU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
129 NotImplemented();
130}
131
132void EmitGetCbufS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
133 NotImplemented();
134}
135
136void EmitGetCbufU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
137 NotImplemented();
138}
139
140void EmitGetCbufS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
141 NotImplemented();
142}
143
144void EmitGetCbufU32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
145 NotImplemented();
146}
147
148void EmitGetCbufF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
149 NotImplemented();
150}
151
152void EmitGetCbufU32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
153 NotImplemented();
154}
155
156void EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view vertex) {
157 NotImplemented();
158}
159
160void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value,
161 std::string_view vertex) {
162 NotImplemented();
163}
164
165void EmitGetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view vertex) {
166 NotImplemented();
167}
168
169void EmitSetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view value,
170 std::string_view vertex) {
171 NotImplemented();
172}
173
174void EmitGetPatch(EmitContext& ctx, IR::Patch patch) {
175 NotImplemented();
176}
177
178void EmitSetPatch(EmitContext& ctx, IR::Patch patch, std::string_view value) {
179 NotImplemented();
180}
181
182void EmitSetFragColor(EmitContext& ctx, u32 index, u32 component, std::string_view value) {
183 NotImplemented();
184}
185
186void EmitSetSampleMask(EmitContext& ctx, std::string_view value) {
187 NotImplemented();
188}
189
190void EmitSetFragDepth(EmitContext& ctx, std::string_view value) {
191 NotImplemented();
192}
193
194void EmitGetZFlag(EmitContext& ctx) {
195 NotImplemented();
196}
197
198void EmitGetSFlag(EmitContext& ctx) {
199 NotImplemented();
200}
201
202void EmitGetCFlag(EmitContext& ctx) {
203 NotImplemented();
204}
205
206void EmitGetOFlag(EmitContext& ctx) {
207 NotImplemented();
208}
209
210void EmitSetZFlag(EmitContext& ctx) {
211 NotImplemented();
212}
213
214void EmitSetSFlag(EmitContext& ctx) {
215 NotImplemented();
216}
217
218void EmitSetCFlag(EmitContext& ctx) {
219 NotImplemented();
220}
221
222void EmitSetOFlag(EmitContext& ctx) {
223 NotImplemented();
224}
225
226void EmitWorkgroupId(EmitContext& ctx) {
227 NotImplemented();
228}
229
230void EmitLocalInvocationId(EmitContext& ctx) {
231 NotImplemented();
232}
233
234void EmitInvocationId(EmitContext& ctx) {
235 NotImplemented();
236}
237
238void EmitSampleId(EmitContext& ctx) {
239 NotImplemented();
240}
241
242void EmitIsHelperInvocation(EmitContext& ctx) {
243 NotImplemented();
244}
245
246void EmitYDirection(EmitContext& ctx) {
247 NotImplemented();
248}
249
250void EmitLoadLocal(EmitContext& ctx, std::string_view word_offset) {
251 NotImplemented();
252}
253
254void EmitWriteLocal(EmitContext& ctx, std::string_view word_offset, std::string_view value) {
255 NotImplemented();
256}
257
258void EmitUndefU1(EmitContext& ctx) {
259 NotImplemented();
260}
261
262void EmitUndefU8(EmitContext& ctx) {
263 NotImplemented();
264}
265
266void EmitUndefU16(EmitContext& ctx) {
267 NotImplemented();
268}
269
270void EmitUndefU32(EmitContext& ctx) {
271 NotImplemented();
272}
273
274void EmitUndefU64(EmitContext& ctx) {
275 NotImplemented();
276}
277
278void EmitLoadGlobalU8(EmitContext& ctx) {
279 NotImplemented();
280}
281
282void EmitLoadGlobalS8(EmitContext& ctx) {
283 NotImplemented();
284}
285
286void EmitLoadGlobalU16(EmitContext& ctx) {
287 NotImplemented();
288}
289
290void EmitLoadGlobalS16(EmitContext& ctx) {
291 NotImplemented();
292}
293
294void EmitLoadGlobal32(EmitContext& ctx, std::string_view address) {
295 NotImplemented();
296}
297
298void EmitLoadGlobal64(EmitContext& ctx, std::string_view address) {
299 NotImplemented();
300}
301
302void EmitLoadGlobal128(EmitContext& ctx, std::string_view address) {
303 NotImplemented();
304}
305
306void EmitWriteGlobalU8(EmitContext& ctx) {
307 NotImplemented();
308}
309
310void EmitWriteGlobalS8(EmitContext& ctx) {
311 NotImplemented();
312}
313
314void EmitWriteGlobalU16(EmitContext& ctx) {
315 NotImplemented();
316}
317
318void EmitWriteGlobalS16(EmitContext& ctx) {
319 NotImplemented();
320}
321
322void EmitWriteGlobal32(EmitContext& ctx, std::string_view address, std::string_view value) {
323 NotImplemented();
324}
325
326void EmitWriteGlobal64(EmitContext& ctx, std::string_view address, std::string_view value) {
327 NotImplemented();
328}
329
330void EmitWriteGlobal128(EmitContext& ctx, std::string_view address, std::string_view value) {
331 NotImplemented();
332}
333
334void EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
335 NotImplemented();
336}
337
338void EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
339 NotImplemented();
340}
341
342void EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
343 NotImplemented();
344}
345
346void EmitLoadStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
347 NotImplemented();
348}
349
350void EmitLoadStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
351 NotImplemented();
352}
353
354void EmitLoadStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
355 NotImplemented();
356}
357
358void EmitLoadStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
359 NotImplemented();
360}
361
362void EmitWriteStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
363 std::string_view value) {
364 NotImplemented();
365}
366
367void EmitWriteStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
368 std::string_view value) {
369 NotImplemented();
370}
371
372void EmitWriteStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
373 std::string_view value) {
374 NotImplemented();
375}
376
377void EmitWriteStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
378 std::string_view value) {
379 NotImplemented();
380}
381
382void EmitWriteStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
383 std::string_view value) {
384 NotImplemented();
385}
386
387void EmitWriteStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
388 std::string_view value) {
389 NotImplemented();
390}
391
392void EmitWriteStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
393 std::string_view value) {
394 NotImplemented();
395}
396
397void EmitLoadSharedU8(EmitContext& ctx, std::string_view offset) {
398 NotImplemented();
399}
400
401void EmitLoadSharedS8(EmitContext& ctx, std::string_view offset) {
402 NotImplemented();
403}
404
405void EmitLoadSharedU16(EmitContext& ctx, std::string_view offset) {
406 NotImplemented();
407}
408
409void EmitLoadSharedS16(EmitContext& ctx, std::string_view offset) {
410 NotImplemented();
411}
412
413void EmitLoadSharedU32(EmitContext& ctx, std::string_view offset) {
414 NotImplemented();
415}
416
417void EmitLoadSharedU64(EmitContext& ctx, std::string_view offset) {
418 NotImplemented();
419}
420
421void EmitLoadSharedU128(EmitContext& ctx, std::string_view offset) {
422 NotImplemented();
423}
424
425void EmitWriteSharedU8(EmitContext& ctx, std::string_view offset, std::string_view value) {
426 NotImplemented();
427}
428
429void EmitWriteSharedU16(EmitContext& ctx, std::string_view offset, std::string_view value) {
430 NotImplemented();
431}
432
433void EmitWriteSharedU32(EmitContext& ctx, std::string_view offset, std::string_view value) {
434 NotImplemented();
435}
436
437void EmitWriteSharedU64(EmitContext& ctx, std::string_view offset, std::string_view value) {
438 NotImplemented();
439}
440
441void EmitWriteSharedU128(EmitContext& ctx, std::string_view offset, std::string_view value) {
442 NotImplemented();
443}
444
445void EmitCompositeConstructU32x2(EmitContext& ctx, std::string_view e1, std::string_view e2) {
446 NotImplemented();
447}
448
449void EmitCompositeConstructU32x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
450 std::string_view e3) {
451 NotImplemented();
452}
453
454void EmitCompositeConstructU32x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
455 std::string_view e3, std::string_view e4) {
456 NotImplemented();
457}
458
459void EmitCompositeExtractU32x2(EmitContext& ctx, std::string_view composite, u32 index) {
460 NotImplemented();
461}
462
463void EmitCompositeExtractU32x3(EmitContext& ctx, std::string_view composite, u32 index) {
464 NotImplemented();
465}
466
467void EmitCompositeExtractU32x4(EmitContext& ctx, std::string_view composite, u32 index) {
468 NotImplemented();
469}
470
471void EmitCompositeInsertU32x2(EmitContext& ctx, std::string_view composite, std::string_view object,
472 u32 index) {
473 NotImplemented();
474}
475
476void EmitCompositeInsertU32x3(EmitContext& ctx, std::string_view composite, std::string_view object,
477 u32 index) {
478 NotImplemented();
479}
480
481void EmitCompositeInsertU32x4(EmitContext& ctx, std::string_view composite, std::string_view object,
482 u32 index) {
483 NotImplemented();
484}
485
486void EmitCompositeConstructF16x2(EmitContext& ctx, std::string_view e1, std::string_view e2) {
487 NotImplemented();
488}
489
490void EmitCompositeConstructF16x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
491 std::string_view e3) {
492 NotImplemented();
493}
494
495void EmitCompositeConstructF16x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
496 std::string_view e3, std::string_view e4) {
497 NotImplemented();
498}
499
500void EmitCompositeExtractF16x2(EmitContext& ctx, std::string_view composite, u32 index) {
501 NotImplemented();
502}
503
504void EmitCompositeExtractF16x3(EmitContext& ctx, std::string_view composite, u32 index) {
505 NotImplemented();
506}
507
508void EmitCompositeExtractF16x4(EmitContext& ctx, std::string_view composite, u32 index) {
509 NotImplemented();
510}
511
512void EmitCompositeInsertF16x2(EmitContext& ctx, std::string_view composite, std::string_view object,
513 u32 index) {
514 NotImplemented();
515}
516
517void EmitCompositeInsertF16x3(EmitContext& ctx, std::string_view composite, std::string_view object,
518 u32 index) {
519 NotImplemented();
520}
521
522void EmitCompositeInsertF16x4(EmitContext& ctx, std::string_view composite, std::string_view object,
523 u32 index) {
524 NotImplemented();
525}
526
527void EmitCompositeConstructF32x2(EmitContext& ctx, std::string_view e1, std::string_view e2) {
528 NotImplemented();
529}
530
531void EmitCompositeConstructF32x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
532 std::string_view e3) {
533 NotImplemented();
534}
535
536void EmitCompositeConstructF32x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
537 std::string_view e3, std::string_view e4) {
538 NotImplemented();
539}
540
541void EmitCompositeExtractF32x2(EmitContext& ctx, std::string_view composite, u32 index) {
542 NotImplemented();
543}
544
545void EmitCompositeExtractF32x3(EmitContext& ctx, std::string_view composite, u32 index) {
546 NotImplemented();
547}
548
549void EmitCompositeExtractF32x4(EmitContext& ctx, std::string_view composite, u32 index) {
550 NotImplemented();
551}
552
553void EmitCompositeInsertF32x2(EmitContext& ctx, std::string_view composite, std::string_view object,
554 u32 index) {
555 NotImplemented();
556}
557
558void EmitCompositeInsertF32x3(EmitContext& ctx, std::string_view composite, std::string_view object,
559 u32 index) {
560 NotImplemented();
561}
562
563void EmitCompositeInsertF32x4(EmitContext& ctx, std::string_view composite, std::string_view object,
564 u32 index) {
565 NotImplemented();
566}
567
568void EmitCompositeConstructF64x2(EmitContext& ctx) {
569 NotImplemented();
570}
571
572void EmitCompositeConstructF64x3(EmitContext& ctx) {
573 NotImplemented();
574}
575
576void EmitCompositeConstructF64x4(EmitContext& ctx) {
577 NotImplemented();
578}
579
580void EmitCompositeExtractF64x2(EmitContext& ctx) {
581 NotImplemented();
582}
583
584void EmitCompositeExtractF64x3(EmitContext& ctx) {
585 NotImplemented();
586}
587
588void EmitCompositeExtractF64x4(EmitContext& ctx) {
589 NotImplemented();
590}
591
592void EmitCompositeInsertF64x2(EmitContext& ctx, std::string_view composite, std::string_view object,
593 u32 index) {
594 NotImplemented();
595}
596
597void EmitCompositeInsertF64x3(EmitContext& ctx, std::string_view composite, std::string_view object,
598 u32 index) {
599 NotImplemented();
600}
601
602void EmitCompositeInsertF64x4(EmitContext& ctx, std::string_view composite, std::string_view object,
603 u32 index) {
604 NotImplemented();
605}
606
607void EmitSelectU1(EmitContext& ctx, std::string_view cond, std::string_view true_value,
608 std::string_view false_value) {
609 NotImplemented();
610}
611
612void EmitSelectU8(EmitContext& ctx, std::string_view cond, std::string_view true_value,
613 std::string_view false_value) {
614 NotImplemented();
615}
616
617void EmitSelectU16(EmitContext& ctx, std::string_view cond, std::string_view true_value,
618 std::string_view false_value) {
619 NotImplemented();
620}
621
622void EmitSelectU32(EmitContext& ctx, std::string_view cond, std::string_view true_value,
623 std::string_view false_value) {
624 NotImplemented();
625}
626
627void EmitSelectU64(EmitContext& ctx, std::string_view cond, std::string_view true_value,
628 std::string_view false_value) {
629 NotImplemented();
630}
631
632void EmitSelectF16(EmitContext& ctx, std::string_view cond, std::string_view true_value,
633 std::string_view false_value) {
634 NotImplemented();
635}
636
637void EmitSelectF32(EmitContext& ctx, std::string_view cond, std::string_view true_value,
638 std::string_view false_value) {
639 NotImplemented();
640}
641
642void EmitSelectF64(EmitContext& ctx, std::string_view cond, std::string_view true_value,
643 std::string_view false_value) {
644 NotImplemented();
645}
646
647void EmitBitCastU16F16(EmitContext& ctx) {
648 NotImplemented();
649}
650
651void EmitBitCastU32F32(EmitContext& ctx, std::string_view value) {
652 NotImplemented();
653}
654
655void EmitBitCastU64F64(EmitContext& ctx) {
656 NotImplemented();
657}
658
659void EmitBitCastF16U16(EmitContext& ctx) {
660 NotImplemented();
661}
662
663void EmitBitCastF32U32(EmitContext& ctx, std::string_view value) {
664 NotImplemented();
665}
666
667void EmitBitCastF64U64(EmitContext& ctx) {
668 NotImplemented();
669}
670
671void EmitPackUint2x32(EmitContext& ctx, std::string_view value) {
672 NotImplemented();
673}
674
675void EmitUnpackUint2x32(EmitContext& ctx, std::string_view value) {
676 NotImplemented();
677}
678
679void EmitPackFloat2x16(EmitContext& ctx, std::string_view value) {
680 NotImplemented();
681}
682
683void EmitUnpackFloat2x16(EmitContext& ctx, std::string_view value) {
684 NotImplemented();
685}
686
687void EmitPackHalf2x16(EmitContext& ctx, std::string_view value) {
688 NotImplemented();
689}
690
691void EmitUnpackHalf2x16(EmitContext& ctx, std::string_view value) {
692 NotImplemented();
693}
694
695void EmitPackDouble2x32(EmitContext& ctx, std::string_view value) {
696 NotImplemented();
697}
698
699void EmitUnpackDouble2x32(EmitContext& ctx, std::string_view value) {
700 NotImplemented();
701}
702
703void EmitGetZeroFromOp(EmitContext& ctx) {
704 NotImplemented();
705}
706
707void EmitGetSignFromOp(EmitContext& ctx) {
708 NotImplemented();
709}
710
711void EmitGetCarryFromOp(EmitContext& ctx) {
712 NotImplemented();
713}
714
715void EmitGetOverflowFromOp(EmitContext& ctx) {
716 NotImplemented();
717}
718
719void EmitGetSparseFromOp(EmitContext& ctx) {
720 NotImplemented();
721}
722
723void EmitGetInBoundsFromOp(EmitContext& ctx) {
724 NotImplemented();
725}
726
727void EmitFPAbs16(EmitContext& ctx, std::string_view value) {
728 NotImplemented();
729}
730
731void EmitFPAbs32(EmitContext& ctx, std::string_view value) {
732 NotImplemented();
733}
734
735void EmitFPAbs64(EmitContext& ctx, std::string_view value) {
736 NotImplemented();
737}
738
739void EmitFPAdd16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
740 NotImplemented();
741}
742
743void EmitFPAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
744 NotImplemented();
745}
746
747void EmitFPAdd64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
748 NotImplemented();
749}
750
751void EmitFPFma16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
752 std::string_view c) {
753 NotImplemented();
754}
755
756void EmitFPFma32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
757 std::string_view c) {
758 NotImplemented();
759}
760
761void EmitFPFma64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
762 std::string_view c) {
763 NotImplemented();
764}
765
766void EmitFPMax32(EmitContext& ctx, std::string_view a, std::string_view b) {
767 NotImplemented();
768}
769
770void EmitFPMax64(EmitContext& ctx, std::string_view a, std::string_view b) {
771 NotImplemented();
772}
773
774void EmitFPMin32(EmitContext& ctx, std::string_view a, std::string_view b) {
775 NotImplemented();
776}
777
778void EmitFPMin64(EmitContext& ctx, std::string_view a, std::string_view b) {
779 NotImplemented();
780}
781
782void EmitFPMul16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
783 NotImplemented();
784}
785
786void EmitFPMul32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
787 NotImplemented();
788}
789
790void EmitFPMul64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
791 NotImplemented();
792}
793
794void EmitFPNeg16(EmitContext& ctx, std::string_view value) {
795 NotImplemented();
796}
797
798void EmitFPNeg32(EmitContext& ctx, std::string_view value) {
799 NotImplemented();
800}
801
802void EmitFPNeg64(EmitContext& ctx, std::string_view value) {
803 NotImplemented();
804}
805
806void EmitFPSin(EmitContext& ctx, std::string_view value) {
807 NotImplemented();
808}
809
810void EmitFPCos(EmitContext& ctx, std::string_view value) {
811 NotImplemented();
812}
813
814void EmitFPExp2(EmitContext& ctx, std::string_view value) {
815 NotImplemented();
816}
817
818void EmitFPLog2(EmitContext& ctx, std::string_view value) {
819 NotImplemented();
820}
821
822void EmitFPRecip32(EmitContext& ctx, std::string_view value) {
823 NotImplemented();
824}
825
826void EmitFPRecip64(EmitContext& ctx, std::string_view value) {
827 NotImplemented();
828}
829
830void EmitFPRecipSqrt32(EmitContext& ctx, std::string_view value) {
831 NotImplemented();
832}
833
834void EmitFPRecipSqrt64(EmitContext& ctx, std::string_view value) {
835 NotImplemented();
836}
837
838void EmitFPSqrt(EmitContext& ctx, std::string_view value) {
839 NotImplemented();
840}
841
842void EmitFPSaturate16(EmitContext& ctx, std::string_view value) {
843 NotImplemented();
844}
845
846void EmitFPSaturate32(EmitContext& ctx, std::string_view value) {
847 NotImplemented();
848}
849
850void EmitFPSaturate64(EmitContext& ctx, std::string_view value) {
851 NotImplemented();
852}
853
854void EmitFPClamp16(EmitContext& ctx, std::string_view value, std::string_view min_value,
855 std::string_view max_value) {
856 NotImplemented();
857}
858
859void EmitFPClamp32(EmitContext& ctx, std::string_view value, std::string_view min_value,
860 std::string_view max_value) {
861 NotImplemented();
862}
863
864void EmitFPClamp64(EmitContext& ctx, std::string_view value, std::string_view min_value,
865 std::string_view max_value) {
866 NotImplemented();
867}
868
869void EmitFPRoundEven16(EmitContext& ctx, std::string_view value) {
870 NotImplemented();
871}
872
873void EmitFPRoundEven32(EmitContext& ctx, std::string_view value) {
874 NotImplemented();
875}
876
877void EmitFPRoundEven64(EmitContext& ctx, std::string_view value) {
878 NotImplemented();
879}
880
881void EmitFPFloor16(EmitContext& ctx, std::string_view value) {
882 NotImplemented();
883}
884
885void EmitFPFloor32(EmitContext& ctx, std::string_view value) {
886 NotImplemented();
887}
888
889void EmitFPFloor64(EmitContext& ctx, std::string_view value) {
890 NotImplemented();
891}
892
893void EmitFPCeil16(EmitContext& ctx, std::string_view value) {
894 NotImplemented();
895}
896
897void EmitFPCeil32(EmitContext& ctx, std::string_view value) {
898 NotImplemented();
899}
900
901void EmitFPCeil64(EmitContext& ctx, std::string_view value) {
902 NotImplemented();
903}
904
905void EmitFPTrunc16(EmitContext& ctx, std::string_view value) {
906 NotImplemented();
907}
908
909void EmitFPTrunc32(EmitContext& ctx, std::string_view value) {
910 NotImplemented();
911}
912
913void EmitFPTrunc64(EmitContext& ctx, std::string_view value) {
914 NotImplemented();
915}
916
917void EmitFPOrdEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
918 NotImplemented();
919}
920
921void EmitFPOrdEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
922 NotImplemented();
923}
924
925void EmitFPOrdEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
926 NotImplemented();
927}
928
929void EmitFPUnordEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
930 NotImplemented();
931}
932
933void EmitFPUnordEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
934 NotImplemented();
935}
936
937void EmitFPUnordEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
938 NotImplemented();
939}
940
941void EmitFPOrdNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
942 NotImplemented();
943}
944
945void EmitFPOrdNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
946 NotImplemented();
947}
948
949void EmitFPOrdNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
950 NotImplemented();
951}
952
953void EmitFPUnordNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
954 NotImplemented();
955}
956
957void EmitFPUnordNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
958 NotImplemented();
959}
960
961void EmitFPUnordNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
962 NotImplemented();
963}
964
965void EmitFPOrdLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
966 NotImplemented();
967}
968
969void EmitFPOrdLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
970 NotImplemented();
971}
972
973void EmitFPOrdLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
974 NotImplemented();
975}
976
977void EmitFPUnordLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
978 NotImplemented();
979}
980
981void EmitFPUnordLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
982 NotImplemented();
983}
984
985void EmitFPUnordLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
986 NotImplemented();
987}
988
989void EmitFPOrdGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
990 NotImplemented();
991}
992
993void EmitFPOrdGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
994 NotImplemented();
995}
996
997void EmitFPOrdGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
998 NotImplemented();
999}
1000
1001void EmitFPUnordGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1002 NotImplemented();
1003}
1004
1005void EmitFPUnordGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1006 NotImplemented();
1007}
1008
1009void EmitFPUnordGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1010 NotImplemented();
1011}
1012
1013void EmitFPOrdLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1014 NotImplemented();
1015}
1016
1017void EmitFPOrdLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1018 NotImplemented();
1019}
1020
1021void EmitFPOrdLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1022 NotImplemented();
1023}
1024
1025void EmitFPUnordLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1026 NotImplemented();
1027}
1028
1029void EmitFPUnordLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1030 NotImplemented();
1031}
1032
1033void EmitFPUnordLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1034 NotImplemented();
1035}
1036
1037void EmitFPOrdGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1038 NotImplemented();
1039}
1040
1041void EmitFPOrdGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1042 NotImplemented();
1043}
1044
1045void EmitFPOrdGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1046 NotImplemented();
1047}
1048
1049void EmitFPUnordGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1050 NotImplemented();
1051}
1052
1053void EmitFPUnordGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1054 NotImplemented();
1055}
1056
1057void EmitFPUnordGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1058 NotImplemented();
1059}
1060
1061void EmitFPIsNan16(EmitContext& ctx, std::string_view value) {
1062 NotImplemented();
1063}
1064
1065void EmitFPIsNan32(EmitContext& ctx, std::string_view value) {
1066 NotImplemented();
1067}
1068
1069void EmitFPIsNan64(EmitContext& ctx, std::string_view value) {
1070 NotImplemented();
1071}
1072
1073void EmitIAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
1074 NotImplemented();
1075}
1076
1077void EmitIAdd64(EmitContext& ctx, std::string_view a, std::string_view b) {
1078 NotImplemented();
1079}
1080
1081void EmitISub32(EmitContext& ctx, std::string_view a, std::string_view b) {
1082 NotImplemented();
1083}
1084
1085void EmitISub64(EmitContext& ctx, std::string_view a, std::string_view b) {
1086 NotImplemented();
1087}
1088
1089void EmitIMul32(EmitContext& ctx, std::string_view a, std::string_view b) {
1090 NotImplemented();
1091}
1092
1093void EmitINeg32(EmitContext& ctx, std::string_view value) {
1094 NotImplemented();
1095}
1096
1097void EmitINeg64(EmitContext& ctx, std::string_view value) {
1098 NotImplemented();
1099}
1100
1101void EmitIAbs32(EmitContext& ctx, std::string_view value) {
1102 NotImplemented();
1103}
1104
1105void EmitIAbs64(EmitContext& ctx, std::string_view value) {
1106 NotImplemented();
1107}
1108
1109void EmitShiftLeftLogical32(EmitContext& ctx, std::string_view base, std::string_view shift) {
1110 NotImplemented();
1111}
1112
1113void EmitShiftLeftLogical64(EmitContext& ctx, std::string_view base, std::string_view shift) {
1114 NotImplemented();
1115}
1116
1117void EmitShiftRightLogical32(EmitContext& ctx, std::string_view base, std::string_view shift) {
1118 NotImplemented();
1119}
1120
1121void EmitShiftRightLogical64(EmitContext& ctx, std::string_view base, std::string_view shift) {
1122 NotImplemented();
1123}
1124
1125void EmitShiftRightArithmetic32(EmitContext& ctx, std::string_view base, std::string_view shift) {
1126 NotImplemented();
1127}
1128
1129void EmitShiftRightArithmetic64(EmitContext& ctx, std::string_view base, std::string_view shift) {
1130 NotImplemented();
1131}
1132
1133void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
1134 NotImplemented();
1135}
1136
1137void EmitBitwiseOr32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
1138 NotImplemented();
1139}
1140
1141void EmitBitwiseXor32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
1142 NotImplemented();
1143}
1144
1145void EmitBitFieldInsert(EmitContext& ctx, std::string_view base, std::string_view insert,
1146 std::string_view offset, std::string_view count) {
1147 NotImplemented();
1148}
1149
1150void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base,
1151 std::string_view offset, std::string_view count) {
1152 NotImplemented();
1153}
1154
1155void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base,
1156 std::string_view offset, std::string_view count) {
1157 NotImplemented();
1158}
1159
1160void EmitBitReverse32(EmitContext& ctx, std::string_view value) {
1161 NotImplemented();
1162}
1163
1164void EmitBitCount32(EmitContext& ctx, std::string_view value) {
1165 NotImplemented();
1166}
1167
1168void EmitBitwiseNot32(EmitContext& ctx, std::string_view value) {
1169 NotImplemented();
1170}
1171
1172void EmitFindSMsb32(EmitContext& ctx, std::string_view value) {
1173 NotImplemented();
1174}
1175
1176void EmitFindUMsb32(EmitContext& ctx, std::string_view value) {
1177 NotImplemented();
1178}
1179
1180void EmitSMin32(EmitContext& ctx, std::string_view a, std::string_view b) {
1181 NotImplemented();
1182}
1183
1184void EmitUMin32(EmitContext& ctx, std::string_view a, std::string_view b) {
1185 NotImplemented();
1186}
1187
1188void EmitSMax32(EmitContext& ctx, std::string_view a, std::string_view b) {
1189 NotImplemented();
1190}
1191
1192void EmitUMax32(EmitContext& ctx, std::string_view a, std::string_view b) {
1193 NotImplemented();
1194}
1195
1196void EmitSClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min,
1197 std::string_view max) {
1198 NotImplemented();
1199}
1200
1201void EmitUClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min,
1202 std::string_view max) {
1203 NotImplemented();
1204}
1205
1206void EmitSLessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1207 NotImplemented();
1208}
1209
1210void EmitULessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1211 NotImplemented();
1212}
1213
1214void EmitIEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1215 NotImplemented();
1216}
1217
1218void EmitSLessThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1219 NotImplemented();
1220}
1221
1222void EmitULessThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1223 NotImplemented();
1224}
1225
1226void EmitSGreaterThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1227 NotImplemented();
1228}
1229
1230void EmitUGreaterThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1231 NotImplemented();
1232}
1233
1234void EmitINotEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1235 NotImplemented();
1236}
1237
1238void EmitSGreaterThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1239 NotImplemented();
1240}
1241
1242void EmitUGreaterThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1243 NotImplemented();
1244}
1245
1246void EmitSharedAtomicIAdd32(EmitContext& ctx, std::string_view pointer_offset,
1247 std::string_view value) {
1248 NotImplemented();
1249}
1250
1251void EmitSharedAtomicSMin32(EmitContext& ctx, std::string_view pointer_offset,
1252 std::string_view value) {
1253 NotImplemented();
1254}
1255
1256void EmitSharedAtomicUMin32(EmitContext& ctx, std::string_view pointer_offset,
1257 std::string_view value) {
1258 NotImplemented();
1259}
1260
1261void EmitSharedAtomicSMax32(EmitContext& ctx, std::string_view pointer_offset,
1262 std::string_view value) {
1263 NotImplemented();
1264}
1265
1266void EmitSharedAtomicUMax32(EmitContext& ctx, std::string_view pointer_offset,
1267 std::string_view value) {
1268 NotImplemented();
1269}
1270
1271void EmitSharedAtomicInc32(EmitContext& ctx, std::string_view pointer_offset,
1272 std::string_view value) {
1273 NotImplemented();
1274}
1275
1276void EmitSharedAtomicDec32(EmitContext& ctx, std::string_view pointer_offset,
1277 std::string_view value) {
1278 NotImplemented();
1279}
1280
1281void EmitSharedAtomicAnd32(EmitContext& ctx, std::string_view pointer_offset,
1282 std::string_view value) {
1283 NotImplemented();
1284}
1285
1286void EmitSharedAtomicOr32(EmitContext& ctx, std::string_view pointer_offset,
1287 std::string_view value) {
1288 NotImplemented();
1289}
1290
1291void EmitSharedAtomicXor32(EmitContext& ctx, std::string_view pointer_offset,
1292 std::string_view value) {
1293 NotImplemented();
1294}
1295
1296void EmitSharedAtomicExchange32(EmitContext& ctx, std::string_view pointer_offset,
1297 std::string_view value) {
1298 NotImplemented();
1299}
1300
1301void EmitSharedAtomicExchange64(EmitContext& ctx, std::string_view pointer_offset,
1302 std::string_view value) {
1303 NotImplemented();
1304}
1305
1306void EmitStorageAtomicIAdd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1307 std::string_view value) {
1308 NotImplemented();
1309}
1310
1311void EmitStorageAtomicSMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1312 std::string_view value) {
1313 NotImplemented();
1314}
1315
1316void EmitStorageAtomicUMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1317 std::string_view value) {
1318 NotImplemented();
1319}
1320
1321void EmitStorageAtomicSMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1322 std::string_view value) {
1323 NotImplemented();
1324}
1325
1326void EmitStorageAtomicUMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1327 std::string_view value) {
1328 NotImplemented();
1329}
1330
1331void EmitStorageAtomicInc32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1332 std::string_view value) {
1333 NotImplemented();
1334}
1335
1336void EmitStorageAtomicDec32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1337 std::string_view value) {
1338 NotImplemented();
1339}
1340
1341void EmitStorageAtomicAnd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1342 std::string_view value) {
1343 NotImplemented();
1344}
1345
1346void EmitStorageAtomicOr32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1347 std::string_view value) {
1348 NotImplemented();
1349}
1350
1351void EmitStorageAtomicXor32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1352 std::string_view value) {
1353 NotImplemented();
1354}
1355
1356void EmitStorageAtomicExchange32(EmitContext& ctx, const IR::Value& binding,
1357 const IR::Value& offset, std::string_view value) {
1358 NotImplemented();
1359}
1360
1361void EmitStorageAtomicIAdd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1362 std::string_view value) {
1363 NotImplemented();
1364}
1365
1366void EmitStorageAtomicSMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1367 std::string_view value) {
1368 NotImplemented();
1369}
1370
1371void EmitStorageAtomicUMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1372 std::string_view value) {
1373 NotImplemented();
1374}
1375
1376void EmitStorageAtomicSMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1377 std::string_view value) {
1378 NotImplemented();
1379}
1380
1381void EmitStorageAtomicUMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1382 std::string_view value) {
1383 NotImplemented();
1384}
1385
1386void EmitStorageAtomicAnd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1387 std::string_view value) {
1388 NotImplemented();
1389}
1390
1391void EmitStorageAtomicOr64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1392 std::string_view value) {
1393 NotImplemented();
1394}
1395
1396void EmitStorageAtomicXor64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1397 std::string_view value) {
1398 NotImplemented();
1399}
1400
1401void EmitStorageAtomicExchange64(EmitContext& ctx, const IR::Value& binding,
1402 const IR::Value& offset, std::string_view value) {
1403 NotImplemented();
1404}
1405
1406void EmitStorageAtomicAddF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1407 std::string_view value) {
1408 NotImplemented();
1409}
1410
1411void EmitStorageAtomicAddF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1412 std::string_view value) {
1413 NotImplemented();
1414}
1415
1416void EmitStorageAtomicAddF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1417 std::string_view value) {
1418 NotImplemented();
1419}
1420
1421void EmitStorageAtomicMinF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1422 std::string_view value) {
1423 NotImplemented();
1424}
1425
1426void EmitStorageAtomicMinF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1427 std::string_view value) {
1428 NotImplemented();
1429}
1430
1431void EmitStorageAtomicMaxF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1432 std::string_view value) {
1433 NotImplemented();
1434}
1435
1436void EmitStorageAtomicMaxF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1437 std::string_view value) {
1438 NotImplemented();
1439}
1440
1441void EmitGlobalAtomicIAdd32(EmitContext& ctx) {
1442 NotImplemented();
1443}
1444
1445void EmitGlobalAtomicSMin32(EmitContext& ctx) {
1446 NotImplemented();
1447}
1448
1449void EmitGlobalAtomicUMin32(EmitContext& ctx) {
1450 NotImplemented();
1451}
1452
1453void EmitGlobalAtomicSMax32(EmitContext& ctx) {
1454 NotImplemented();
1455}
1456
1457void EmitGlobalAtomicUMax32(EmitContext& ctx) {
1458 NotImplemented();
1459}
1460
1461void EmitGlobalAtomicInc32(EmitContext& ctx) {
1462 NotImplemented();
1463}
1464
1465void EmitGlobalAtomicDec32(EmitContext& ctx) {
1466 NotImplemented();
1467}
1468
1469void EmitGlobalAtomicAnd32(EmitContext& ctx) {
1470 NotImplemented();
1471}
1472
1473void EmitGlobalAtomicOr32(EmitContext& ctx) {
1474 NotImplemented();
1475}
1476
1477void EmitGlobalAtomicXor32(EmitContext& ctx) {
1478 NotImplemented();
1479}
1480
1481void EmitGlobalAtomicExchange32(EmitContext& ctx) {
1482 NotImplemented();
1483}
1484
1485void EmitGlobalAtomicIAdd64(EmitContext& ctx) {
1486 NotImplemented();
1487}
1488
1489void EmitGlobalAtomicSMin64(EmitContext& ctx) {
1490 NotImplemented();
1491}
1492
1493void EmitGlobalAtomicUMin64(EmitContext& ctx) {
1494 NotImplemented();
1495}
1496
1497void EmitGlobalAtomicSMax64(EmitContext& ctx) {
1498 NotImplemented();
1499}
1500
1501void EmitGlobalAtomicUMax64(EmitContext& ctx) {
1502 NotImplemented();
1503}
1504
1505void EmitGlobalAtomicInc64(EmitContext& ctx) {
1506 NotImplemented();
1507}
1508
1509void EmitGlobalAtomicDec64(EmitContext& ctx) {
1510 NotImplemented();
1511}
1512
1513void EmitGlobalAtomicAnd64(EmitContext& ctx) {
1514 NotImplemented();
1515}
1516
1517void EmitGlobalAtomicOr64(EmitContext& ctx) {
1518 NotImplemented();
1519}
1520
1521void EmitGlobalAtomicXor64(EmitContext& ctx) {
1522 NotImplemented();
1523}
1524
1525void EmitGlobalAtomicExchange64(EmitContext& ctx) {
1526 NotImplemented();
1527}
1528
1529void EmitGlobalAtomicAddF32(EmitContext& ctx) {
1530 NotImplemented();
1531}
1532
1533void EmitGlobalAtomicAddF16x2(EmitContext& ctx) {
1534 NotImplemented();
1535}
1536
1537void EmitGlobalAtomicAddF32x2(EmitContext& ctx) {
1538 NotImplemented();
1539}
1540
1541void EmitGlobalAtomicMinF16x2(EmitContext& ctx) {
1542 NotImplemented();
1543}
1544
1545void EmitGlobalAtomicMinF32x2(EmitContext& ctx) {
1546 NotImplemented();
1547}
1548
1549void EmitGlobalAtomicMaxF16x2(EmitContext& ctx) {
1550 NotImplemented();
1551}
1552
1553void EmitGlobalAtomicMaxF32x2(EmitContext& ctx) {
1554 NotImplemented();
1555}
1556
1557void EmitLogicalOr(EmitContext& ctx, std::string_view a, std::string_view b) {
1558 NotImplemented();
1559}
1560
1561void EmitLogicalAnd(EmitContext& ctx, std::string_view a, std::string_view b) {
1562 NotImplemented();
1563}
1564
1565void EmitLogicalXor(EmitContext& ctx, std::string_view a, std::string_view b) {
1566 NotImplemented();
1567}
1568
1569void EmitLogicalNot(EmitContext& ctx, std::string_view value) {
1570 NotImplemented();
1571}
1572
1573void EmitConvertS16F16(EmitContext& ctx, std::string_view value) {
1574 NotImplemented();
1575}
1576
1577void EmitConvertS16F32(EmitContext& ctx, std::string_view value) {
1578 NotImplemented();
1579}
1580
1581void EmitConvertS16F64(EmitContext& ctx, std::string_view value) {
1582 NotImplemented();
1583}
1584
1585void EmitConvertS32F16(EmitContext& ctx, std::string_view value) {
1586 NotImplemented();
1587}
1588
1589void EmitConvertS32F32(EmitContext& ctx, std::string_view value) {
1590 NotImplemented();
1591}
1592
1593void EmitConvertS32F64(EmitContext& ctx, std::string_view value) {
1594 NotImplemented();
1595}
1596
1597void EmitConvertS64F16(EmitContext& ctx, std::string_view value) {
1598 NotImplemented();
1599}
1600
1601void EmitConvertS64F32(EmitContext& ctx, std::string_view value) {
1602 NotImplemented();
1603}
1604
1605void EmitConvertS64F64(EmitContext& ctx, std::string_view value) {
1606 NotImplemented();
1607}
1608
1609void EmitConvertU16F16(EmitContext& ctx, std::string_view value) {
1610 NotImplemented();
1611}
1612
1613void EmitConvertU16F32(EmitContext& ctx, std::string_view value) {
1614 NotImplemented();
1615}
1616
1617void EmitConvertU16F64(EmitContext& ctx, std::string_view value) {
1618 NotImplemented();
1619}
1620
1621void EmitConvertU32F16(EmitContext& ctx, std::string_view value) {
1622 NotImplemented();
1623}
1624
1625void EmitConvertU32F32(EmitContext& ctx, std::string_view value) {
1626 NotImplemented();
1627}
1628
1629void EmitConvertU32F64(EmitContext& ctx, std::string_view value) {
1630 NotImplemented();
1631}
1632
1633void EmitConvertU64F16(EmitContext& ctx, std::string_view value) {
1634 NotImplemented();
1635}
1636
1637void EmitConvertU64F32(EmitContext& ctx, std::string_view value) {
1638 NotImplemented();
1639}
1640
1641void EmitConvertU64F64(EmitContext& ctx, std::string_view value) {
1642 NotImplemented();
1643}
1644
1645void EmitConvertU64U32(EmitContext& ctx, std::string_view value) {
1646 NotImplemented();
1647}
1648
1649void EmitConvertU32U64(EmitContext& ctx, std::string_view value) {
1650 NotImplemented();
1651}
1652
1653void EmitConvertF16F32(EmitContext& ctx, std::string_view value) {
1654 NotImplemented();
1655}
1656
1657void EmitConvertF32F16(EmitContext& ctx, std::string_view value) {
1658 NotImplemented();
1659}
1660
1661void EmitConvertF32F64(EmitContext& ctx, std::string_view value) {
1662 NotImplemented();
1663}
1664
1665void EmitConvertF64F32(EmitContext& ctx, std::string_view value) {
1666 NotImplemented();
1667}
1668
1669void EmitConvertF16S8(EmitContext& ctx, std::string_view value) {
1670 NotImplemented();
1671}
1672
1673void EmitConvertF16S16(EmitContext& ctx, std::string_view value) {
1674 NotImplemented();
1675}
1676
1677void EmitConvertF16S32(EmitContext& ctx, std::string_view value) {
1678 NotImplemented();
1679}
1680
1681void EmitConvertF16S64(EmitContext& ctx, std::string_view value) {
1682 NotImplemented();
1683}
1684
1685void EmitConvertF16U8(EmitContext& ctx, std::string_view value) {
1686 NotImplemented();
1687}
1688
1689void EmitConvertF16U16(EmitContext& ctx, std::string_view value) {
1690 NotImplemented();
1691}
1692
1693void EmitConvertF16U32(EmitContext& ctx, std::string_view value) {
1694 NotImplemented();
1695}
1696
1697void EmitConvertF16U64(EmitContext& ctx, std::string_view value) {
1698 NotImplemented();
1699}
1700
1701void EmitConvertF32S8(EmitContext& ctx, std::string_view value) {
1702 NotImplemented();
1703}
1704
1705void EmitConvertF32S16(EmitContext& ctx, std::string_view value) {
1706 NotImplemented();
1707}
1708
1709void EmitConvertF32S32(EmitContext& ctx, std::string_view value) {
1710 NotImplemented();
1711}
1712
1713void EmitConvertF32S64(EmitContext& ctx, std::string_view value) {
1714 NotImplemented();
1715}
1716
1717void EmitConvertF32U8(EmitContext& ctx, std::string_view value) {
1718 NotImplemented();
1719}
1720
1721void EmitConvertF32U16(EmitContext& ctx, std::string_view value) {
1722 NotImplemented();
1723}
1724
1725void EmitConvertF32U32(EmitContext& ctx, std::string_view value) {
1726 NotImplemented();
1727}
1728
1729void EmitConvertF32U64(EmitContext& ctx, std::string_view value) {
1730 NotImplemented();
1731}
1732
1733void EmitConvertF64S8(EmitContext& ctx, std::string_view value) {
1734 NotImplemented();
1735}
1736
1737void EmitConvertF64S16(EmitContext& ctx, std::string_view value) {
1738 NotImplemented();
1739}
1740
1741void EmitConvertF64S32(EmitContext& ctx, std::string_view value) {
1742 NotImplemented();
1743}
1744
1745void EmitConvertF64S64(EmitContext& ctx, std::string_view value) {
1746 NotImplemented();
1747}
1748
1749void EmitConvertF64U8(EmitContext& ctx, std::string_view value) {
1750 NotImplemented();
1751}
1752
1753void EmitConvertF64U16(EmitContext& ctx, std::string_view value) {
1754 NotImplemented();
1755}
1756
1757void EmitConvertF64U32(EmitContext& ctx, std::string_view value) {
1758 NotImplemented();
1759}
1760
1761void EmitConvertF64U64(EmitContext& ctx, std::string_view value) {
1762 NotImplemented();
1763}
1764
1765void EmitBindlessImageSampleImplicitLod(EmitContext&) {
1766 NotImplemented();
1767}
1768
1769void EmitBindlessImageSampleExplicitLod(EmitContext&) {
1770 NotImplemented();
1771}
1772
1773void EmitBindlessImageSampleDrefImplicitLod(EmitContext&) {
1774 NotImplemented();
1775}
1776
1777void EmitBindlessImageSampleDrefExplicitLod(EmitContext&) {
1778 NotImplemented();
1779}
1780
1781void EmitBindlessImageGather(EmitContext&) {
1782 NotImplemented();
1783}
1784
1785void EmitBindlessImageGatherDref(EmitContext&) {
1786 NotImplemented();
1787}
1788
1789void EmitBindlessImageFetch(EmitContext&) {
1790 NotImplemented();
1791}
1792
1793void EmitBindlessImageQueryDimensions(EmitContext&) {
1794 NotImplemented();
1795}
1796
1797void EmitBindlessImageQueryLod(EmitContext&) {
1798 NotImplemented();
1799}
1800
1801void EmitBindlessImageGradient(EmitContext&) {
1802 NotImplemented();
1803}
1804
1805void EmitBindlessImageRead(EmitContext&) {
1806 NotImplemented();
1807}
1808
1809void EmitBindlessImageWrite(EmitContext&) {
1810 NotImplemented();
1811}
1812
1813void EmitBoundImageSampleImplicitLod(EmitContext&) {
1814 NotImplemented();
1815}
1816
1817void EmitBoundImageSampleExplicitLod(EmitContext&) {
1818 NotImplemented();
1819}
1820
1821void EmitBoundImageSampleDrefImplicitLod(EmitContext&) {
1822 NotImplemented();
1823}
1824
1825void EmitBoundImageSampleDrefExplicitLod(EmitContext&) {
1826 NotImplemented();
1827}
1828
1829void EmitBoundImageGather(EmitContext&) {
1830 NotImplemented();
1831}
1832
1833void EmitBoundImageGatherDref(EmitContext&) {
1834 NotImplemented();
1835}
1836
1837void EmitBoundImageFetch(EmitContext&) {
1838 NotImplemented();
1839}
1840
1841void EmitBoundImageQueryDimensions(EmitContext&) {
1842 NotImplemented();
1843}
1844
1845void EmitBoundImageQueryLod(EmitContext&) {
1846 NotImplemented();
1847}
1848
1849void EmitBoundImageGradient(EmitContext&) {
1850 NotImplemented();
1851}
1852
1853void EmitBoundImageRead(EmitContext&) {
1854 NotImplemented();
1855}
1856
1857void EmitBoundImageWrite(EmitContext&) {
1858 NotImplemented();
1859}
1860
1861void EmitImageSampleImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1862 std::string_view coords, std::string_view bias_lc,
1863 const IR::Value& offset) {
1864 NotImplemented();
1865}
1866
1867void EmitImageSampleExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1868 std::string_view coords, std::string_view lod_lc,
1869 const IR::Value& offset) {
1870 NotImplemented();
1871}
1872
1873void EmitImageSampleDrefImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1874 std::string_view coords, std::string_view dref,
1875 std::string_view bias_lc, const IR::Value& offset) {
1876 NotImplemented();
1877}
1878
1879void EmitImageSampleDrefExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1880 std::string_view coords, std::string_view dref,
1881 std::string_view lod_lc, const IR::Value& offset) {
1882 NotImplemented();
1883}
1884
1885void EmitImageGather(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1886 std::string_view coords, const IR::Value& offset, const IR::Value& offset2) {
1887 NotImplemented();
1888}
1889
1890void EmitImageGatherDref(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1891 std::string_view coords, const IR::Value& offset, const IR::Value& offset2,
1892 std::string_view dref) {
1893 NotImplemented();
1894}
1895
1896void EmitImageFetch(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1897 std::string_view coords, std::string_view offset, std::string_view lod,
1898 std::string_view ms) {
1899 NotImplemented();
1900}
1901
1902void EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1903 std::string_view lod) {
1904 NotImplemented();
1905}
1906
1907void EmitImageQueryLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1908 std::string_view coords) {
1909 NotImplemented();
1910}
1911
1912void EmitImageGradient(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1913 std::string_view coords, std::string_view derivates, std::string_view offset,
1914 std::string_view lod_clamp) {
1915 NotImplemented();
1916}
1917
1918void EmitImageRead(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1919 std::string_view coords) {
1920 NotImplemented();
1921}
1922
1923void EmitImageWrite(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1924 std::string_view coords, std::string_view color) {
1925 NotImplemented();
1926}
1927
1928void EmitBindlessImageAtomicIAdd32(EmitContext&) {
1929 NotImplemented();
1930}
1931
1932void EmitBindlessImageAtomicSMin32(EmitContext&) {
1933 NotImplemented();
1934}
1935
1936void EmitBindlessImageAtomicUMin32(EmitContext&) {
1937 NotImplemented();
1938}
1939
1940void EmitBindlessImageAtomicSMax32(EmitContext&) {
1941 NotImplemented();
1942}
1943
1944void EmitBindlessImageAtomicUMax32(EmitContext&) {
1945 NotImplemented();
1946}
1947
1948void EmitBindlessImageAtomicInc32(EmitContext&) {
1949 NotImplemented();
1950}
1951
1952void EmitBindlessImageAtomicDec32(EmitContext&) {
1953 NotImplemented();
1954}
1955
1956void EmitBindlessImageAtomicAnd32(EmitContext&) {
1957 NotImplemented();
1958}
1959
1960void EmitBindlessImageAtomicOr32(EmitContext&) {
1961 NotImplemented();
1962}
1963
1964void EmitBindlessImageAtomicXor32(EmitContext&) {
1965 NotImplemented();
1966}
1967
1968void EmitBindlessImageAtomicExchange32(EmitContext&) {
1969 NotImplemented();
1970}
1971
1972void EmitBoundImageAtomicIAdd32(EmitContext&) {
1973 NotImplemented();
1974}
1975
1976void EmitBoundImageAtomicSMin32(EmitContext&) {
1977 NotImplemented();
1978}
1979
1980void EmitBoundImageAtomicUMin32(EmitContext&) {
1981 NotImplemented();
1982}
1983
1984void EmitBoundImageAtomicSMax32(EmitContext&) {
1985 NotImplemented();
1986}
1987
1988void EmitBoundImageAtomicUMax32(EmitContext&) {
1989 NotImplemented();
1990}
1991
1992void EmitBoundImageAtomicInc32(EmitContext&) {
1993 NotImplemented();
1994}
1995
1996void EmitBoundImageAtomicDec32(EmitContext&) {
1997 NotImplemented();
1998}
1999
2000void EmitBoundImageAtomicAnd32(EmitContext&) {
2001 NotImplemented();
2002}
2003
2004void EmitBoundImageAtomicOr32(EmitContext&) {
2005 NotImplemented();
2006}
2007
2008void EmitBoundImageAtomicXor32(EmitContext&) {
2009 NotImplemented();
2010}
2011
2012void EmitBoundImageAtomicExchange32(EmitContext&) {
2013 NotImplemented();
2014}
2015
2016void EmitImageAtomicIAdd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2017 std::string_view coords, std::string_view value) {
2018 NotImplemented();
2019}
2020
2021void EmitImageAtomicSMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2022 std::string_view coords, std::string_view value) {
2023 NotImplemented();
2024}
2025
2026void EmitImageAtomicUMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2027 std::string_view coords, std::string_view value) {
2028 NotImplemented();
2029}
2030
2031void EmitImageAtomicSMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2032 std::string_view coords, std::string_view value) {
2033 NotImplemented();
2034}
2035
2036void EmitImageAtomicUMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2037 std::string_view coords, std::string_view value) {
2038 NotImplemented();
2039}
2040
2041void EmitImageAtomicInc32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2042 std::string_view coords, std::string_view value) {
2043 NotImplemented();
2044}
2045
2046void EmitImageAtomicDec32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2047 std::string_view coords, std::string_view value) {
2048 NotImplemented();
2049}
2050
2051void EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2052 std::string_view coords, std::string_view value) {
2053 NotImplemented();
2054}
2055
2056void EmitImageAtomicOr32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2057 std::string_view coords, std::string_view value) {
2058 NotImplemented();
2059}
2060
2061void EmitImageAtomicXor32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2062 std::string_view coords, std::string_view value) {
2063 NotImplemented();
2064}
2065
2066void EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2067 std::string_view coords, std::string_view value) {
2068 NotImplemented();
2069}
2070
2071void EmitLaneId(EmitContext& ctx) {
2072 NotImplemented();
2073}
2074
2075void EmitVoteAll(EmitContext& ctx, std::string_view pred) {
2076 NotImplemented();
2077}
2078
2079void EmitVoteAny(EmitContext& ctx, std::string_view pred) {
2080 NotImplemented();
2081}
2082
2083void EmitVoteEqual(EmitContext& ctx, std::string_view pred) {
2084 NotImplemented();
2085}
2086
2087void EmitSubgroupBallot(EmitContext& ctx, std::string_view pred) {
2088 NotImplemented();
2089}
2090
2091void EmitSubgroupEqMask(EmitContext& ctx) {
2092 NotImplemented();
2093}
2094
2095void EmitSubgroupLtMask(EmitContext& ctx) {
2096 NotImplemented();
2097}
2098
2099void EmitSubgroupLeMask(EmitContext& ctx) {
2100 NotImplemented();
2101}
2102
2103void EmitSubgroupGtMask(EmitContext& ctx) {
2104 NotImplemented();
2105}
2106
2107void EmitSubgroupGeMask(EmitContext& ctx) {
2108 NotImplemented();
2109}
2110
2111void EmitShuffleIndex(EmitContext& ctx, IR::Inst* inst, std::string_view value,
2112 std::string_view index, std::string_view clamp,
2113 std::string_view segmentation_mask) {
2114 NotImplemented();
2115}
2116
2117void EmitShuffleUp(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view index,
2118 std::string_view clamp, std::string_view segmentation_mask) {
2119 NotImplemented();
2120}
2121
2122void EmitShuffleDown(EmitContext& ctx, IR::Inst* inst, std::string_view value,
2123 std::string_view index, std::string_view clamp,
2124 std::string_view segmentation_mask) {
2125 NotImplemented();
2126}
2127
2128void EmitShuffleButterfly(EmitContext& ctx, IR::Inst* inst, std::string_view value,
2129 std::string_view index, std::string_view clamp,
2130 std::string_view segmentation_mask) {
2131 NotImplemented();
2132}
2133
2134void EmitFSwizzleAdd(EmitContext& ctx, std::string_view op_a, std::string_view op_b,
2135 std::string_view swizzle) {
2136 NotImplemented();
2137}
2138
2139void EmitDPdxFine(EmitContext& ctx, std::string_view op_a) {
2140 NotImplemented();
2141}
2142
2143void EmitDPdyFine(EmitContext& ctx, std::string_view op_a) {
2144 NotImplemented();
2145}
2146
2147void EmitDPdxCoarse(EmitContext& ctx, std::string_view op_a) {
2148 NotImplemented();
2149}
2150
2151void EmitDPdyCoarse(EmitContext& ctx, std::string_view op_a) {
2152 NotImplemented();
2153}
2154
2155} // namespace Shader::Backend::GLASM
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_select.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_select.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_select.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_shared_memory.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_shared_memory.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_shared_memory.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_special.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_special.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_special.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_undefined.cpp
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_warp.cpp
diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.cpp b/src/shader_recompiler/backend/glasm/reg_alloc.cpp
new file mode 100644
index 000000000..0460a394b
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/reg_alloc.cpp
@@ -0,0 +1,82 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <string>
6#include <string_view>
7
8#include <fmt/format.h>
9
10#include "shader_recompiler/backend/glasm/reg_alloc.h"
11#include "shader_recompiler/exception.h"
12#include "shader_recompiler/frontend/ir/value.h"
13
14namespace Shader::Backend::GLASM {
15namespace {
16constexpr std::string_view SWIZZLE = "xyzw";
17
18std::string Representation(Id id) {
19 if (id.is_condition_code != 0) {
20 throw NotImplementedException("Condition code");
21 }
22 if (id.is_spill != 0) {
23 throw NotImplementedException("Spilling");
24 }
25 const u32 num_elements{id.num_elements_minus_one + 1};
26 const u32 index{static_cast<u32>(id.index)};
27 if (num_elements == 4) {
28 return fmt::format("R{}", index);
29 } else {
30 return fmt::format("R{}.{}", index, SWIZZLE.substr(id.base_element, num_elements));
31 }
32}
33} // Anonymous namespace
34
35std::string RegAlloc::Define(IR::Inst& inst, u32 num_elements, u32 alignment) {
36 const Id id{Alloc(num_elements, alignment)};
37 inst.SetDefinition<Id>(id);
38 return Representation(id);
39}
40
41std::string RegAlloc::Consume(const IR::Value& value) {
42 if (!value.IsImmediate()) {
43 return Consume(*value.Inst());
44 }
45 throw NotImplementedException("Immediate loading");
46}
47
48std::string RegAlloc::Consume(IR::Inst& inst) {
49 const Id id{inst.Definition<Id>()};
50 inst.DestructiveRemoveUsage();
51 if (!inst.HasUses()) {
52 Free(id);
53 }
54 return Representation(inst.Definition<Id>());
55}
56
57Id RegAlloc::Alloc(u32 num_elements, [[maybe_unused]] u32 alignment) {
58 for (size_t reg = 0; reg < NUM_REGS; ++reg) {
59 if (register_use[reg]) {
60 continue;
61 }
62 num_used_registers = std::max(num_used_registers, reg + 1);
63 register_use[reg] = true;
64 return Id{
65 .base_element = 0,
66 .num_elements_minus_one = num_elements - 1,
67 .index = static_cast<u32>(reg),
68 .is_spill = 0,
69 .is_condition_code = 0,
70 };
71 }
72 throw NotImplementedException("Register spilling");
73}
74
75void RegAlloc::Free(Id id) {
76 if (id.is_spill != 0) {
77 throw NotImplementedException("Free spill");
78 }
79 register_use[id.index] = false;
80}
81
82} // namespace Shader::Backend::GLASM
diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.h b/src/shader_recompiler/backend/glasm/reg_alloc.h
new file mode 100644
index 000000000..46018b0c2
--- /dev/null
+++ b/src/shader_recompiler/backend/glasm/reg_alloc.h
@@ -0,0 +1,46 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <bitset>
8
9#include "common/common_types.h"
10
11namespace Shader::IR {
12class Inst;
13class Value;
14} // namespace Shader::IR
15
16namespace Shader::Backend::GLASM {
17
18struct Id {
19 u32 base_element : 2;
20 u32 num_elements_minus_one : 2;
21 u32 index : 26;
22 u32 is_spill : 1;
23 u32 is_condition_code : 1;
24};
25
26class RegAlloc {
27public:
28 std::string Define(IR::Inst& inst, u32 num_elements = 1, u32 alignment = 1);
29
30 std::string Consume(const IR::Value& value);
31
32private:
33 static constexpr size_t NUM_REGS = 4096;
34 static constexpr size_t NUM_ELEMENTS = 4;
35
36 std::string Consume(IR::Inst& inst);
37
38 Id Alloc(u32 num_elements, u32 alignment);
39
40 void Free(Id id);
41
42 size_t num_used_registers{};
43 std::bitset<NUM_REGS> register_use{};
44};
45
46} // namespace Shader::Backend::GLASM
diff --git a/src/shader_recompiler/frontend/ir/value.h b/src/shader_recompiler/frontend/ir/value.h
index bb7d19001..c73851d11 100644
--- a/src/shader_recompiler/frontend/ir/value.h
+++ b/src/shader_recompiler/frontend/ir/value.h
@@ -218,6 +218,12 @@ public:
218 return Common::BitCast<DefinitionType>(definition); 218 return Common::BitCast<DefinitionType>(definition);
219 } 219 }
220 220
221 /// Destructively remove one reference count from the instruction
222 /// Useful for register allocation
223 void DestructiveRemoveUsage() {
224 --use_count;
225 }
226
221private: 227private:
222 struct NonTriviallyDummy { 228 struct NonTriviallyDummy {
223 NonTriviallyDummy() noexcept {} 229 NonTriviallyDummy() noexcept {}