From af39e133059928cfcdeea0592434720897f20173 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Fri, 29 Jan 2021 02:04:45 +0700 Subject: Add support for Elbrus 2000 (e2k) (#889) --- absl/base/attributes.h | 2 +- absl/debugging/internal/examine_stack.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/absl/base/attributes.h b/absl/base/attributes.h index 0ba1e7da..f14f7bb0 100644 --- a/absl/base/attributes.h +++ b/absl/base/attributes.h @@ -121,7 +121,7 @@ #if ABSL_HAVE_ATTRIBUTE(disable_tail_calls) #define ABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 1 #define ABSL_ATTRIBUTE_NO_TAIL_CALL __attribute__((disable_tail_calls)) -#elif defined(__GNUC__) && !defined(__clang__) +#elif defined(__GNUC__) && !defined(__clang__) && !defined(__e2k__) #define ABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 1 #define ABSL_ATTRIBUTE_NO_TAIL_CALL \ __attribute__((optimize("no-optimize-sibling-calls"))) diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc index 6e5ff1fb..57913025 100644 --- a/absl/debugging/internal/examine_stack.cc +++ b/absl/debugging/internal/examine_stack.cc @@ -66,6 +66,8 @@ void* GetProgramCounter(void* vuc) { #elif defined(__x86_64__) if (16 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) return reinterpret_cast(context->uc_mcontext.gregs[16]); +#elif defined(__e2k__) + return reinterpret_cast(context->uc_mcontext.cr0_hi); #else #error "Undefined Architecture." #endif -- cgit v1.2.3