diff --git a/doc/guide/src/Features.adoc b/doc/guide/src/Features.adoc index 844e605a5c..44b9b6d7dc 100644 --- a/doc/guide/src/Features.adoc +++ b/doc/guide/src/Features.adoc @@ -9,6 +9,7 @@ MLton has the following features. ** <:RunningOnARM:ARM>: *** <:RunningOnLinux:Linux> (Debian) +*** <:RunningOnFreeBSD:FreeBSD> ** <:RunningOnAlpha:Alpha>: *** <:RunningOnLinux:Linux> (Debian) diff --git a/runtime/platform/freebsd.c b/runtime/platform/freebsd.c index 2aa0a925ae..e7ebea9d37 100644 --- a/runtime/platform/freebsd.c +++ b/runtime/platform/freebsd.c @@ -21,6 +21,10 @@ static void catcher (__attribute__ ((unused)) int signo, GC_handleSigProf ((code_pointer) ucp->uc_mcontext.mc_rip); #elif (defined (__i386__)) GC_handleSigProf ((code_pointer) ucp->uc_mcontext.mc_eip); +#elif (defined (__arm__)) + GC_handleSigProf ((code_pointer) ucp->uc_mcontext.__gregs[_REG_PC]); +#elif (defined (__aarch64__)) + GC_handleSigProf ((code_pointer) ucp->uc_mcontext.mc_gpregs.gp_elr); #else #error Profiling handler is missing for this architecture #endif