|
Zbigniew Jędrzejewski-Szmek |
47c564 |
From ff02c36bfc811fc7ecbcaebdbc3bc4bebb5f19ab Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
From: Henrik Grindal Bakken <hgb@ifi.uio.no>
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Date: Thu, 27 Feb 2014 21:19:13 +0100
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Subject: [PATCH] architecture: Add tilegx
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Add Tilera's TILE-GX processor family support.
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
(cherry picked from commit 46eea341c36f0caf0bdd5b2274a1ef7cb4e83e97)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
src/shared/architecture.c | 3 +++
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
src/shared/architecture.h | 3 +++
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
2 files changed, 6 insertions(+)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
diff --git a/src/shared/architecture.c b/src/shared/architecture.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
index ceba492..fcdb3d5 100644
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
--- a/src/shared/architecture.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+++ b/src/shared/architecture.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
@@ -112,6 +112,8 @@ Architecture uname_architecture(void) {
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
{ "sh", ARCHITECTURE_SH },
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
#elif defined(__m68k__)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
{ "m68k", ARCHITECTURE_M68K },
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+#elif defined(__tilegx__)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ { "tilegx", ARCHITECTURE_TILEGX },
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
#else
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
#error "Please register your architecture here!"
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
#endif
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
@@ -158,6 +160,7 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = {
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
[ARCHITECTURE_SH] = "sh",
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
[ARCHITECTURE_SH64] = "sh64",
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
[ARCHITECTURE_M68K] = "m68k",
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ [ARCHITECTURE_TILEGX] = "tilegx",
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
};
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
DEFINE_STRING_TABLE_LOOKUP(architecture, Architecture);
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
diff --git a/src/shared/architecture.h b/src/shared/architecture.h
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
index 3183645..e589a91 100644
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
--- a/src/shared/architecture.h
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+++ b/src/shared/architecture.h
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
@@ -47,6 +47,7 @@ typedef enum Architecture {
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
ARCHITECTURE_SH,
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
ARCHITECTURE_SH64,
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
ARCHITECTURE_M68K,
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ ARCHITECTURE_TILEGX,
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
_ARCHITECTURE_MAX,
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
_ARCHITECTURE_INVALID = -1
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
} Architecture;
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
@@ -107,6 +108,8 @@ Architecture uname_architecture(void);
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
# define native_architecture() ARCHITECTURE_SH
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
#elif defined(__m68k__)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
# define native_architecture() ARCHITECTURE_M68K
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+#elif defined(__tilegx__)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+# define native_architecture() ARCHITECTURE_TILEGX
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
#else
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
#error "Please register your architecture here!"
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
#endif
|