forked from OSchip/llvm-project
Fix ABIMacOSX_arm::RegisterIsVolatile() so it identifies r12 as a volatile reg.
llvm-svn: 189077
This commit is contained in:
parent
20f25eb958
commit
4a561c16f5
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue