[PATCH] D13160: unwind: Allow the building of libunwind for MIPS.

Vasileios Kalintiris via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 26 11:27:45 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL248673: unwind: Allow the building of libunwind for MIPS. (authored by vkalintiris).

Changed prior to commit:
  http://reviews.llvm.org/D13160?vs=35711&id=35803#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13160

Files:
  libunwind/trunk/src/UnwindRegistersSave.S
  libunwind/trunk/src/config.h
  libunwind/trunk/src/libunwind.cpp

Index: libunwind/trunk/src/config.h
===================================================================
--- libunwind/trunk/src/config.h
+++ libunwind/trunk/src/config.h
@@ -41,7 +41,8 @@
 
   #define _LIBUNWIND_BUILD_ZERO_COST_APIS (defined(__i386__) || \
                                            defined(__x86_64__) || \
-                                           defined(__arm64__))
+                                           defined(__arm64__) || \
+                                           defined(__mips__))
   #define _LIBUNWIND_BUILD_SJLJ_APIS      defined(__arm__)
   #define _LIBUNWIND_SUPPORT_FRAME_APIS   (defined(__i386__) || \
                                            defined(__x86_64__))
Index: libunwind/trunk/src/libunwind.cpp
===================================================================
--- libunwind/trunk/src/libunwind.cpp
+++ libunwind/trunk/src/libunwind.cpp
@@ -64,6 +64,8 @@
 #elif defined(__or1k__)
   new ((void *)cursor) UnwindCursor<LocalAddressSpace, Registers_or1k>(
                                  context, LocalAddressSpace::sThisAddressSpace);
+#elif defined(__mips__)
+#warning The MIPS architecture is not supported.
 #else
 #error Architecture not supported
 #endif
Index: libunwind/trunk/src/UnwindRegistersSave.S
===================================================================
--- libunwind/trunk/src/UnwindRegistersSave.S
+++ libunwind/trunk/src/UnwindRegistersSave.S
@@ -87,6 +87,15 @@
   xorl  %eax, %eax    # return UNW_ESUCCESS
   ret
 
+# elif defined(__mips__)
+
+#
+# extern int unw_getcontext(unw_context_t* thread_state)
+#
+# Just trap for the time being.
+DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
+  teq $0, $0
+
 #elif defined(__ppc__)
 
 ;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13160.35803.patch
Type: text/x-patch
Size: 1716 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150926/65d2d38c/attachment.bin>


More information about the llvm-commits mailing list