aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2022-11-01 05:03:36 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2022-11-01 20:39:06 -0400
commit9b2db56d0fc3ed3b16179575a5d0d4fff2538fc2 (patch)
treebff7e0054225afb76a0ed551a8ac96f7c25cf2a9 /lib/std
parent4d594090b13629cb940bc400750b044473d26b11 (diff)
downloadzig-9b2db56d0fc3ed3b16179575a5d0d4fff2538fc2.tar.gz
zig-9b2db56d0fc3ed3b16179575a5d0d4fff2538fc2.zip
x86: remove inline asm clobbers that conflict with inputs or outputs
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/zig/system/x86.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/zig/system/x86.zig b/lib/std/zig/system/x86.zig
index 1dbdcabfbc..7be4b19c2f 100644
--- a/lib/std/zig/system/x86.zig
+++ b/lib/std/zig/system/x86.zig
@@ -544,7 +544,7 @@ fn cpuid(leaf_id: u32, subid: u32) CpuidLeaf {
: [leaf_id] "{eax}" (leaf_id),
[subid] "{ecx}" (subid),
[leaf_ptr] "r" (&cpuid_leaf),
- : "eax", "ebx", "ecx", "edx"
+ : "ebx", "edx" // "eax" and "ecx" are already inputs
);
return cpuid_leaf;
@@ -557,6 +557,6 @@ fn getXCR0() u32 {
\\ xgetbv
: [ret] "={eax}" (-> u32),
:
- : "eax", "edx", "ecx"
+ : "edx", "ecx" // "eax" is already an output
);
}