3#include <spirv/unified1/spirv.h>
7#include <util/wrdemit.h>
10 const h_util_ctx_t h_ctx
14 = h_ctx->m_count.m_capability
15 + h_ctx->m_count.m_ext
16 + h_ctx->m_count.m_memmodel
17 + h_ctx->m_count.m_entp
18 + h_ctx->m_count.m_execmode
19 + h_ctx->m_count.m_name
20 + h_ctx->m_count.m_decorate
21 + h_ctx->m_count.m_types
22 + h_ctx->m_count.m_vars
23 + h_ctx->m_count.m_fndef
26 _aclspv_grow_vec(malloc, _free, h_ctx->m_ret
30 unless(h_ctx->m_ret.m_p)
return ACLSPV_COMPILE_ALLOC_FAILED;
40#define cpypad retbuf + 5
41#define cpysz count_to_sz(h_ctx->m_count.m_capability)
43 if((
cpysz) != 0) memcpy(
cpypad, h_ctx->m_section.m_capability.m_p, (size_t)
cpysz);
47#define cpypad retbuf + 5
48 + (h_ctx->m_count.m_capability)
54#define cpypad retbuf + 5
55 + (h_ctx->m_count.m_capability)
56 + (h_ctx->m_count.m_ext)
58 if((
cpysz) != 0) memcpy(
cpypad, h_ctx->m_section.m_memmodel.m_p, (size_t)
cpysz);
63#define cpypad retbuf + 5
64 + (h_ctx->m_count.m_capability)
65 + (h_ctx->m_count.m_ext)
66 + (h_ctx->m_count.m_memmodel)
72#define cpypad retbuf + 5
73 + (h_ctx->m_count.m_capability)
74 + (h_ctx->m_count.m_ext)
75 + (h_ctx->m_count.m_memmodel)
76 + (h_ctx->m_count.m_entp)
78 if((
cpysz) != 0) memcpy(
cpypad, (h_ctx)->m_section.m_execmode.m_p, (size_t)
cpysz);
82#define cpypad retbuf + 5
83 + (h_ctx->m_count.m_capability)
84 + (h_ctx->m_count.m_ext)
85 + (h_ctx->m_count.m_memmodel)
86 + (h_ctx->m_count.m_entp)
87 + (h_ctx->m_count.m_execmode)
89 if((
cpysz) != 0) memcpy(
cpypad, (h_ctx)->m_section.m_name.m_p, (size_t)
cpysz);
94#define cpypad retbuf + 5
95 + (h_ctx->m_count.m_capability)
96 + (h_ctx->m_count.m_ext)
97 + (h_ctx->m_count.m_memmodel)
98 + (h_ctx->m_count.m_entp)
99 + (h_ctx->m_count.m_execmode)
100 + (h_ctx->m_count.m_name)
101#define cpysz count_to_sz(h_ctx->m_count.m_decorate)
102 if((
cpysz) != 0) memcpy(
cpypad, (h_ctx)->m_section.m_decorate.m_p, (size_t)
cpysz);
106#define cpypad retbuf + 5
107 + (h_ctx->m_count.m_capability)
108 + (h_ctx->m_count.m_ext)
109 + (h_ctx->m_count.m_memmodel)
110 + (h_ctx->m_count.m_entp)
111 + (h_ctx->m_count.m_execmode)
112 + (h_ctx->m_count.m_name)
113 + (h_ctx->m_count.m_decorate)
115 if((
cpysz) != 0) memcpy(
cpypad, (h_ctx)->m_section.m_types.m_p, (size_t)
cpysz);
121#define cpypad retbuf + 5
122 + (h_ctx->m_count.m_capability)
123 + (h_ctx->m_count.m_ext)
124 + (h_ctx->m_count.m_memmodel)
125 + (h_ctx->m_count.m_entp)
126 + (h_ctx->m_count.m_execmode)
127 + (h_ctx->m_count.m_name)
128 + (h_ctx->m_count.m_decorate)
129 + (h_ctx->m_count.m_types)
131 if((
cpysz) != 0) memcpy(
cpypad, (h_ctx)->m_section.m_vars.m_p, (size_t)
cpysz);
135#define cpypad retbuf + 5
136 + (h_ctx->m_count.m_capability)
137 + (h_ctx->m_count.m_ext)
138 + (h_ctx->m_count.m_memmodel)
139 + (h_ctx->m_count.m_entp)
140 + (h_ctx->m_count.m_execmode)
141 + (h_ctx->m_count.m_name)
142 + (h_ctx->m_count.m_decorate)
143 + (h_ctx->m_count.m_types)
144 + (h_ctx->m_count.m_vars)
146 if((
cpysz) != 0) memcpy(
cpypad, (h_ctx)->m_section.m_fndef.m_p, (size_t)
cpysz);
150 assert(h_ctx->m_ret.m_p);
152 return ACLSPV_COMPILE_OK;
#define unless(a)
Invokes when condition is false.
#define ae2f_extern
Suggests the existence of external variable or function, in naming of C. [non-mangling].
#define ACLSPV_ABI_DECL
Declaration as ABI.
#define ae2f_assume(a)
tells the compiler that value if a is false, below this keyword is not expected to be reached.
#define ae2f_unexpected_but_if(a)
#define ae2f_expected_but_else(a)
#define ae2f_noexcept
marker that this function does not throw something.
#define ae2f_restrict
Keyword as restrict on C99.
#define ae2f_expected_not(a)
expectes a as false.
#define ae2f_unreachable()
tells the compiler that below this keyword is not expected to be reached.
#define ae2f_inline
inline
#define ae2f_expected(a)
expectes a as true.
#define get_buf_from_scale(h_alloc, c_scale)
#define aclspv_opcode_t
integer as operation code
aclspv_wrd_t aclspv_wrdcount_t
the integer type represents the number of word.
#define aclspv_wrd_t
integer as word
aclspv_wrdcount_t m_num_cursor
number of m_cursors. for its use see util/cursor.h
util_bind_unified m_unified
#define emit_opcode(h_wrds, c_wrdcount, c_opcode, c_num_opprm_opt)
try emit opcode with num_opprm
#define get_wrd_of_vec(vec)
get word buffer from vector
#define count_to_sz(c_count)
word count to byte size