2017-05-18 11:43:42 +02:00
|
|
|
diff --git common/compatibility.h common/compatibility.h
|
2017-08-10 10:38:48 +02:00
|
|
|
index ea320d9..c034df3 100644
|
2017-05-18 11:43:42 +02:00
|
|
|
--- common/compatibility.h
|
|
|
|
+++ common/compatibility.h
|
2017-08-10 10:38:48 +02:00
|
|
|
@@ -63,6 +63,10 @@
|
2014-08-11 10:07:23 +02:00
|
|
|
# define ARCH_arm64
|
2017-08-10 10:38:48 +02:00
|
|
|
# elif defined(__arm__)
|
|
|
|
# define ARCH_arm6l
|
2014-08-11 10:07:23 +02:00
|
|
|
+# elif defined(__s390x__)
|
|
|
|
+# define ARCH_s390x
|
2017-05-18 11:43:42 +02:00
|
|
|
+# elif defined(__s390__)
|
|
|
|
+# define ARCH_s390
|
2014-08-11 10:07:23 +02:00
|
|
|
# else
|
|
|
|
# error Unknown CPU architecture using the linux OS
|
|
|
|
# endif
|
2017-08-10 10:38:48 +02:00
|
|
|
@@ -94,7 +98,7 @@
|
2014-08-11 10:07:23 +02:00
|
|
|
#define U16H_FMT "0x%04x"
|
|
|
|
#define U8H_FMT "0x%02x"
|
|
|
|
|
2017-08-10 10:38:48 +02:00
|
|
|
-#if defined(ARCH_x86) || defined(ARCH_ppc) || defined(UEFI_BUILD) || defined(ARCH_arm6l)
|
|
|
|
+#if defined(ARCH_x86) || defined(ARCH_ppc) || defined(UEFI_BUILD) || defined(ARCH_arm6l) || defined(ARCH_s390)
|
2014-08-11 10:07:23 +02:00
|
|
|
# if defined(__MINGW32__) || defined(__MINGW64__)
|
|
|
|
# include <inttypes.h>
|
2017-05-10 20:50:21 +02:00
|
|
|
# define U64D_FMT "0x%" PRId64
|
2017-08-10 10:38:48 +02:00
|
|
|
@@ -109,7 +113,7 @@
|
2014-08-11 10:07:23 +02:00
|
|
|
# define U48H_FMT "0x%012llx"
|
|
|
|
# define U64D_FMT_GEN "llu"
|
|
|
|
# endif
|
|
|
|
-#elif defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64)
|
|
|
|
+#elif defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64) || defined(ARCH_s390x)
|
|
|
|
# define U64D_FMT "%lu"
|
|
|
|
# define U64H_FMT "0x%016lx"
|
|
|
|
# define U48H_FMT "0x%012lx"
|
2017-05-18 11:43:42 +02:00
|
|
|
diff --git mtcr_ul/packets_common.h mtcr_ul/packets_common.h
|
2017-08-10 10:38:48 +02:00
|
|
|
index 453c26f..5728fc7 100644
|
2017-05-18 11:43:42 +02:00
|
|
|
--- mtcr_ul/packets_common.h
|
|
|
|
+++ mtcr_ul/packets_common.h
|
2017-08-10 10:38:48 +02:00
|
|
|
@@ -152,6 +152,10 @@
|
2014-08-11 10:07:23 +02:00
|
|
|
# define ARCH_arm64
|
2017-08-10 10:38:48 +02:00
|
|
|
# elif defined(__arm__)
|
|
|
|
# define ARCH_arm6l
|
2014-08-11 10:07:23 +02:00
|
|
|
+# elif defined(__s390x__)
|
|
|
|
+# define ARCH_s390x
|
2017-05-18 11:43:42 +02:00
|
|
|
+# elif defined(__s390__)
|
|
|
|
+# define ARCH_s390
|
2014-08-11 10:07:23 +02:00
|
|
|
# else
|
|
|
|
# error Unknown CPU architecture using the linux OS
|
|
|
|
# endif
|
2017-08-10 10:38:48 +02:00
|
|
|
@@ -164,9 +168,9 @@
|
2014-08-11 10:07:23 +02:00
|
|
|
|
|
|
|
/**********************************/
|
|
|
|
/* define macros for print fields */
|
|
|
|
-//#if defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(__MINGW64__)
|
|
|
|
+//#if defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(__MINGW64__) || defined(ARCH_s390x)
|
|
|
|
/*
|
|
|
|
-#if !defined(UEFI_BUILD) && (defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(__MINGW64__))
|
|
|
|
+#if !defined(UEFI_BUILD) && (defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(__MINGW64__)) || defined(ARCH_s390x)
|
|
|
|
# define U64H_FMT "0x%016lx"
|
|
|
|
# define U64D_FMT "%lu"
|
|
|
|
# define U32H_FMT "0x%08x"
|
2017-08-10 10:38:48 +02:00
|
|
|
@@ -174,7 +178,7 @@
|
2014-08-11 10:07:23 +02:00
|
|
|
# define U8H_FMT "0x%02x"
|
|
|
|
# define U32D_FMT "%u"
|
|
|
|
# define STR_FMT "%s"
|
2017-08-10 10:38:48 +02:00
|
|
|
-#elif defined(ARCH_x86) || defined(ARCH_ppc) || defined(__MINGW32__) || defined(UEFI_BUILD) || defined(ARCH_arm6l)
|
|
|
|
+#elif defined(ARCH_x86) || defined(ARCH_ppc) || defined(__MINGW32__) || defined(UEFI_BUILD) || defined(ARCH_arm6l) || defined(ARCH_s390)
|
2014-08-11 10:07:23 +02:00
|
|
|
# define U64H_FMT "0x%016llx"
|
|
|
|
# define U64D_FMT "%llu"
|
|
|
|
# define U32H_FMT "0x%08x"
|
2017-05-18 11:43:42 +02:00
|
|
|
diff --git tools_layouts/adb_to_c_utils.h tools_layouts/adb_to_c_utils.h
|
|
|
|
index 6268b69..26adb09 100644
|
|
|
|
--- tools_layouts/adb_to_c_utils.h
|
|
|
|
+++ tools_layouts/adb_to_c_utils.h
|
2017-05-10 20:50:21 +02:00
|
|
|
@@ -137,6 +137,10 @@ extern "C" {
|
2014-08-11 10:07:23 +02:00
|
|
|
# define ARCH_ppc
|
|
|
|
# elif defined(__aarch64__)
|
|
|
|
# define ARCH_arm64
|
|
|
|
+# elif defined(__s390x__)
|
|
|
|
+# define ARCH_s390x
|
2017-05-18 11:43:42 +02:00
|
|
|
+# elif defined(__s390__)
|
|
|
|
+# define ARCH_s390
|
2014-08-11 10:07:23 +02:00
|
|
|
# else
|
|
|
|
# error Unknown CPU architecture using the linux OS
|
|
|
|
# endif
|
2017-05-18 11:43:42 +02:00
|
|
|
@@ -169,7 +173,11 @@ extern "C" {
|
|
|
|
#define U16H_FMT "0x%04x"
|
|
|
|
#define U8H_FMT "0x%02x"
|
|
|
|
|
|
|
|
-#if defined(ARCH_x86) || defined(ARCH_ppc) || defined(UEFI_BUILD)
|
|
|
|
+#if defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64) || defined(ARCH_s390x)
|
|
|
|
+# define U64D_FMT "%lu"
|
|
|
|
+# define U64H_FMT "0x%016lx"
|
|
|
|
+# define U48H_FMT "0x%012lx"
|
|
|
|
+#elif defined(ARCH_x86) || defined(ARCH_ppc) || defined(UEFI_BUILD) || defined(ARCH_s390)
|
|
|
|
# if defined(__MINGW32__) || defined(__MINGW64__)
|
|
|
|
# include <inttypes.h>
|
|
|
|
# define U64D_FMT "0x%" PRId64
|
|
|
|
@@ -180,10 +188,6 @@ extern "C" {
|
2014-08-11 10:07:23 +02:00
|
|
|
# define U64H_FMT "0x%016llx"
|
|
|
|
# define U48H_FMT "0x%012llx"
|
|
|
|
# endif
|
|
|
|
-#elif defined (ARCH_ia64) || defined(ARCH_x86_64) || defined(ARCH_ppc64) || defined(ARCH_arm64)
|
2017-05-18 11:43:42 +02:00
|
|
|
-# define U64D_FMT "%lu"
|
|
|
|
-# define U64H_FMT "0x%016lx"
|
|
|
|
-# define U48H_FMT "0x%012lx"
|
|
|
|
#else
|
|
|
|
# error Unknown architecture
|
|
|
|
#endif /* ARCH */
|