1 Pull in r202059 from upstream clang trunk (by Roman Divacky):
3 Implement getDwarfEHStackPointer() and initDwarfEHRegSizeTable() for sparcv9.
5 Introduced here: http://svnweb.freebsd.org/changeset/base/262460
7 Index: tools/clang/lib/CodeGen/TargetInfo.cpp
8 ===================================================================
9 --- tools/clang/lib/CodeGen/TargetInfo.cpp
10 +++ tools/clang/lib/CodeGen/TargetInfo.cpp
11 @@ -5435,10 +5435,51 @@ class SparcV9TargetCodeGenInfo : public TargetCode
13 SparcV9TargetCodeGenInfo(CodeGenTypes &CGT)
14 : TargetCodeGenInfo(new SparcV9ABIInfo(CGT)) {}
16 + int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const {
20 + bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF,
21 + llvm::Value *Address) const;
23 } // end anonymous namespace
26 +SparcV9TargetCodeGenInfo::initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF,
27 + llvm::Value *Address) const {
28 + // This is calculated from the LLVM and GCC tables and verified
29 + // against gcc output. AFAIK all ABIs use the same encoding.
31 + CodeGen::CGBuilderTy &Builder = CGF.Builder;
33 + llvm::IntegerType *i8 = CGF.Int8Ty;
34 + llvm::Value *Four8 = llvm::ConstantInt::get(i8, 4);
35 + llvm::Value *Eight8 = llvm::ConstantInt::get(i8, 8);
37 + // 0-31: the 8-byte general-purpose registers
38 + AssignToArrayRange(Builder, Address, Eight8, 0, 31);
40 + // 32-63: f0-31, the 4-byte floating-point registers
41 + AssignToArrayRange(Builder, Address, Four8, 32, 63);
51 + AssignToArrayRange(Builder, Address, Eight8, 64, 71);
53 + // 72-87: d0-15, the 8-byte floating-point registers
54 + AssignToArrayRange(Builder, Address, Eight8, 72, 87);
60 //===----------------------------------------------------------------------===//
61 // Xcore ABI Implementation
62 //===----------------------------------------------------------------------===//