diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-12-23 17:04:26 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-12-23 17:04:26 -0500 |
| commit | c00216701c64269a2395e84f3ccff99d6fb89ffc (patch) | |
| tree | 9fa071b9e96f9eadc5069b71634b11fc13b00839 /src/ir_print.cpp | |
| parent | c21884e1d64e4193e03be4f3064917a26b34b142 (diff) | |
| parent | 45081c1e9cc28757cb563c77553631f7a92b29d8 (diff) | |
| download | zig-c00216701c64269a2395e84f3ccff99d6fb89ffc.tar.gz zig-c00216701c64269a2395e84f3ccff99d6fb89ffc.zip | |
Merge remote-tracking branch 'origin/master' into llvm8
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 13c06e4e2d..e09b0073eb 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -1323,6 +1323,18 @@ static void ir_print_sqrt(IrPrint *irp, IrInstructionSqrt *instruction) { fprintf(irp->f, ")"); } +static void ir_print_bswap(IrPrint *irp, IrInstructionBswap *instruction) { + fprintf(irp->f, "@bswap("); + if (instruction->type != nullptr) { + ir_print_other_instruction(irp, instruction->type); + } else { + fprintf(irp->f, "null"); + } + fprintf(irp->f, ","); + ir_print_other_instruction(irp, instruction->op); + fprintf(irp->f, ")"); +} + static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { ir_print_prefix(irp, instruction); switch (instruction->id) { @@ -1736,6 +1748,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdSqrt: ir_print_sqrt(irp, (IrInstructionSqrt *)instruction); break; + case IrInstructionIdBswap: + ir_print_bswap(irp, (IrInstructionBswap *)instruction); + break; case IrInstructionIdAtomicLoad: ir_print_atomic_load(irp, (IrInstructionAtomicLoad *)instruction); break; |
