14#include <unordered_set>
20namespace sysio {
namespace chain {
namespace wasm_injections {
40 for (
size_t i=0; i < mod.
types.size(); i++ ) {
41 std::vector<uint16_t> type_slot_list = {
static_cast<uint16_t>(mod.
types[i]->ret) };
42 for (
auto param : mod.
types[i]->parameters )
43 type_slot_list.push_back(
static_cast<uint16_t>(param) );
50 if (
type_slots.find({FromResultType<Result>::value, FromValueType<Params>::value...}) ==
type_slots.end() ) {
58 next_function_index =
module.functions.imports.size() + module.functions.defs.size() + registered_injected.size();
70 decltype(
module.functions.imports) new_import = { {{func_type_index}, sysio_injected_module_name, std::move(func_name)} };
72 module.functions.imports.insert( module.functions.imports.begin()+(registered_injected.size()-1), new_import.begin(), new_import.end() );
76 for (
size_t i=0; i <
module.exports.size(); i++ ) {
78 module.exports[i].index++;
84 module.startFunctionIndex++;
89 for(auto& idx : ts.indices)
143 static constexpr bool kills =
false;
144 static constexpr bool post =
false;
150 static constexpr bool kills =
false;
151 static constexpr bool post =
false;
158 call_inst->field = mapped_index->second;
171 return u8
"_sysio_f32_add";
173 return u8
"_sysio_f32_sub";
175 return u8
"_sysio_f32_mul";
177 return u8
"_sysio_f32_div";
179 return u8
"_sysio_f32_min";
181 return u8
"_sysio_f32_max";
183 return u8
"_sysio_f32_copysign";
185 return u8
"_sysio_f32_abs";
187 return u8
"_sysio_f32_neg";
189 return u8
"_sysio_f32_sqrt";
191 return u8
"_sysio_f32_ceil";
193 return u8
"_sysio_f32_floor";
195 return u8
"_sysio_f32_trunc";
197 return u8
"_sysio_f32_nearest";
199 return u8
"_sysio_f32_eq";
201 return u8
"_sysio_f32_ne";
203 return u8
"_sysio_f32_lt";
205 return u8
"_sysio_f32_le";
207 return u8
"_sysio_f32_gt";
209 return u8
"_sysio_f32_ge";
211 return u8
"_sysio_f64_add";
213 return u8
"_sysio_f64_sub";
215 return u8
"_sysio_f64_mul";
217 return u8
"_sysio_f64_div";
219 return u8
"_sysio_f64_min";
221 return u8
"_sysio_f64_max";
223 return u8
"_sysio_f64_copysign";
225 return u8
"_sysio_f64_abs";
227 return u8
"_sysio_f64_neg";
229 return u8
"_sysio_f64_sqrt";
231 return u8
"_sysio_f64_ceil";
233 return u8
"_sysio_f64_floor";
235 return u8
"_sysio_f64_trunc";
237 return u8
"_sysio_f64_nearest";
239 return u8
"_sysio_f64_eq";
241 return u8
"_sysio_f64_ne";
243 return u8
"_sysio_f64_lt";
245 return u8
"_sysio_f64_le";
247 return u8
"_sysio_f64_gt";
249 return u8
"_sysio_f64_ge";
251 return u8
"_sysio_f32_promote";
253 return u8
"_sysio_f64_demote";
255 return u8
"_sysio_f32_trunc_i32u";
257 return u8
"_sysio_f32_trunc_i32s";
259 return u8
"_sysio_f64_trunc_i32u";
261 return u8
"_sysio_f64_trunc_i32s";
263 return u8
"_sysio_f32_trunc_i64u";
265 return u8
"_sysio_f32_trunc_i64s";
267 return u8
"_sysio_f64_trunc_i64u";
269 return u8
"_sysio_f64_trunc_i64s";
271 return u8
"_sysio_i32_to_f32";
273 return u8
"_sysio_ui32_to_f32";
275 return u8
"_sysio_i64_f32";
277 return u8
"_sysio_ui64_to_f32";
279 return u8
"_sysio_i32_to_f64";
281 return u8
"_sysio_ui32_to_f64";
283 return u8
"_sysio_i64_to_f64";
285 return u8
"_sysio_ui64_to_f64";
288 FC_THROW_EXCEPTION( sysio::chain::wasm_execution_error,
"Error, unknown opcode in injection ${op}", (
"op", opcode));
292 template <u
int16_t Opcode>
295 static constexpr bool post =
false;
306 template <u
int16_t Opcode>
309 static constexpr bool post =
false;
320 template <u
int16_t Opcode>
323 static constexpr bool post =
false;
333 template <u
int16_t Opcode>
336 static constexpr bool post =
false;
347 template <u
int16_t Opcode>
350 static constexpr bool post =
false;
361 template <u
int16_t Opcode>
364 static constexpr bool post =
false;
375 template <u
int16_t Opcode>
378 static constexpr bool post =
false;
388 template <u
int16_t Opcode>
391 static constexpr bool post =
false;
401 template <u
int16_t Opcode>
404 static constexpr bool post =
false;
414 template <u
int16_t Opcode>
417 static constexpr bool post =
false;
427 template <u
int64_t Opcode>
430 static constexpr bool post =
false;
440 template <u
int64_t Opcode>
443 static constexpr bool post =
false;
453 template <u
int64_t Opcode>
456 static constexpr bool post =
false;
466 template <u
int64_t Opcode>
469 static constexpr bool post =
false;
482 static constexpr bool post =
false;
488 f32promote.field = idx;
495 static constexpr bool post =
false;
501 f32promote.field = idx;
508 using f32_add_t = wasm_ops::f32_add <f32_binop_injector<wasm_ops::f32_add_code>>;
509 using f32_sub_t = wasm_ops::f32_sub <f32_binop_injector<wasm_ops::f32_sub_code>>;
510 using f32_div_t = wasm_ops::f32_div <f32_binop_injector<wasm_ops::f32_div_code>>;
511 using f32_mul_t = wasm_ops::f32_mul <f32_binop_injector<wasm_ops::f32_mul_code>>;
512 using f32_min_t = wasm_ops::f32_min <f32_binop_injector<wasm_ops::f32_min_code>>;
513 using f32_max_t = wasm_ops::f32_max <f32_binop_injector<wasm_ops::f32_max_code>>;
514 using f32_copysign_t = wasm_ops::f32_copysign <f32_binop_injector<wasm_ops::f32_copysign_code>>;
516 using f32_abs_t = wasm_ops::f32_abs <f32_unop_injector<wasm_ops::f32_abs_code>>;
517 using f32_neg_t = wasm_ops::f32_neg <f32_unop_injector<wasm_ops::f32_neg_code>>;
518 using f32_sqrt_t = wasm_ops::f32_sqrt <f32_unop_injector<wasm_ops::f32_sqrt_code>>;
519 using f32_floor_t = wasm_ops::f32_floor <f32_unop_injector<wasm_ops::f32_floor_code>>;
520 using f32_ceil_t = wasm_ops::f32_ceil <f32_unop_injector<wasm_ops::f32_ceil_code>>;
521 using f32_trunc_t = wasm_ops::f32_trunc <f32_unop_injector<wasm_ops::f32_trunc_code>>;
522 using f32_nearest_t = wasm_ops::f32_nearest <f32_unop_injector<wasm_ops::f32_nearest_code>>;
524 using f32_eq_t = wasm_ops::f32_eq <f32_relop_injector<wasm_ops::f32_eq_code>>;
525 using f32_ne_t = wasm_ops::f32_ne <f32_relop_injector<wasm_ops::f32_ne_code>>;
526 using f32_lt_t = wasm_ops::f32_lt <f32_relop_injector<wasm_ops::f32_lt_code>>;
527 using f32_le_t = wasm_ops::f32_le <f32_relop_injector<wasm_ops::f32_le_code>>;
528 using f32_gt_t = wasm_ops::f32_gt <f32_relop_injector<wasm_ops::f32_gt_code>>;
529 using f32_ge_t = wasm_ops::f32_ge <f32_relop_injector<wasm_ops::f32_ge_code>>;
532 using f64_add_t = wasm_ops::f64_add <f64_binop_injector<wasm_ops::f64_add_code>>;
533 using f64_sub_t = wasm_ops::f64_sub <f64_binop_injector<wasm_ops::f64_sub_code>>;
534 using f64_div_t = wasm_ops::f64_div <f64_binop_injector<wasm_ops::f64_div_code>>;
535 using f64_mul_t = wasm_ops::f64_mul <f64_binop_injector<wasm_ops::f64_mul_code>>;
536 using f64_min_t = wasm_ops::f64_min <f64_binop_injector<wasm_ops::f64_min_code>>;
537 using f64_max_t = wasm_ops::f64_max <f64_binop_injector<wasm_ops::f64_max_code>>;
538 using f64_copysign_t = wasm_ops::f64_copysign <f64_binop_injector<wasm_ops::f64_copysign_code>>;
540 using f64_abs_t = wasm_ops::f64_abs <f64_unop_injector<wasm_ops::f64_abs_code>>;
541 using f64_neg_t = wasm_ops::f64_neg <f64_unop_injector<wasm_ops::f64_neg_code>>;
542 using f64_sqrt_t = wasm_ops::f64_sqrt <f64_unop_injector<wasm_ops::f64_sqrt_code>>;
543 using f64_floor_t = wasm_ops::f64_floor <f64_unop_injector<wasm_ops::f64_floor_code>>;
544 using f64_ceil_t = wasm_ops::f64_ceil <f64_unop_injector<wasm_ops::f64_ceil_code>>;
545 using f64_trunc_t = wasm_ops::f64_trunc <f64_unop_injector<wasm_ops::f64_trunc_code>>;
546 using f64_nearest_t = wasm_ops::f64_nearest <f64_unop_injector<wasm_ops::f64_nearest_code>>;
548 using f64_eq_t = wasm_ops::f64_eq <f64_relop_injector<wasm_ops::f64_eq_code>>;
549 using f64_ne_t = wasm_ops::f64_ne <f64_relop_injector<wasm_ops::f64_ne_code>>;
550 using f64_lt_t = wasm_ops::f64_lt <f64_relop_injector<wasm_ops::f64_lt_code>>;
551 using f64_le_t = wasm_ops::f64_le <f64_relop_injector<wasm_ops::f64_le_code>>;
552 using f64_gt_t = wasm_ops::f64_gt <f64_relop_injector<wasm_ops::f64_gt_code>>;
553 using f64_ge_t = wasm_ops::f64_ge <f64_relop_injector<wasm_ops::f64_ge_code>>;
560 using i32_trunc_s_f32_t = wasm_ops::i32_trunc_s_f32 <f32_trunc_i32_injector<wasm_ops::i32_trunc_s_f32_code>>;
561 using i32_trunc_u_f32_t = wasm_ops::i32_trunc_u_f32 <f32_trunc_i32_injector<wasm_ops::i32_trunc_u_f32_code>>;
562 using i32_trunc_s_f64_t = wasm_ops::i32_trunc_s_f64 <f64_trunc_i32_injector<wasm_ops::i32_trunc_s_f64_code>>;
563 using i32_trunc_u_f64_t = wasm_ops::i32_trunc_u_f64 <f64_trunc_i32_injector<wasm_ops::i32_trunc_u_f64_code>>;
564 using i64_trunc_s_f32_t = wasm_ops::i64_trunc_s_f32 <f32_trunc_i64_injector<wasm_ops::i64_trunc_s_f32_code>>;
565 using i64_trunc_u_f32_t = wasm_ops::i64_trunc_u_f32 <f32_trunc_i64_injector<wasm_ops::i64_trunc_u_f32_code>>;
566 using i64_trunc_s_f64_t = wasm_ops::i64_trunc_s_f64 <f64_trunc_i64_injector<wasm_ops::i64_trunc_s_f64_code>>;
567 using i64_trunc_u_f64_t = wasm_ops::i64_trunc_u_f64 <f64_trunc_i64_injector<wasm_ops::i64_trunc_u_f64_code>>;
569 using f32_convert_s_i32 = wasm_ops::f32_convert_s_i32 <i32_convert_f32_injector<wasm_ops::f32_convert_s_i32_code>>;
570 using f32_convert_s_i64 = wasm_ops::f32_convert_s_i64 <i64_convert_f32_injector<wasm_ops::f32_convert_s_i64_code>>;
571 using f32_convert_u_i32 = wasm_ops::f32_convert_u_i32 <i32_convert_f32_injector<wasm_ops::f32_convert_u_i32_code>>;
572 using f32_convert_u_i64 = wasm_ops::f32_convert_u_i64 <i64_convert_f32_injector<wasm_ops::f32_convert_u_i64_code>>;
573 using f64_convert_s_i32 = wasm_ops::f64_convert_s_i32 <i32_convert_f64_injector<wasm_ops::f64_convert_s_i32_code>>;
574 using f64_convert_s_i64 = wasm_ops::f64_convert_s_i64 <i64_convert_f64_injector<wasm_ops::f64_convert_s_i64_code>>;
575 using f64_convert_u_i32 = wasm_ops::f64_convert_u_i32 <i32_convert_f64_injector<wasm_ops::f64_convert_u_i32_code>>;
576 using f64_convert_u_i64 = wasm_ops::f64_convert_u_i64 <i64_convert_f64_injector<wasm_ops::f64_convert_u_i64_code>>;
580 using call_t = wasm_ops::call <fix_call_index>;
583 template <
typename ... Visitors>
586 for (
auto injector : { Visitors::inject... } ) {
592 for (
auto initializer : { Visitors::initializer... } ) {
607 for (
auto& fd : _module->
functions.defs ) {
611 while ( pre_decoder ) {
615 op->visit( { _module, &pre_code, &fd, pre_decoder.
index() } );
618 op->visit( { _module, &pre_code, &fd, pre_decoder.
index() } );
619 if (!(
op->is_kill()))
623 fd.code = pre_code.
get();
625 for (
auto& fd : _module->
functions.defs ) {
629 while ( post_decoder ) {
632 op->pack(&post_code);
633 op->visit( { _module, &post_code, &fd, post_decoder.
index() } );
636 op->visit( { _module, &post_code, &fd, post_decoder.
index() } );
637 if (!(
op->is_kill()))
638 op->pack(&post_code);
641 fd.code = post_code.
get();
wasm_binary_injection(IR::Module &mod)
Defines exception's used by fc.
#define FC_THROW_EXCEPTION(EXCEPTION, FORMAT,...)
constexpr const char * inject_which_op(uint16_t opcode)
std::function< void(IR::Module &)> wasm_validate_func
static IR_API const FunctionType * get(ResultType ret, const std::initializer_list< ValueType > ¶meters)
IndexSpace< FunctionDef, IndexedFunctionType > functions
std::vector< const FunctionType * > types
static void initializer()
static void inject(IR::Module &m)
static void inject(IR::Module &m)
static void initializer()
static constexpr bool post
static constexpr bool kills
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool post
static constexpr bool kills
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool post
static constexpr bool kills
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool kills
static constexpr bool post
static constexpr bool post
static constexpr bool kills
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool kills
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool post
static constexpr bool kills
static constexpr bool post
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool kills
static constexpr bool post
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool kills
static constexpr bool post
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool kills
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool post
static constexpr bool post
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool kills
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool post
static constexpr bool kills
static void inject(IR::Module &m)
static void initializer()
static constexpr bool post
static constexpr bool kills
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool post
static constexpr bool kills
static constexpr bool kills
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static constexpr bool post
static constexpr bool kills
static constexpr bool post
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
static void add_import(Module &module, const char *func_name, int32_t &index)
static void build_type_slots(Module &mod)
static std::map< std::vector< uint16_t >, uint32_t > type_slots
static void get_next_indices(Module &module, int &next_function_index, int &next_actual_index)
static std::map< uint32_t, uint32_t > injected_index_mapping
static void init(Module &mod)
static std::map< std::string, uint32_t > registered_injected
static uint32_t next_injected_index
static void add_type_slot(Module &mod)
static void inject(IR::Module &m)
static void initializer()
static void inject(IR::Module &m)
static void inject(IR::Module &m)
static void inject(IR::Module &m)
static void initializer()
static constexpr bool post
static constexpr bool kills
static void accept(wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
wasm_ops::call< fix_call_index > call_t
wasm_ops::f32_le< f32_relop_injector< wasm_ops::f32_le_code > > f32_le_t
wasm_ops::f32_nearest< f32_unop_injector< wasm_ops::f32_nearest_code > > f32_nearest_t
wasm_ops::f32_max< f32_binop_injector< wasm_ops::f32_max_code > > f32_max_t
wasm_ops::f32_abs< f32_unop_injector< wasm_ops::f32_abs_code > > f32_abs_t
wasm_ops::f32_neg< f32_unop_injector< wasm_ops::f32_neg_code > > f32_neg_t
wasm_ops::f64_convert_s_i64< i64_convert_f64_injector< wasm_ops::f64_convert_s_i64_code > > f64_convert_s_i64
wasm_ops::f64_le< f64_relop_injector< wasm_ops::f64_le_code > > f64_le_t
wasm_ops::f32_div< f32_binop_injector< wasm_ops::f32_div_code > > f32_div_t
wasm_ops::f32_sqrt< f32_unop_injector< wasm_ops::f32_sqrt_code > > f32_sqrt_t
wasm_ops::f32_copysign< f32_binop_injector< wasm_ops::f32_copysign_code > > f32_copysign_t
wasm_ops::f32_ge< f32_relop_injector< wasm_ops::f32_ge_code > > f32_ge_t
wasm_ops::i32_trunc_s_f64< f64_trunc_i32_injector< wasm_ops::i32_trunc_s_f64_code > > i32_trunc_s_f64_t
wasm_ops::f32_convert_s_i32< i32_convert_f32_injector< wasm_ops::f32_convert_s_i32_code > > f32_convert_s_i32
wasm_ops::i64_trunc_u_f32< f32_trunc_i64_injector< wasm_ops::i64_trunc_u_f32_code > > i64_trunc_u_f32_t
wasm_ops::i32_trunc_u_f64< f64_trunc_i32_injector< wasm_ops::i32_trunc_u_f64_code > > i32_trunc_u_f64_t
wasm_ops::f64_ne< f64_relop_injector< wasm_ops::f64_ne_code > > f64_ne_t
wasm_ops::f64_mul< f64_binop_injector< wasm_ops::f64_mul_code > > f64_mul_t
wasm_ops::f64_trunc< f64_unop_injector< wasm_ops::f64_trunc_code > > f64_trunc_t
wasm_ops::f32_floor< f32_unop_injector< wasm_ops::f32_floor_code > > f32_floor_t
wasm_ops::f64_neg< f64_unop_injector< wasm_ops::f64_neg_code > > f64_neg_t
wasm_ops::i32_trunc_s_f32< f32_trunc_i32_injector< wasm_ops::i32_trunc_s_f32_code > > i32_trunc_s_f32_t
wasm_ops::f32_trunc< f32_unop_injector< wasm_ops::f32_trunc_code > > f32_trunc_t
wasm_ops::f32_convert_s_i64< i64_convert_f32_injector< wasm_ops::f32_convert_s_i64_code > > f32_convert_s_i64
wasm_ops::f64_sub< f64_binop_injector< wasm_ops::f64_sub_code > > f64_sub_t
wasm_ops::f64_div< f64_binop_injector< wasm_ops::f64_div_code > > f64_div_t
wasm_ops::f32_mul< f32_binop_injector< wasm_ops::f32_mul_code > > f32_mul_t
wasm_ops::f64_ge< f64_relop_injector< wasm_ops::f64_ge_code > > f64_ge_t
wasm_ops::f64_convert_s_i32< i32_convert_f64_injector< wasm_ops::f64_convert_s_i32_code > > f64_convert_s_i32
wasm_ops::f64_nearest< f64_unop_injector< wasm_ops::f64_nearest_code > > f64_nearest_t
wasm_ops::f64_copysign< f64_binop_injector< wasm_ops::f64_copysign_code > > f64_copysign_t
wasm_ops::f32_ceil< f32_unop_injector< wasm_ops::f32_ceil_code > > f32_ceil_t
wasm_ops::f32_lt< f32_relop_injector< wasm_ops::f32_lt_code > > f32_lt_t
wasm_ops::f64_min< f64_binop_injector< wasm_ops::f64_min_code > > f64_min_t
wasm_ops::i64_trunc_u_f64< f64_trunc_i64_injector< wasm_ops::i64_trunc_u_f64_code > > i64_trunc_u_f64_t
wasm_ops::f64_promote_f32< f32_promote_injector > f64_promote_f32_t
wasm_ops::f64_max< f64_binop_injector< wasm_ops::f64_max_code > > f64_max_t
wasm_ops::f32_min< f32_binop_injector< wasm_ops::f32_min_code > > f32_min_t
wasm_ops::f32_add< f32_binop_injector< wasm_ops::f32_add_code > > f32_add_t
wasm_ops::f64_add< f64_binop_injector< wasm_ops::f64_add_code > > f64_add_t
wasm_ops::f64_floor< f64_unop_injector< wasm_ops::f64_floor_code > > f64_floor_t
wasm_ops::f32_sub< f32_binop_injector< wasm_ops::f32_sub_code > > f32_sub_t
wasm_ops::f32_gt< f32_relop_injector< wasm_ops::f32_gt_code > > f32_gt_t
wasm_ops::i32_trunc_u_f32< f32_trunc_i32_injector< wasm_ops::i32_trunc_u_f32_code > > i32_trunc_u_f32_t
wasm_ops::f64_abs< f64_unop_injector< wasm_ops::f64_abs_code > > f64_abs_t
wasm_ops::f64_ceil< f64_unop_injector< wasm_ops::f64_ceil_code > > f64_ceil_t
wasm_ops::f64_convert_u_i64< i64_convert_f64_injector< wasm_ops::f64_convert_u_i64_code > > f64_convert_u_i64
wasm_ops::f32_convert_u_i32< i32_convert_f32_injector< wasm_ops::f32_convert_u_i32_code > > f32_convert_u_i32
wasm_ops::f32_eq< f32_relop_injector< wasm_ops::f32_eq_code > > f32_eq_t
wasm_ops::f64_gt< f64_relop_injector< wasm_ops::f64_gt_code > > f64_gt_t
wasm_ops::f64_lt< f64_relop_injector< wasm_ops::f64_lt_code > > f64_lt_t
wasm_ops::f64_convert_u_i32< i32_convert_f64_injector< wasm_ops::f64_convert_u_i32_code > > f64_convert_u_i32
wasm_ops::f32_convert_u_i64< i64_convert_f32_injector< wasm_ops::f32_convert_u_i64_code > > f32_convert_u_i64
wasm_ops::i64_trunc_s_f32< f32_trunc_i64_injector< wasm_ops::i64_trunc_s_f32_code > > i64_trunc_s_f32_t
wasm_ops::f32_demote_f64< f64_demote_injector > f32_demote_f64_t
wasm_ops::i64_trunc_s_f64< f64_trunc_i64_injector< wasm_ops::i64_trunc_s_f64_code > > i64_trunc_s_f64_t
wasm_ops::f64_sqrt< f64_unop_injector< wasm_ops::f64_sqrt_code > > f64_sqrt_t
wasm_ops::f64_eq< f64_relop_injector< wasm_ops::f64_eq_code > > f64_eq_t
wasm_ops::f32_ne< f32_relop_injector< wasm_ops::f32_ne_code > > f32_ne_t
static void inject(IR::Module &m)
static void initializer()
instruction_stream * new_code