Compare commits
1 Commits
6673599486
...
259382da28
Author | SHA1 | Date | |
---|---|---|---|
259382da28 |
@ -1040,7 +1040,7 @@ target_get_native = fn () Target
|
|||||||
target_compare = fn (a: Target, b: Target) u1
|
target_compare = fn (a: Target, b: Target) u1
|
||||||
{
|
{
|
||||||
>is_same_cpu = a.cpu == b.cpu;
|
>is_same_cpu = a.cpu == b.cpu;
|
||||||
>is_same_os = a.cpu == b.cpu;
|
>is_same_os = a.os == b.os;
|
||||||
return is_same_cpu and is_same_os;
|
return is_same_cpu and is_same_os;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7158,8 +7158,7 @@ parse_block = fn (module: &Module, parent_scope: &Scope) &Block
|
|||||||
|
|
||||||
enum_bit_count = fn (highest_value: u64) u64
|
enum_bit_count = fn (highest_value: u64) u64
|
||||||
{
|
{
|
||||||
>needed_bit_count: u64 = 64 - #leading_zeroes(highest_value);
|
>needed_bit_count: u64 = #select(highest_value == 0, 1, 64 - #leading_zeroes(highest_value));
|
||||||
needed_bit_count = #select(needed_bit_count != 0, needed_bit_count, 1);
|
|
||||||
return needed_bit_count;
|
return needed_bit_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14559,8 +14558,8 @@ emit_value = fn (module: &Module, value: &Value, type_kind: TypeKind, expect_con
|
|||||||
>left = value.content.binary.left;
|
>left = value.content.binary.left;
|
||||||
>right = value.content.binary.right;
|
>right = value.content.binary.right;
|
||||||
|
|
||||||
>right_block = LLVMAppendBasicBlockInContext(module.llvm.context, llvm_function, "shorcircuit.right");
|
>right_block = LLVMAppendBasicBlockInContext(module.llvm.context, llvm_function, "shortcircuit.right");
|
||||||
>end_block = LLVMAppendBasicBlockInContext(module.llvm.context, llvm_function, "shorcircuit.end");
|
>end_block = LLVMAppendBasicBlockInContext(module.llvm.context, llvm_function, "shortcircuit.end");
|
||||||
|
|
||||||
>true_block: &LLVMBasicBlock = undefined;
|
>true_block: &LLVMBasicBlock = undefined;
|
||||||
>false_block: &LLVMBasicBlock = undefined;
|
>false_block: &LLVMBasicBlock = undefined;
|
||||||
|
@ -2064,8 +2064,7 @@ fn Type* resolve_alias(Module* module, Type* type)
|
|||||||
|
|
||||||
fn u64 enum_bit_count(u64 highest_value)
|
fn u64 enum_bit_count(u64 highest_value)
|
||||||
{
|
{
|
||||||
auto needed_bit_count = 64 - (u64)clz(highest_value);
|
auto needed_bit_count = highest_value == 0 ? 1 : 64 - clz(highest_value);
|
||||||
needed_bit_count = needed_bit_count ? needed_bit_count : 1;
|
|
||||||
return needed_bit_count;
|
return needed_bit_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user