<pre style='margin:0'>
Landon Fuller (landonf) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/8a0066feb949ed04b2d2d77560e1ea20870e69d1">https://github.com/macports/macports-ports/commit/8a0066feb949ed04b2d2d77560e1ea20870e69d1</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 8a0066feb94 kremlin-devel: replace __builtin_readcyclecounter with mach_absolute_time()
</span>8a0066feb94 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 8a0066feb949ed04b2d2d77560e1ea20870e69d1
</span>Author: Landon Fuller <landonf@macports.org>
AuthorDate: Fri May 21 09:24:30 2021 -0600
<span style='display:block; white-space:pre;color:#404040;'> kremlin-devel: replace __builtin_readcyclecounter with mach_absolute_time()
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Turns out __builtin_readcyclecounter triggers SIGILL on ARM64 macs.
</span>---
lang/fstar/Portfile | 4 +-
.../patch-kremlib-builtin-readcyclecounter | 29 --------------
.../kremlin-devel/patch-kremlib-mach_absolute_time | 44 ++++++++++++++++++++++
3 files changed, 46 insertions(+), 31 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/fstar/Portfile b/lang/fstar/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index a4ef58e2621..434efab1fc5 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/fstar/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/fstar/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -247,7 +247,7 @@ subport kremlin {
</span> subport kremlin-devel {
github.setup ${github.author} ${fstar.project} 5a8c41548147e548b258cefa755064a48cb31b39
version 20210510-[string range ${github.version} 0 6]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 1
</span>
checksums rmd160 7e7ffb011ae41c8dd55ac2a00220b08aa2b15986 \
sha256 5db9af845067b58d772f47b9b24410d221cdd5b702c4153c621400f0caeec0c7 \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -257,7 +257,7 @@ subport kremlin-devel {
</span> kremlin-devel/patch-fstar-discover-path \
kremlin-devel/patch-fstar-driver-no-lax \
kremlin-devel/patch-kremlib-march-native \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- kremlin-devel/patch-kremlib-builtin-readcyclecounter \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ kremlin-devel/patch-kremlib-mach_absolute_time \
</span> kremlin-devel/patch-test_system_system.h
depends_lib-append port:ocaml-sedlex
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/fstar/files/kremlin-devel/patch-kremlib-builtin-readcyclecounter b/lang/fstar/files/kremlin-devel/patch-kremlib-builtin-readcyclecounter
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index d845e8c9686..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/fstar/files/kremlin-devel/patch-kremlib-builtin-readcyclecounter
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,29 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- kremlib/c/testlib.c.orig 2021-05-10 21:03:38.000000000 -0600
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ kremlib/c/testlib.c 2021-05-10 21:08:23.000000000 -0600
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -5,23 +5,17 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifndef _MSC_VER
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- TestLib_cycles TestLib_cpucycles(void) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- unsigned hi, lo;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- __asm__ __volatile__("rdtsc" : "=a"(lo), "=d"(hi));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- return ((unsigned long long)lo) | (((unsigned long long)hi) << 32);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return __builtin_readcyclecounter();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- TestLib_cycles TestLib_cpucycles_begin(void)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- unsigned hi, lo;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- __asm__ __volatile__ ("CPUID\n\t" "RDTSC\n\t" "mov %%edx, %0\n\t" "mov %%eax, %1\n\t": "=r" (hi), "=r" (lo):: "%rax", "%rbx", "%rcx", "%rdx");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- return ( (uint64_t)lo)|( ((uint64_t)hi)<<32 );
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return __builtin_readcyclecounter();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- TestLib_cycles TestLib_cpucycles_end(void)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- unsigned hi, lo;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- __asm__ __volatile__ ("RDTSCP\n\t" "mov %%edx, %0\n\t" "mov %%eax, %1\n\t" "CPUID\n\t": "=r" (hi), "=r" (lo):: "%rax", "%rbx", "%rcx", "%rdx");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- return ( (uint64_t)lo)|( ((uint64_t)hi)<<32 );
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return __builtin_readcyclecounter();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/fstar/files/kremlin-devel/patch-kremlib-mach_absolute_time b/lang/fstar/files/kremlin-devel/patch-kremlib-mach_absolute_time
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..3b549385b65
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/fstar/files/kremlin-devel/patch-kremlib-mach_absolute_time
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,44 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- kremlib/c/testlib.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ kremlib/c/testlib.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -3,25 +3,41 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "TestLib.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# include <mach/mach_time.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef _MSC_VER
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TestLib_cycles TestLib_cpucycles(void) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return mach_absolute_time();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unsigned hi, lo;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ __asm__ __volatile__("rdtsc" : "=a"(lo), "=d"(hi));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ((unsigned long long)lo) | (((unsigned long long)hi) << 32);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TestLib_cycles TestLib_cpucycles_begin(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return mach_absolute_time();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unsigned hi, lo;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ __asm__ __volatile__ ("CPUID\n\t" "RDTSC\n\t" "mov %%edx, %0\n\t" "mov %%eax, %1\n\t": "=r" (hi), "=r" (lo):: "%rax", "%rbx", "%rcx", "%rdx");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ( (uint64_t)lo)|( ((uint64_t)hi)<<32 );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TestLib_cycles TestLib_cpucycles_end(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return mach_absolute_time();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unsigned hi, lo;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ __asm__ __volatile__ ("RDTSCP\n\t" "mov %%edx, %0\n\t" "mov %%eax, %1\n\t" "CPUID\n\t": "=r" (hi), "=r" (lo):: "%rax", "%rbx", "%rcx", "%rdx");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ( (uint64_t)lo)|( ((uint64_t)hi)<<32 );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>