mirror of
https://github.com/ziglang/zig.git
synced 2025-12-27 16:43:07 +00:00
codegen: fix test failures
Various backend were mismatching arg instructions and function args.
This commit is contained in:
parent
57236961e6
commit
6bed45b873
@ -4177,8 +4177,10 @@ fn airFieldParentPtr(self: *Self, inst: Air.Inst.Index) !void {
|
||||
}
|
||||
|
||||
fn airArg(self: *Self, inst: Air.Inst.Index) !void {
|
||||
const arg_index = self.arg_index;
|
||||
self.arg_index += 1;
|
||||
// skip zero-bit arguments as they don't have a corresponding arg instruction
|
||||
var arg_index = self.arg_index;
|
||||
while (self.args[arg_index] == .none) arg_index += 1;
|
||||
self.arg_index = arg_index + 1;
|
||||
|
||||
const ty = self.air.typeOfIndex(inst);
|
||||
const tag = self.air.instructions.items(.tag)[inst];
|
||||
|
||||
@ -4125,8 +4125,10 @@ fn genInlineMemsetCode(
|
||||
}
|
||||
|
||||
fn airArg(self: *Self, inst: Air.Inst.Index) !void {
|
||||
const arg_index = self.arg_index;
|
||||
self.arg_index += 1;
|
||||
// skip zero-bit arguments as they don't have a corresponding arg instruction
|
||||
var arg_index = self.arg_index;
|
||||
while (self.args[arg_index] == .none) arg_index += 1;
|
||||
self.arg_index = arg_index + 1;
|
||||
|
||||
const ty = self.air.typeOfIndex(inst);
|
||||
const tag = self.air.instructions.items(.tag)[inst];
|
||||
|
||||
@ -3827,8 +3827,10 @@ fn genIntMulComplexOpMir(self: *Self, dst_ty: Type, dst_mcv: MCValue, src_mcv: M
|
||||
}
|
||||
|
||||
fn airArg(self: *Self, inst: Air.Inst.Index) !void {
|
||||
const arg_index = self.arg_index;
|
||||
self.arg_index += 1;
|
||||
// skip zero-bit arguments as they don't have a corresponding arg instruction
|
||||
var arg_index = self.arg_index;
|
||||
while (self.args[arg_index] == .none) arg_index += 1;
|
||||
self.arg_index = arg_index + 1;
|
||||
|
||||
const ty = self.air.typeOfIndex(inst);
|
||||
const mcv = self.args[arg_index];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user