[libunwind] r279941 - EHABI: fail on WMMX vops without WMMX support

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 28 13:10:34 PDT 2016


Author: compnerd
Date: Sun Aug 28 15:10:33 2016
New Revision: 279941

URL: http://llvm.org/viewvc/llvm-project?rev=279941&view=rev
Log:
EHABI: fail on WMMX vops without WMMX support

When the unwinder is built without WMMX support, if we encounter a WMMX register
virtual operation, early rather than attempting to continue as we would not have
saved the register set anyways.  This should never come down this path, but,
just in case, help it abort more explicitly.

Modified:
    libunwind/trunk/src/Unwind-EHABI.cpp

Modified: libunwind/trunk/src/Unwind-EHABI.cpp
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/Unwind-EHABI.cpp?rev=279941&r1=279940&r2=279941&view=diff
==============================================================================
--- libunwind/trunk/src/Unwind-EHABI.cpp (original)
+++ libunwind/trunk/src/Unwind-EHABI.cpp Sun Aug 28 15:10:33 2016
@@ -893,8 +893,11 @@ _Unwind_VRS_Pop(_Unwind_Context *context
                        static_cast<void *>(context), regclass, discriminator,
                        representation);
   switch (regclass) {
-    case _UVRSC_CORE:
-    case _UVRSC_WMMXC: {
+    case _UVRSC_WMMXC:
+#if !defined(__ARM_WMMX)
+      break;
+#endif
+    case _UVRSC_CORE: {
       if (representation != _UVRSD_UINT32)
         return _UVRSR_FAILED;
       // When popping SP from the stack, we don't want to override it from the
@@ -922,8 +925,11 @@ _Unwind_VRS_Pop(_Unwind_Context *context
       }
       return _UVRSR_OK;
     }
-    case _UVRSC_VFP:
-    case _UVRSC_WMMXD: {
+    case _UVRSC_WMMXD:
+#if !defined(__ARM_WMMX)
+      break;
+#endif
+    case _UVRSC_VFP: {
       if (representation != _UVRSD_VFPX && representation != _UVRSD_DOUBLE)
         return _UVRSR_FAILED;
       uint32_t first = discriminator >> 16;




More information about the cfe-commits mailing list