Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: gcc/unwind-dw2.c

Issue 23629051: ARM EH: Extend DWARF_FRAME_REGISTERS count to 48 and map reg# 256 -> 16. (Closed) Base URL: http://git.chromium.org/native_client/pnacl-gcc.git@pnacl
Patch Set: typos Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gcc/unwind-pnacl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/unwind-dw2.c
diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c
index 41d540bf8fb1a3d4580b25d42ede7b50de3866d7..f7a723656705a9ed790a40de98bdaad265ebb560 100644
--- a/gcc/unwind-dw2.c
+++ b/gcc/unwind-dw2.c
@@ -51,9 +51,34 @@
#define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS
#endif
+/* @LOCALMOD-BEGIN */
+#if defined(__arm__)
+/*
+ * Override DWARF_REG_TO_UNWIND_COLUMN to map high ARM register numbers
+ * into lower and obsolete register numbers. See unwind-pnacl.h.
+ */
+int DWARF_REG_TO_UNWIND_COLUMN(int REGNO) {
+ if (REGNO >= 0 && REGNO < 16)
+ return REGNO;
+ if (REGNO >= 256 && REGNO < 287)
+ return (REGNO - 256 + 16);
+ /*
+ * Otherwise, assume REGNO is already mapped down from 256-287 -> 16-48.
+ * The normal 16-48 ARM dwarf registers are obsolete
+ * so this is sort of okay.
+ */
+ if (REGNO < DWARF_FRAME_REGISTERS)
+ return REGNO;
+ abort();
+}
+
+#else
#ifndef DWARF_REG_TO_UNWIND_COLUMN
#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
#endif
+#endif // __arm__
+/* @LOCALMOD-END
+
/* This is the register and unwind state for a particular frame. This
provides the information necessary to unwind up past a frame and return
« no previous file with comments | « no previous file | gcc/unwind-pnacl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698