Fix ABIMacOSX_arm::RegisterIsVolatile() so it identifies r12 as a volatile reg.

llvm-svn: 189077
This commit is contained in:
Jason Molenda 2013-08-22 23:53:14 +00:00
parent 20f25eb958
commit 4a561c16f5
1 changed files with 2 additions and 2 deletions

View File

@ -654,7 +654,7 @@ ABIMacOSX_arm::RegisterIsVolatile (const RegisterInfo *reg_info)
{
if (reg_info)
{
// Volatile registers include: r0, r1, r2, r3, r9, r12, r13
// Volatile registers are: r0, r1, r2, r3, r9, r12, r13 (aka sp)
const char *name = reg_info->name;
if (name[0] == 'r')
{
@ -668,7 +668,7 @@ ABIMacOSX_arm::RegisterIsVolatile (const RegisterInfo *reg_info)
return true; // r1
case '2':
case '3':
return name[2] == '\0'; // r12 - r13
return name[3] == '\0'; // r12, r13 (sp)
default:
break;
}