commit 6fc20b3b092a5717caa288c107370292580f0e2c (tree)
parent aa31096cbd0d66d7c31e12eebe91f36293346dba
Author: Andrew Kelley <andrew@ziglang.org>
Date: Wed, 22 Nov 2023 15:32:37 -0700
std.os.windows: remove volatile from inline asm
This inline assembly has no side effects.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig
@@ -1927,7 +1927,7 @@ pub fn teb() *TEB {
if (builtin.zig_backend == .stage2_c) {
break :blk @ptrCast(@alignCast(zig_x86_windows_teb()));
} else {
- break :blk asm volatile (
+ break :blk asm (
\\ movl %%fs:0x18, %[ptr]
: [ptr] "=r" (-> *TEB),
);
@@ -1937,13 +1937,13 @@ pub fn teb() *TEB {
if (builtin.zig_backend == .stage2_c) {
break :blk @ptrCast(@alignCast(zig_x86_64_windows_teb()));
} else {
- break :blk asm volatile (
+ break :blk asm (
\\ movq %%gs:0x30, %[ptr]
: [ptr] "=r" (-> *TEB),
);
}
},
- .aarch64 => asm volatile (
+ .aarch64 => asm (
\\ mov %[ptr], x18
: [ptr] "=r" (-> *TEB),
),