diff options
| author | Lukas Lalinsky <lukas@lalinsky.com> | 2025-10-09 08:52:52 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-10-29 06:20:49 -0700 |
| commit | fcac8617b4e3c8fcb3a8c888fe77fa8bff1c2057 (patch) | |
| tree | 615c69bafcb4a3137fb7c34f4afcfc93965e732f /lib/std/Io/EventLoop.zig | |
| parent | 7d478114ec5ae74f977bf22050088a470f471721 (diff) | |
| download | zig-fcac8617b4e3c8fcb3a8c888fe77fa8bff1c2057.tar.gz zig-fcac8617b4e3c8fcb3a8c888fe77fa8bff1c2057.zip | |
Add missing clobbers to context switching
This only shows in release mode, the compiler tries to preserve some
value in rdi, but that gets replaced inside the fiber. This would not
happen in the C calling convention, but in these normal Zig functions,
it can happen.
Diffstat (limited to 'lib/std/Io/EventLoop.zig')
| -rw-r--r-- | lib/std/Io/EventLoop.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/Io/EventLoop.zig b/lib/std/Io/EventLoop.zig index d1d7799907..4cb5745e31 100644 --- a/lib/std/Io/EventLoop.zig +++ b/lib/std/Io/EventLoop.zig @@ -644,6 +644,7 @@ inline fn contextSwitch(message: *const SwitchMessage) *const SwitchMessage { : [received_message] "={x1}" (-> *const @FieldType(SwitchMessage, "contexts")), : [message_to_send] "{x1}" (&message.contexts), : .{ + .x0 = true, .x1 = true, .x2 = true, .x3 = true, @@ -745,6 +746,7 @@ inline fn contextSwitch(message: *const SwitchMessage) *const SwitchMessage { .rdx = true, .rbx = true, .rsi = true, + .rdi = true, .r8 = true, .r9 = true, .r10 = true, |
