[Stage2/Codegen] Properly handle arch in genCall
This commit is contained in:
parent
db0c30446a
commit
07472fb453
@ -196,6 +196,8 @@ const Function = struct {
|
||||
}
|
||||
|
||||
fn genCall(self: *Function, inst: *ir.Inst.Call) !MCValue {
|
||||
switch (self.target.cpu.arch) {
|
||||
.x86_64, .i386 => {
|
||||
if (inst.args.func.cast(ir.Inst.Constant)) |func_inst| {
|
||||
if (inst.args.args.len != 0) {
|
||||
return self.fail(inst.base.src, "TODO implement call with more than 0 parameters", .{});
|
||||
@ -223,8 +225,7 @@ const Function = struct {
|
||||
} else {
|
||||
return self.fail(inst.base.src, "TODO implement calling runtime known function pointer", .{});
|
||||
}
|
||||
|
||||
switch (self.target.cpu.arch) {
|
||||
},
|
||||
else => return self.fail(inst.base.src, "TODO implement call for {}", .{self.target.cpu.arch}),
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user