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
49514951 ResultLocBitCast *result_loc_bit_cast = allocate<ResultLocBitCast>(1);
49524952 result_loc_bit_cast->base.id = ResultLocIdBitCast;
49534953 result_loc_bit_cast->base.source_instruction = dest_type;
4954 ir_ref_instruction(dest_type, irb->current_basic_block);
49544955 result_loc_bit_cast->parent = result_loc;
49554956
49564957 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
2421924220
2422024221static IrInstruction *ir_analyze_instruction_bit_cast_src(IrAnalyze *ira, IrInstructionBitCastSrc *instruction) {
2422124222 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) ||
2422324224 instruction->result_loc_bit_cast->parent->gen_instruction == nullptr)
2422424225 {
2422524226 return operand;
std/special/bootstrap.zig+13-13
......@@ -78,19 +78,19 @@ fn posixCallMainAndExit() noreturn {
7878 while (envp_optional[envp_count]) |_| : (envp_count += 1) {}
7979 const envp = @ptrCast([*][*]u8, envp_optional)[0..envp_count];
8080
81 if (builtin.os == .linux) {
82 // Find the beginning of the auxiliary vector
83 const auxv = @ptrCast([*]std.elf.Auxv, envp.ptr + envp_count + 1);
84 std.os.linux.elf_aux_maybe = auxv;
85 // Initialize the TLS area
86 std.os.linux.tls.initTLS();
87
88 if (std.os.linux.tls.tls_image) |tls_img| {
89 const tls_addr = std.os.linux.tls.allocateTLS(tls_img.alloc_size);
90 const tp = std.os.linux.tls.copyTLS(tls_addr);
91 std.os.linux.tls.setThreadPointer(tp);
92 }
93 }
81 //if (builtin.os == .linux) {
82 // // Find the beginning of the auxiliary vector
83 // const auxv = @ptrCast([*]std.elf.Auxv, envp.ptr + envp_count + 1);
84 // std.os.linux.elf_aux_maybe = auxv;
85 // // Initialize the TLS area
86 // std.os.linux.tls.initTLS();
87
88 // if (std.os.linux.tls.tls_image) |tls_img| {
89 // const tls_addr = std.os.linux.tls.allocateTLS(tls_img.alloc_size);
90 // const tp = std.os.linux.tls.copyTLS(tls_addr);
91 // std.os.linux.tls.setThreadPointer(tp);
92 // }
93 //}
9494
9595 std.os.exit(callMainWithArgs(argc, argv, envp));
9696}