authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-06-12 13:42:21-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-06-12 13:42:21-04:00
log278c7a2bc398ac71afc9b9b392e863a758abb5fd
tree3b2f9cfff73c26f8b5bafb1c6024eb728fd2617f
parentce5d50e4ed519d23d7a467bdfee196093a3f5dc2
signaturelock-open Commit is signed but in an unrecognized format.

fix `@bitCast` regressions


2 files changed, 15 insertions(+), 14 deletions(-)

src/ir.cpp+2-1
...@@ -4951,6 +4951,7 @@ static IrInstruction *ir_gen_builtin_fn_call(IrBuilder *irb, Scope *scope, AstNo...@@ -4951,6 +4951,7 @@ static IrInstruction *ir_gen_builtin_fn_call(IrBuilder *irb, Scope *scope, AstNo
4951 ResultLocBitCast *result_loc_bit_cast = allocate<ResultLocBitCast>(1);4951 ResultLocBitCast *result_loc_bit_cast = allocate<ResultLocBitCast>(1);
4952 result_loc_bit_cast->base.id = ResultLocIdBitCast;4952 result_loc_bit_cast->base.id = ResultLocIdBitCast;
4953 result_loc_bit_cast->base.source_instruction = dest_type;4953 result_loc_bit_cast->base.source_instruction = dest_type;
4954 ir_ref_instruction(dest_type, irb->current_basic_block);
4954 result_loc_bit_cast->parent = result_loc;4955 result_loc_bit_cast->parent = result_loc;
49554956
4956 AstNode *arg1_node = node->data.fn_call_expr.params.at(1);4957 AstNode *arg1_node = node->data.fn_call_expr.params.at(1);
...@@ -24219,7 +24220,7 @@ static IrInstruction *ir_analyze_instruction_end_expr(IrAnalyze *ira, IrInstruct...@@ -24219,7 +24220,7 @@ static IrInstruction *ir_analyze_instruction_end_expr(IrAnalyze *ira, IrInstruct
2421924220
24220static IrInstruction *ir_analyze_instruction_bit_cast_src(IrAnalyze *ira, IrInstructionBitCastSrc *instruction) {24221static IrInstruction *ir_analyze_instruction_bit_cast_src(IrAnalyze *ira, IrInstructionBitCastSrc *instruction) {
24221 IrInstruction *operand = instruction->operand->child;24222 IrInstruction *operand = instruction->operand->child;
24222 if (type_is_invalid(operand->value.type) || instr_is_comptime(operand) ||24223 if (type_is_invalid(operand->value.type) ||
24223 instruction->result_loc_bit_cast->parent->gen_instruction == nullptr)24224 instruction->result_loc_bit_cast->parent->gen_instruction == nullptr)
24224 {24225 {
24225 return operand;24226 return operand;
std/special/bootstrap.zig+13-13
...@@ -78,19 +78,19 @@ fn posixCallMainAndExit() noreturn {...@@ -78,19 +78,19 @@ fn posixCallMainAndExit() noreturn {
78 while (envp_optional[envp_count]) |_| : (envp_count += 1) {}78 while (envp_optional[envp_count]) |_| : (envp_count += 1) {}
79 const envp = @ptrCast([*][*]u8, envp_optional)[0..envp_count];79 const envp = @ptrCast([*][*]u8, envp_optional)[0..envp_count];
8080
81 if (builtin.os == .linux) {81 //if (builtin.os == .linux) {
82 // Find the beginning of the auxiliary vector82 // // Find the beginning of the auxiliary vector
83 const auxv = @ptrCast([*]std.elf.Auxv, envp.ptr + envp_count + 1);83 // const auxv = @ptrCast([*]std.elf.Auxv, envp.ptr + envp_count + 1);
84 std.os.linux.elf_aux_maybe = auxv;84 // std.os.linux.elf_aux_maybe = auxv;
85 // Initialize the TLS area85 // // Initialize the TLS area
86 std.os.linux.tls.initTLS();86 // std.os.linux.tls.initTLS();
8787
88 if (std.os.linux.tls.tls_image) |tls_img| {88 // if (std.os.linux.tls.tls_image) |tls_img| {
89 const tls_addr = std.os.linux.tls.allocateTLS(tls_img.alloc_size);89 // const tls_addr = std.os.linux.tls.allocateTLS(tls_img.alloc_size);
90 const tp = std.os.linux.tls.copyTLS(tls_addr);90 // const tp = std.os.linux.tls.copyTLS(tls_addr);
91 std.os.linux.tls.setThreadPointer(tp);91 // std.os.linux.tls.setThreadPointer(tp);
92 }92 // }
93 }93 //}
9494
95 std.os.exit(callMainWithArgs(argc, argv, envp));95 std.os.exit(callMainWithArgs(argc, argv, envp));
96}96}