commit 9b2db56d0fc3ed3b16179575a5d0d4fff2538fc2 (tree)
parent 4d594090b13629cb940bc400750b044473d26b11
Author: Jacob Young <jacobly0@users.noreply.github.com>
Date: Tue, 1 Nov 2022 05:03:36 -0400
x86: remove inline asm clobbers that conflict with inputs or outputs
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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
);
}