Bug 1606092 - Add support for building Xtensa. r=kaie default tip
authorGiulio Benetti <giuliobenetti@micronovasrl.com>
Fri, 27 Dec 2019 15:25:24 +0100
changeset 4860 ef5d8d008815e8367e684149f88b43f5ae53e1d7
parent 4859 b9c2a7602ab0a1c0c890db6cf4c3b1f1e6e243c1
push id356
push userkaie@kuix.de
push dateThu, 16 Jan 2020 13:45:17 +0000
reviewerskaie
bugs1606092
Bug 1606092 - Add support for building Xtensa. r=kaie
pr/include/md/_linux.cfg
pr/include/md/_linux.h
--- a/pr/include/md/_linux.cfg
+++ b/pr/include/md/_linux.cfg
@@ -1152,17 +1152,18 @@
 #define PR_ALIGN_OF_FLOAT   4
 #define PR_ALIGN_OF_DOUBLE  4
 #define PR_ALIGN_OF_POINTER 4
 #define PR_ALIGN_OF_WORD    4
 
 #define PR_BYTES_PER_WORD_LOG2   2
 #define PR_BYTES_PER_DWORD_LOG2  3
 
-#elif defined(__nios2__) || defined(__microblaze__) || defined(__nds32__)
+#elif defined(__nios2__) || defined(__microblaze__) || defined(__nds32__) || \
+      defined(__xtensa__)
 
 #if defined(__microblaze__) && defined(__BIG_ENDIAN__)
 #define IS_BIG_ENDIAN 1
 #undef  IS_LITTLE_ENDIAN
 #else
 #define IS_LITTLE_ENDIAN 1
 #undef  IS_BIG_ENDIAN
 #endif
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -64,16 +64,18 @@
 #elif defined(__arc__)
 #define _PR_SI_ARCHITECTURE "arc"
 #elif defined(__nios2__)
 #define _PR_SI_ARCHITECTURE "nios2"
 #elif defined(__microblaze__)
 #define _PR_SI_ARCHITECTURE "microblaze"
 #elif defined(__nds32__)
 #define _PR_SI_ARCHITECTURE "nds32"
+#elif defined(__xtensa__)
+#define _PR_SI_ARCHITECTURE "xtensa"
 #else
 #error "Unknown CPU architecture"
 #endif
 #define PR_DLL_SUFFIX       ".so"
 
 #define _PR_VMBASE              0x30000000
 #define _PR_STACK_VMBASE    0x50000000
 #define _MD_DEFAULT_STACK_SIZE  65536L