@@ -58,20 +58,30 @@ int kal_exec_publish(void* p, kal_uintptr size) {
5858 // it is being helpful rather than conforming, and one that does not is not
5959 // deficient.
6060 //
61- // ⚠️ AND HERE IT WOULD COST SOMETHING THE OTHER TWO DO NOT PAY.
62- // `__builtin___clear_cache' expands to nothing on x86_64 and to a
63- // maintenance sequence on aarch64 --- and on riscv64 it becomes a CALL to
64- // `__riscv_flush_icache', which lives in the compiler's support library.
65- // This implementation sits beneath a C library and is linked into programs
66- // that carry no other runtime; acquiring a link-time dependency upon that
67- // library, on one architecture, to perform an operation the specification
68- // does not require of it, is a worse trade than the asymmetry.
61+ // ⚠️ AND THE ONLY MEANS AVAILABLE HERE IS ONE THIS IMPLEMENTATION MAY NOT
62+ // USE. `__builtin___clear_cache' expands to nothing on x86_64 and becomes a
63+ // CALL into the compiler's support library on the other two architectures
64+ // --- `__riscv_flush_icache' on riscv64. This implementation is linked into
65+ // programs that carry no other runtime, so acquiring that dependency to
66+ // perform an operation the specification does not require of it is not a
67+ // trade worth making.
6968 //
70- // openkal-macos reaches both of its architectures with the builtin alone
71- // and openkal-windows has a system call for it, so neither pays that price
72- // and both do it. The three agree about what the PROGRAM must do; they
73- // differ in whether the implementation does it as well, which no program
74- // that follows the specification can observe.
69+ // ⭐⭐ MEASURED, AND NOT ON THIS SYSTEM. openkal-macos added the builtin on
70+ // the reading that aarch64 would expand it inline, and its own independence
71+ // check reported within the hour:
72+ //
73+ // obj/exec.o references a symbol it must not: ___clear_cache
74+ //
75+ // ⇒ The three implementations share a rule rather than an accident:
76+ //
77+ // an implementation performs the maintenance where its environment
78+ // offers it as a CALL of the environment's own --- openkal-windows has
79+ // `FlushInstructionCache' --- and does not where the only means is a
80+ // compiler builtin that becomes a dependency upon the compiler's
81+ // support library.
82+ //
83+ // All three agree about what the PROGRAM must do, which is what the
84+ // specification actually states.
7585 return kal_ok;
7686}
7787
0 commit comments