diff options
| author | gingerBill <bill@gingerbill.org> | 2020-02-26 22:29:12 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-02-26 22:29:12 +0000 |
| commit | 1596bca92d4d8b3457cbfacec24e2a2129bba40e (patch) | |
| tree | e4567dd5148a6d7d7d80438ba28d8af019a07228 /src/ir_print.cpp | |
| parent | 8f42958ba32444d83117a63b400baed072ad48b7 (diff) | |
Add `intrinsics.cpu_relax`
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index a3f28c59f..bcbdca615 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -1483,6 +1483,18 @@ void ir_print_instr(irFileBuffer *f, irModule *m, irValue *value) { break; } + case irInstr_InlineCode: + { + switch (instr->InlineCode.id) { + case BuiltinProc_cpu_relax: + ir_write_str_lit(f, "call void asm sideeffect \"pause\", \"\"()"); + break; + default: GB_PANIC("Unknown inline code %d", instr->InlineCode.id); break; + } + } + break; + + case irInstr_AtomicFence: ir_write_str_lit(f, "fence "); switch (instr->AtomicFence.id) { |