HomeFreeBSD

Add an implementation of .mcount on arm64

Description

Add an implementation of .mcount on arm64

To support cc -pg on arm64 we need to implement .mcount. As clang and
gcc think it is function like it just needs to load the arguments
to _mcount and call it.

On gcc the first argument is passed in x0, however this is missing on
clang so we need to load it from the stack. As it's the caller return
address this will be at a known location.

PR: 262709
Reviewed by: emaste (earlier version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34634

(cherry picked from commit 16d5f9a1649e6a3e5841c6c41d6af9430ed9f064)

Details

Provenance
andrewAuthored on Mar 22 2022, 3:46 PM
Reviewer
emaste
Differential Revision
D34634: Add an implementation of .mcount on arm64.
Parents
rGa0290386cf0d: Add support for arm64 nGnRE device memory
Branches
Unknown
Tags
Unknown