xtensa: use definitions from xtensa-config.h
Checks
Commit Message
From 08677e05abb4b9df0819907eac0b25323539089c Mon Sep 17 00:00:00 2001
From: Alexey Lapshin <alexey.lapshin@espressif.com>
Date: Tue, 18 Oct 2022 14:03:37 +0400
Subject: [PATCH] xtensa: use definitions from xtensa-config.h
These changes are just refactored xtensa config macro definitions to
declare them in one place.
---
bfd/elf32-xtensa.c | 16 ----------------
gas/config/tc-xtensa.c | 8 --------
gas/config/xtensa-relax.c | 4 ----
gdb/xtensa-tdep.h | 8 --------
include/xtensa-config.h | 20 +++++++++++++++++---
ld/emultempl/xtensaelf.em | 13 -------------
6 files changed, 17 insertions(+), 52 deletions(-)
*);
static void xtensa_strip_inconsistent_linkonce_sections
--
2.34.1
Comments
Hi Alexey,
> These changes are just refactored xtensa config macro definitions to
> declare them in one place.
Approved - please apply.
Cheers
Nick
@@ -37,22 +37,6 @@
#define XTENSA_NO_NOP_REMOVAL 0
-#ifndef XSHAL_ABI
-#define XSHAL_ABI 0
-#endif
-
-#ifndef XTHAL_ABI_UNDEFINED
-#define XTHAL_ABI_UNDEFINED -1
-#endif
-
-#ifndef XTHAL_ABI_WINDOWED
-#define XTHAL_ABI_WINDOWED 0
-#endif
-
-#ifndef XTHAL_ABI_CALL0
-#define XTHAL_ABI_CALL0 1
-#endif
-
/* Local helper functions. */
static bool add_extra_plt_sections (struct bfd_link_info *, int);
@@ -31,14 +31,6 @@
#include "elf/xtensa.h"
/* Provide default values for new configuration settings. */
-#ifndef XTHAL_ABI_WINDOWED
-#define XTHAL_ABI_WINDOWED 0
-#endif
-
-#ifndef XTHAL_ABI_CALL0
-#define XTHAL_ABI_CALL0 1
-#endif
-
#ifndef XTENSA_MARCH_EARLIEST
#define XTENSA_MARCH_EARLIEST 0
#endif
@@ -95,10 +95,6 @@
#include <stddef.h>
#include "xtensa-config.h"
-#ifndef XCHAL_HAVE_WIDE_BRANCHES
-#define XCHAL_HAVE_WIDE_BRANCHES 0
-#endif
-
/* Imported from bfd. */
extern xtensa_isa xtensa_default_isa;
@@ -157,14 +157,6 @@ struct ctype_cache
struct type *virtual_type;
};
-#ifndef XCHAL_NUM_CONTEXTS
-# define XCHAL_NUM_CONTEXTS 0
-#endif
-
-#ifndef XCHAL_HAVE_EXCEPTIONS
-# define XCHAL_HAVE_EXCEPTIONS 1
-#endif
-
/* Xtensa-specific target dependencies. */
struct xtensa_gdbarch_tdep : gdbarch_tdep
@@ -166,11 +166,25 @@
#define XCHAL_INST_FETCH_WIDTH 4
-#undef XSHAL_ABI
+
#undef XTHAL_ABI_WINDOWED
-#undef XTHAL_ABI_CALL0
-#define XSHAL_ABI XTHAL_ABI_WINDOWED
#define XTHAL_ABI_WINDOWED 0
+
+#undef XTHAL_ABI_CALL0
#define XTHAL_ABI_CALL0 1
+#undef XSHAL_ABI
+#define XSHAL_ABI XTHAL_ABI_WINDOWED
+
+#undef XTHAL_ABI_UNDEFINED
+#define XTHAL_ABI_UNDEFINED -1
+
+
+
+#undef XCHAL_NUM_CONTEXTS
+#define XCHAL_NUM_CONTEXTS 0
+
+#undef XCHAL_HAVE_EXCEPTIONS
+#define XCHAL_HAVE_EXCEPTIONS 1
+
#endif /* !XTENSA_CONFIG_H */
@@ -29,19 +29,6 @@ fragment <<EOF
#include "elf/xtensa.h"
#include "bfd.h"
-/* Provide default values for new configuration settings. */
-#ifndef XTHAL_ABI_UNDEFINED
-#define XTHAL_ABI_UNDEFINED -1
-#endif
-
-#ifndef XTHAL_ABI_WINDOWED
-#define XTHAL_ABI_WINDOWED 0
-#endif
-
-#ifndef XTHAL_ABI_CALL0
-#define XTHAL_ABI_CALL0 1
-#endif
-
static void xtensa_wild_group_interleave (lang_statement_union_type
*);
static void xtensa_colocate_output_literals (lang_statement_union_type