aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index be1089f895..f0dda04c6d 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -923,11 +923,17 @@ static void ir_print_init_enum(IrPrint *irp, IrInstructionInitEnum *instruction)
}
static void ir_print_pointer_reinterpret(IrPrint *irp, IrInstructionPointerReinterpret *instruction) {
- fprintf(irp->f, "(%s)(", buf_ptr(&instruction->base.value.type->name));
+ fprintf(irp->f, "@pointerReinterpret(");
ir_print_other_instruction(irp, instruction->ptr);
fprintf(irp->f, ")");
}
+static void ir_print_widen_or_shorten(IrPrint *irp, IrInstructionWidenOrShorten *instruction) {
+ fprintf(irp->f, "@widenOrShorten(");
+ ir_print_other_instruction(irp, instruction->target);
+ fprintf(irp->f, ")");
+}
+
static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) {
ir_print_prefix(irp, instruction);
switch (instruction->id) {
@@ -1170,6 +1176,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) {
case IrInstructionIdPointerReinterpret:
ir_print_pointer_reinterpret(irp, (IrInstructionPointerReinterpret *)instruction);
break;
+ case IrInstructionIdWidenOrShorten:
+ ir_print_widen_or_shorten(irp, (IrInstructionWidenOrShorten *)instruction);
+ break;
}
fprintf(irp->f, "\n");
}