aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/llvm.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 8604c7d7f6..178c0aaf0a 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -10798,6 +10798,22 @@ const ParamTypeIterator = struct {
},
}
},
+ .Stdcall => {
+ it.zig_index += 1;
+ it.llvm_index += 1;
+
+ if (it.target.cpu.arch != .x86 or it.target.os.tag != .windows) {
+ return .byval;
+ }
+
+ const is_scalar = isScalar(ty);
+ if (is_scalar) {
+ return .byval;
+ } else {
+ it.byval_attr = true;
+ return .byref;
+ }
+ },
else => {
it.zig_index += 1;
it.llvm_index += 1;