forked from OSchip/llvm-project
PowerPC: fix __builtin_eh_return_data_regno return
llvm-svn: 173188
This commit is contained in:
parent
e3aac2c864
commit
5d874aeea9
|
@ -818,6 +818,11 @@ public:
|
|||
virtual const char *getClobbers() const {
|
||||
return "";
|
||||
}
|
||||
int getEHDataRegisterNumber(unsigned RegNo) const {
|
||||
if (RegNo == 0) return 3;
|
||||
if (RegNo == 1) return 4;
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
const Builtin::Info PPCTargetInfo::BuiltinInfo[] = {
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
// REQUIRES: ppc32-registered-target
|
||||
// RUN: %clang_cc1 -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s
|
||||
|
||||
void test_eh_return_data_regno()
|
||||
{
|
||||
volatile int res;
|
||||
res = __builtin_eh_return_data_regno(0); // CHECK: store volatile i32 3
|
||||
res = __builtin_eh_return_data_regno(1); // CHECK: store volatile i32 4
|
||||
}
|
Loading…
Reference in New Issue