ref: 2eb28f43ee79e82332959d687970a20f19c482bf
parent: e7d099ac43c22f4c38399694c5bc81086b89f1f6
	author: mia soweli <mia@soweli.net>
	date: Wed Aug 13 14:57:37 EDT 2025
	
vl: atomic instruction scheduling make extremely sure that atomic operations are never re-ordered even if their results are otherwise unused.
--- a/sys/src/cmd/vl/sched.c
+++ b/sys/src/cmd/vl/sched.c
@@ -601,6 +601,15 @@
if(regoff(&sa->p.from) == regoff(&sb->p.from))
return 1;
+ /*
+ * special case
+ * atomic instructions cannot pass.
+ */
+ if(sa->p.as == ALL || sb->p.as == ALL)
+ return 1;
+ if(sa->p.as == ASC || sb->p.as == ASC)
+ return 1;
+
x = (sa->set.cc & (sb->set.cc|sb->used.cc)) |
(sb->set.cc & sa->used.cc);
 	if(x) {--
⑨