# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/gperftools/alpha.patch.alpha # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- --- a/src/base/basictypes.h +++ b/src/base/basictypes.h @@ -168,6 +168,8 @@ inline void bit_store(Dest *dest, const # define CACHELINE_ALIGNED __attribute__((aligned(64))) # elif defined(__sparcv9) || defined(__sparcv9__) # define CACHELINE_ALIGNED __attribute__((aligned(64))) +# elif defined(__alpha__) +# define CACHELINE_ALIGNED __attribute__((aligned(64))) # else # error Could not determine cache line length - unknown architecture # endif --- a/src/getpc-inl.h +++ b/src/getpc-inl.h @@ -341,9 +341,23 @@ struct get_79f33851 +struct get_alpha_sc_pc : public P { +}; +template +struct get_alpha_sc_pcuc_mcontext.sc_pc)>> : public P { + static void* Get(const U* uc) { + // Linux/alpha + return (void*)(uc->uc_mcontext.sc_pc); + } +}; + inline void* RawUCToPC(const ucontext_t* uc) { + // Linux/alpha + using g_alpha_sc_pc = get_alpha_sc_pc; // OpenBSD/x86_64 - using g_79f33851 = get_79f33851; + using g_79f33851 = get_79f33851; // OpenBSD/i386 using g_3baa113a = get_3baa113a; // OS X (arm64)