mirror of
https://github.com/danog/ir.git
synced 2024-12-11 16:59:46 +01:00
Properly save UNREACHABLE instruction eith third operand
This commit is contained in:
parent
a2c6f98e75
commit
fab41058d4
@ -577,7 +577,8 @@ void ir_dump_codegen(const ir_ctx *ctx, FILE *f)
|
||||
} else if (opnd_kind == IR_OPND_NUM) {
|
||||
fprintf(f, "%s%d", first ? "(" : ", ", ref);
|
||||
first = 0;
|
||||
} else if (IR_IS_REF_OPND_KIND(opnd_kind) && j != n) {
|
||||
} else if (j != n &&
|
||||
(IR_IS_REF_OPND_KIND(opnd_kind) || (opnd_kind == IR_OPND_UNUSED && p[n-j]))) {
|
||||
fprintf(f, "%snull", first ? "(" : ", ");
|
||||
first = 0;
|
||||
}
|
||||
|
@ -102,7 +102,8 @@ void ir_save(const ir_ctx *ctx, FILE *f)
|
||||
} else if (opnd_kind == IR_OPND_NUM) {
|
||||
fprintf(f, "%s%d", first ? "(" : ", ", ref);
|
||||
first = 0;
|
||||
} else if (IR_IS_REF_OPND_KIND(opnd_kind) && j != n) {
|
||||
} else if (j != n &&
|
||||
(IR_IS_REF_OPND_KIND(opnd_kind) || (opnd_kind == IR_OPND_UNUSED && p[n-j]))) {
|
||||
fprintf(f, "%snull", first ? "(" : ", ");
|
||||
first = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user