svn commit: r358440 - head/sys/amd64/amd64
Ryan Libby
rlibby at FreeBSD.org
Fri Feb 28 18:32:42 UTC 2020
Author: rlibby
Date: Fri Feb 28 18:32:40 2020
New Revision: 358440
URL: https://svnweb.freebsd.org/changeset/base/358440
Log:
amd64 pmap.c: minor codegen optimization in flag access
Following previous revision, apply the same minor optimization to
hand-rolled atomic_fcmpset_128 in pmap.c.
Reviewed by: kib, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D23870
Modified:
head/sys/amd64/amd64/pmap.c
Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Fri Feb 28 18:32:36 2020 (r358439)
+++ head/sys/amd64/amd64/pmap.c Fri Feb 28 18:32:40 2020 (r358440)
@@ -714,8 +714,8 @@ pmap_di_load_invl(struct pmap_invl_gen *ptr, struct pm
old_low = new_low = 0;
old_high = new_high = (uintptr_t)0;
- __asm volatile("lock;cmpxchg16b\t%1;sete\t%0"
- : "=r" (res), "+m" (*ptr), "+a" (old_low), "+d" (old_high)
+ __asm volatile("lock;cmpxchg16b\t%1"
+ : "=@cce" (res), "+m" (*ptr), "+a" (old_low), "+d" (old_high)
: "b"(new_low), "c" (new_high)
: "memory", "cc");
if (res == 0) {
@@ -742,8 +742,8 @@ pmap_di_store_invl(struct pmap_invl_gen *ptr, struct p
old_low = old_val->gen;
old_high = (uintptr_t)old_val->next;
- __asm volatile("lock;cmpxchg16b\t%1;sete\t%0"
- : "=r" (res), "+m" (*ptr), "+a" (old_low), "+d" (old_high)
+ __asm volatile("lock;cmpxchg16b\t%1"
+ : "=@cce" (res), "+m" (*ptr), "+a" (old_low), "+d" (old_high)
: "b"(new_low), "c" (new_high)
: "memory", "cc");
return (res);
More information about the svn-src-head
mailing list