Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/arch



Module Name:    src
Committed By:   kamil
Date:           Thu Feb 15 15:53:57 UTC 2018

Modified Files:
        src/sys/arch/aarch64/include: mcontext.h
        src/sys/arch/alpha/include: mcontext.h
        src/sys/arch/amd64/include: mcontext.h
        src/sys/arch/arm/include: mcontext.h
        src/sys/arch/hppa/include: mcontext.h
        src/sys/arch/i386/include: mcontext.h
        src/sys/arch/ia64/include: mcontext.h
        src/sys/arch/m68k/include: mcontext.h
        src/sys/arch/mips/include: mcontext.h
        src/sys/arch/or1k/include: mcontext.h
        src/sys/arch/powerpc/include: mcontext.h
        src/sys/arch/riscv/include: mcontext.h
        src/sys/arch/sh3/include: mcontext.h
        src/sys/arch/sparc/include: mcontext.h
        src/sys/arch/vax/include: mcontext.h

Log Message:
Introduce _UC_MACHINE_FP() as a macro

_UC_MACHINE_FP() is a helper macro to extract from mcontext a frame pointer.

Don't rely on this interface as a compiler might strip frame pointer or
optimize it making this interface unreliable.

For hppa assume a small frame context, for larger frames FP might be located
in a different register (4 instead of 3).

For ia64 there is no strict frame pointer, and registers might rotate.
Reuse 79 following:

  ./gcc/config/ia64/ia64.h:#define HARD_FRAME_POINTER_REGNUM  LOC_REG (79)

Once ia64 will mature, this should be revisited.

A macro can encapsulate a real function for extracting Frame Pointer on
more complex CPUs / ABIs.

For the remaining CPUs, reuse standard register as defined in appropriate ABI.

The direct users of this macro are LLVM and GCC with Sanitizers.

Proposed on tech-userlevel@.

Sponsored by <The NetBSD Foundation>


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/include/mcontext.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/alpha/include/mcontext.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/amd64/include/mcontext.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/include/mcontext.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/include/mcontext.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/include/mcontext.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/include/mcontext.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/include/mcontext.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/mips/include/mcontext.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/or1k/include/mcontext.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/include/mcontext.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/include/mcontext.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sh3/include/mcontext.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sparc/include/mcontext.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/vax/include/mcontext.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index