Mark the armv7 q0-q3 and q8-q15 registers as volatile (not callee
authorJason Molenda <jmolenda@apple.com>
Tue, 2 Dec 2014 23:21:05 +0000 (23:21 +0000)
committerJason Molenda <jmolenda@apple.com>
Tue, 2 Dec 2014 23:21:05 +0000 (23:21 +0000)
preserved) in the ABI.

Realistically lldb isn't able to track register saves of any of
the neon regs right now so we should probably mark all of the
regs as unavailable when you're not on stack frame 0...

<rdar://problem/19115127>

llvm-svn: 223174

lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp

index a9f8f3b..5073b13 100644 (file)
@@ -801,6 +801,36 @@ ABIMacOSX_arm::RegisterIsVolatile (const RegisterInfo *reg_info)
                     break;
             }
         }
+        else if (name[0] == 'q')
+        {
+            switch (name[1])
+            {
+                case '1':
+                    switch (name[2])
+                    {
+                        case '\0':
+                            return true;  // q1 is volatile
+                        case '0':
+                        case '1':
+                        case '2':
+                        case '3':
+                        case '4':
+                        case '5':
+                            return true; // q10-q15 are volatile
+                        default:
+                            break;
+                    };
+                case '0': 
+                case '2': 
+                case '3': 
+                    return name[2] == '\0'; // q0-q3 are volatile
+                case '8':
+                case '9':
+                    return name[2] == '\0'; // q8-q9 are volatile
+                default:
+                    break;
+            }
+        }
         else if (name[0] == 's' && name[1] == 'p' && name[2] == '\0')
             return true;
     }