Skip to content

FreeBSD arm64/aarch64 support #5499

@nunotexbsd

Description

@nunotexbsd

Feature

Add FreeBSD support on arm64/aarch64

Implementation

Add to https://github.com/bytecodealliance/wasmtime/blob/main/crates/runtime/src/traphandlers/unix.rs

 } else if #[cfg(all(target_os = "freebsd", target_arch = "aarch64"))] {
                    pc = context.uc_mcontext.mc_gpregs.gp_elr as usize;
                    sp = context.uc_mcontext.mc_gpregs.gp_sp as usize;

I take this code from https://github.com/wasmerio/wasmer/blob/dcfdea76999a/lib/vm/src/trap/traphandlers.rs#L302-L304 but don't know if some change needs to be made.

0.2.5 build log:
https://pkg-status.freebsd.org/ampere3/data/131arm64-default/b02e58aec16f/logs/lapce-0.2.5_1.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions