diff options
| author | gingerBill <bill@gingerbill.org> | 2018-05-12 10:27:55 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-05-12 10:27:55 +0100 |
| commit | 18a9fa735503e96d69efd968c542e490abe69be0 (patch) | |
| tree | 743b79bc4aed7e78de744a5772a6bb0a06ab07b9 /src/ir_print.cpp | |
| parent | b32af841c56b1bc530b13bd2c6ad55547b4ef021 (diff) | |
Improve minimal dependency system
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index f8adc1e38..e24859413 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -1344,9 +1344,15 @@ void ir_print_instr(irFileBuffer *f, irModule *m, irValue *value) { case Token_Or: ir_write_str_lit(f, "or"); break; case Token_Xor: ir_write_str_lit(f, "xor"); break; case Token_Shl: ir_write_str_lit(f, "shl"); break; - case Token_Shr: ir_write_str_lit(f, "lshr"); break; case Token_Mul: ir_write_str_lit(f, "mul"); break; case Token_Not: ir_write_str_lit(f, "xor"); break; + case Token_Shr: + if (is_type_unsigned(elem_type)) { + ir_write_str_lit(f, "lshr"); + } else { + ir_write_str_lit(f, "ashr"); + } + break; case Token_AndNot: GB_PANIC("Token_AndNot Should never be called"); |