libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 14/27] ARM: implement dwarf_to_unw_regnum() mac


From: Tommi Rantala
Subject: [Libunwind-devel] [PATCH 14/27] ARM: implement dwarf_to_unw_regnum() macro without table
Date: Wed, 22 Aug 2012 14:28:40 +0300

---
 include/tdep-arm/dwarf-config.h |    4 ++--
 src/arm/Gglobal.c               |   11 -----------
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/include/tdep-arm/dwarf-config.h b/include/tdep-arm/dwarf-config.h
index 455d15f..c997f3a 100644
--- a/include/tdep-arm/dwarf-config.h
+++ b/include/tdep-arm/dwarf-config.h
@@ -1,5 +1,6 @@
 /* libunwind - a platform-independent unwind library
    Copyright (C) 2008 CodeSourcery
+   Copyright (C) 2012 Tommi Rantala <address@hidden>
 
 This file is part of libunwind.
 
@@ -29,8 +30,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
SOFTWARE.  */
    explicitly defined.  */
 #define DWARF_NUM_PRESERVED_REGS       128
 
-/* FIXME: Probably unnecessary on ARM.  See arm/Gglobal.c.  */
-#define DWARF_REGNUM_MAP_LENGTH                16
+#define dwarf_to_unw_regnum(reg) (((reg) < 16) ? (reg) : 0)
 
 /* Return TRUE if the ADDR_SPACE uses big-endian byte-order.  */
 #define dwarf_is_big_endian(addr_space)        0
diff --git a/src/arm/Gglobal.c b/src/arm/Gglobal.c
index 54dcd9d..2856ba9 100644
--- a/src/arm/Gglobal.c
+++ b/src/arm/Gglobal.c
@@ -31,17 +31,6 @@ HIDDEN int tdep_needs_initialization = 1;
 /* Unwinding methods to use. See UNW_METHOD_ enums */
 HIDDEN int unwi_unwind_method = UNW_ARM_METHOD_ALL;
 
-/* FIXME: I'm pretty sure we don't need this at all for ARM, but "generic"
-   code (include/dwarf_i.h) seems to expect it to be here at present.  */
-
-HIDDEN uint8_t dwarf_to_unw_regnum_map[16] =
-  {
-    /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 */
-    UNW_ARM_R0, UNW_ARM_R1, UNW_ARM_R2, UNW_ARM_R3, UNW_ARM_R4, UNW_ARM_R5,
-    UNW_ARM_R6, UNW_ARM_R7, UNW_ARM_R8, UNW_ARM_R9, UNW_ARM_R10, UNW_ARM_R11,
-    UNW_ARM_R12, UNW_ARM_R13, UNW_ARM_R14, UNW_ARM_R15
-  };
-
 HIDDEN void
 tdep_init (void)
 {
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]