summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glasm/reg_alloc.h
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-05-08 16:46:32 -0300
committerGravatar ameerj2021-07-22 21:51:30 -0400
commit3e841f6441903c6e97307dd49a2543ce82654044 (patch)
treed6fb26667d43589b17aba1c51017c420c5b2696c /src/shader_recompiler/backend/glasm/reg_alloc.h
parentglasm: Remove unused argument in identity instructions on GLASM (diff)
downloadyuzu-3e841f6441903c6e97307dd49a2543ce82654044.tar.gz
yuzu-3e841f6441903c6e97307dd49a2543ce82654044.tar.xz
yuzu-3e841f6441903c6e97307dd49a2543ce82654044.zip
glasm: Use BitField instead of C bitfields
Diffstat (limited to 'src/shader_recompiler/backend/glasm/reg_alloc.h')
-rw-r--r--src/shader_recompiler/backend/glasm/reg_alloc.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.h b/src/shader_recompiler/backend/glasm/reg_alloc.h
index 83d728d20..f73aa3348 100644
--- a/src/shader_recompiler/backend/glasm/reg_alloc.h
+++ b/src/shader_recompiler/backend/glasm/reg_alloc.h
@@ -6,6 +6,7 @@
6 6
7#include <bitset> 7#include <bitset>
8 8
9#include "common/bit_field.h"
9#include "common/common_types.h" 10#include "common/common_types.h"
10 11
11namespace Shader::IR { 12namespace Shader::IR {
@@ -18,9 +19,12 @@ namespace Shader::Backend::GLASM {
18class EmitContext; 19class EmitContext;
19 20
20struct Id { 21struct Id {
21 u32 index : 30; 22 union {
22 u32 is_spill : 1; 23 u32 raw;
23 u32 is_condition_code : 1; 24 BitField<0, 30, u32> index;
25 BitField<30, 1, u32> is_spill;
26 BitField<31, 1, u32> is_condition_code;
27 };
24}; 28};
25 29
26class RegAlloc { 30class RegAlloc {