ae2f_docs
Loading...
Searching...
No Matches
spvty.h
Go to the documentation of this file.
1/**
2 * @file spvty.h
3 * @brief type definitions for spir-v output.
4 * */
5
6#ifndef aclspv_spvty_h
7#define aclspv_spvty_h
8
9#include <ae2f/c90/StdInt.h>
10
11/**
12 * @typedef aclspv_wrd_t
13 * @brief integer as word
14 * */
15#ifndef aclspv_wrd_t
16#define aclspv_wrd_t aclspv_wrd_t
17typedef uint32_t aclspv_wrd_t;
18#endif
19
20extern char ACLSPV_CHECK[sizeof(aclspv_wrd_t) >= 4 ? 1 : -1];
21
22/**
23 * @typedef aclspv_opcode_t
24 * @brief integer as operation code
25 * */
26#ifndef aclspv_opcode_t
27#define aclspv_opcode_t aclspv_opcode_t
28typedef uint_fast16_t aclspv_opcode_t;
29#endif
30
31extern char ACLSPV_CHECK[sizeof(aclspv_opcode_t) >= 2 ? 1 : -1];
32
33/**
34 * @def ACLSPV_MASK_OPCODE
35 * @brief mask for opcode
36 * */
37#define ACLSPV_MASK_OPCODE ((aclspv_wrd_t)0x0000ffff)
38/**
39 * @def ACLSPV_MASK_NOPRNDS
40 * @brief mask for number of operands
41 * */
42#define ACLSPV_MASK_NOPRNDS ((aclspv_wrd_t)0xffff0000)
43
44/**
45 * @def ACLSPV_MASK_WRD
46 * @brief mask for word
47 * */
48#define ACLSPV_MASK_WRD ((aclspv_wrd_t)0xffffffff)
49
50
51/**
52 * @typedef aclspv_num_opprm
53 * @brief number of parameter of opcode (aka `aclspv_opcode_t`)
54 * */
55typedef aclspv_wrd_t aclspv_num_opprm_t;
56
57/**
58 * @typedef aclspv_wrdcount_t
59 * @brief the integer type represents the number of word.
60 * */
62
63/**
64 * @typedef aclpsv_id_t
65 * @brief represents id in spir-v
66 * */
67typedef aclspv_wrd_t aclspv_id_t;
68
69#endif
#define ae2f_IS_SHARED
Definition Call.auto.h:12
#define ae2f_OFF
Definition Call.auto.h:3
#define unless(a)
Invokes when condition is false.
Definition Keys.h:34
#define ae2f_extern
Suggests the existence of external variable or function, in naming of C. [non-mangling].
Definition Keys.h:25
#define ae2f_NIL
Definition Nil.h:13
#define ACLSPV_ABI_DECL
Declaration as ABI.
Definition abi.h:23
#define STATE_VAL
#define FNINFO
#define ae2f_assume(a)
tells the compiler that value if a is false, below this keyword is not expected to be reached.
Definition cc.h:228
#define ae2f_unexpected_but_if(a)
Definition cc.h:192
#define ae2f_expected_but_else(a)
Definition cc.h:201
#define ae2f_restrict
Keyword as restrict on C99.
Definition cc.h:81
#define ae2f_expected_not(a)
expectes a as false.
Definition cc.h:185
#define ae2f_unreachable()
tells the compiler that below this keyword is not expected to be reached.
Definition cc.h:213
#define ae2f_expected(a)
expectes a as true.
Definition cc.h:184
#define get_buf_from_scale(h_alloc, c_scale)
Definition scale.h:34
#define aclspv_opcode_t
integer as operation code
Definition spvty.h:27
aclspv_wrd_t aclspv_wrdcount_t
the integer type represents the number of word.
Definition spvty.h:61
#define aclspv_wrd_t
integer as word
Definition spvty.h:16
aclspv_id_t m_id
id
Definition ctx.h:50
aclspv_wrdcount_t m_num_cursor
number of m_cursors. for its use see util/cursor.h
Definition ctx.h:41
util_bind_unified m_unified
Definition bind.h:20
#define emit_opcode(h_wrds, c_wrdcount, c_opcode, c_num_opprm_opt)
try emit opcode with num_opprm
Definition wrdemit.h:75
#define get_wrd_of_vec(vec)
get word buffer from vector
Definition wrdemit.h:38
#define count_to_sz(c_count)
word count to byte size
Definition wrdemit.h:32