Syntax tweak: Omit comma after an initial enum immediate.

This affects the comparison instructions which now read "icmp ult a, b".
This mimics LLVM's style and makes it simpler to add instruction flags
in the future, such as "load v1" -> "load aligned v1".

These enumerated operands and flags feel like opcode modifiers rather
than value operands, so displaying them differently makes sense.

Value and numeric operands are still comma separated.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-10 10:28:37 -07:00
parent d2f575b54a
commit 13b0046ed7
7 changed files with 41 additions and 45 deletions

View File

@@ -21,7 +21,7 @@ ebb1(v5: i32):
v10 = f32const 0.0
v11 = fadd v9, v10
v12 = iadd_imm v5, 1
v13 = icmp ult, v12, v2
v13 = icmp ult v12, v2
brnz v13, ebb1(v12) ; unordered: ebb1:inst12 -> ebb1
v14 = f64const 0.0
v15 = f64const 0.0