[Stage2/Codegen] Properly handle arch in genCall

This commit is contained in:
Noam Preil 2020-05-24 10:01:27 -04:00 committed by Andrew Kelley
parent db0c30446a
commit 07472fb453

View File

@ -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}),
}
}