aboutsummaryrefslogtreecommitdiff
path: root/gcc/unwind-dw2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/unwind-dw2.c')
-rw-r--r--gcc/unwind-dw2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c
index 67b8d1cd066..baa4481c747 100644
--- a/gcc/unwind-dw2.c
+++ b/gcc/unwind-dw2.c
@@ -125,6 +125,11 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
int size;
void *ptr;
+#ifdef DWARF_ZERO_REG
+ if (index == DWARF_ZERO_REG)
+ return 0;
+#endif
+
index = DWARF_REG_TO_UNWIND_COLUMN (index);
if (index >= (int) sizeof(dwarf_reg_size_table))
abort ();