Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2K: added initial support of MCST Elbrus 2000 CPU architecture #194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/optick.h
Expand Up @@ -56,6 +56,9 @@
# elif defined(__arm__) || defined(_M_ARM)
# define OPTICK_ARM (1)
# define OPTICK_32BIT (1)
# elif defined(__e2k__)
# define OPTICK_E2K (1)
# define OPTICK_64BIT (1)
# endif
#else
#error Compiler not supported
Expand Down
8 changes: 8 additions & 0 deletions src/optick_core.cpp
Expand Up @@ -745,6 +745,8 @@ bool SwitchContextCollector::Serialize(OutputDataStream& stream)
#define CPUID(INFO, ID) __cpuid(INFO, ID)
#elif (defined(__ANDROID__) || defined(OPTICK_ARM))
// Nothing
#elif defined(OPTICK_E2K)
// Nothing
#elif defined(OPTICK_GCC)
#include <cpuid.h>
#define CPUID(INFO, ID) __cpuid(ID, INFO[0], INFO[1], INFO[2], INFO[3])
Expand Down Expand Up @@ -773,6 +775,12 @@ string GetCPUName()
#else
return "ARM 64-bit";
#endif
#elif defined(OPTICK_E2K)
#if (defined(__LCC__) && defined(__MCST__)) // MCST LCC (eLbrus Compiler Collection)
return __builtin_cpu_name(); // e.g. elbrus-8c
#else
return "MCST Elbrus CPU";
#endif
#else
int cpuInfo[4] = { -1 };
char cpuBrandString[0x40] = { 0 };
Expand Down