diff options
| author | gingerBill <bill@gingerbill.org> | 2020-08-02 14:59:39 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-08-02 14:59:39 +0100 |
| commit | d1d5f61230608ed818fc832cbb5979da312db5d1 (patch) | |
| tree | 8b122fe2daa69a06e101dea181a4e6df68e31ee8 /src/ir_print.cpp | |
| parent | 0aaab849382aa0cbce7234ec386f88161b79ca07 (diff) | |
Add `intrinsics.alloca`
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index fb09ad471..9cd7b2384 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -1539,6 +1539,16 @@ void ir_print_instr(irFileBuffer *f, irModule *m, irValue *value) { case irInstr_InlineCode: { switch (instr->InlineCode.id) { + case BuiltinProc_alloca: + ir_fprintf(f, "%%%d = ", value->index); + ir_write_str_lit(f, "alloca i8, "); + ir_print_type(f, m, ir_type(instr->InlineCode.operands[0])); + ir_write_str_lit(f, " "); + ir_print_value(f, m, instr->InlineCode.operands[0], ir_type(instr->InlineCode.operands[0])); + ir_write_str_lit(f, ", align "); + ir_print_value(f, m, instr->InlineCode.operands[1], t_i32); + break; + case BuiltinProc_cpu_relax: ir_write_str_lit(f, "call void asm sideeffect \"pause\", \"\"()"); break; |