mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-17 08:21:25 -07:00
Clean up logic for << and >> behaviour
This commit is contained in:
+4
-4
@@ -4630,8 +4630,8 @@ handle_op:
|
||||
|
||||
irValue *bits = right;
|
||||
|
||||
irValue *max = ir_value_constant(type, exact_value_i64(8*type_size_of(type) - 1));
|
||||
irValue *less_equal_width = ir_emit(proc, ir_instr_binary_op(proc, Token_LtEq, bits, max, t_llvm_bool));
|
||||
irValue *max = ir_value_constant(type, exact_value_i64(8*type_size_of(type)));
|
||||
irValue *less_equal_width = ir_emit(proc, ir_instr_binary_op(proc, Token_Lt, bits, max, t_llvm_bool));
|
||||
|
||||
|
||||
irValue *zero = ir_value_constant(type, exact_value_i64(0));
|
||||
@@ -4646,8 +4646,8 @@ handle_op:
|
||||
|
||||
irValue *bits = right;
|
||||
|
||||
irValue *max = ir_value_constant(type, exact_value_i64(8*type_size_of(type) - 1));
|
||||
irValue *less_equal_width = ir_emit(proc, ir_instr_binary_op(proc, Token_LtEq, bits, max, t_llvm_bool));
|
||||
irValue *max = ir_value_constant(type, exact_value_i64(8*type_size_of(type)));
|
||||
irValue *less_equal_width = ir_emit(proc, ir_instr_binary_op(proc, Token_Lt, bits, max, t_llvm_bool));
|
||||
|
||||
bits = ir_emit_select(proc, less_equal_width, bits, max);
|
||||
return ir_emit(proc, ir_instr_binary_op(proc, op, left, bits, type));
|
||||
|
||||
Reference in New Issue
Block a user