Skip to content

Commit

Permalink
Add support for ARM FreeBSD and ARM64 (AArch64) FreeBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
kni committed Nov 6, 2019
1 parent 89891a4 commit 0337571
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/guide/src/Features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ MLton has the following features.

** <:RunningOnARM:ARM>:
*** <:RunningOnLinux:Linux> (Debian)
*** <:RunningOnFreeBSD:FreeBSD>

** <:RunningOnAlpha:Alpha>:
*** <:RunningOnLinux:Linux> (Debian)
Expand Down
4 changes: 4 additions & 0 deletions runtime/platform/freebsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0337571

Please sign in to comment.