From 2365f51ed03afe6993bae962fdc2e5a956a64cd5 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Sat, 14 Jul 2007 14:06:15 +0000 Subject: Long live the exception handling! This patch fills the last necessary bits to enable exceptions handling in LLVM. Currently only on x86-32/linux. In fact, this patch adds necessary intrinsics (and their lowering) which represent really weird target-specific gcc builtins used inside unwinder. After corresponding llvm-gcc patch will land (easy) exceptions should be more or less workable. However, exceptions handling support should not be thought as 'finished': I expect many small and not so small glitches everywhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39855 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCRegisterInfo.cpp | 5 +++-- lib/Target/PowerPC/PPCRegisterInfo.h | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/Target/PowerPC') diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp index a788a75..19780a8 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -248,7 +248,8 @@ void PPCRegisterInfo::reMaterialize(MachineBasicBlock &MBB, MBB.insert(I, MI); } -const unsigned* PPCRegisterInfo::getCalleeSavedRegs() const { +const unsigned* PPCRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) + const { // 32-bit Darwin calling convention. static const unsigned Macho32_CalleeSavedRegs[] = { PPC::R13, PPC::R14, PPC::R15, @@ -324,7 +325,7 @@ const unsigned* PPCRegisterInfo::getCalleeSavedRegs() const { } const TargetRegisterClass* const* -PPCRegisterInfo::getCalleeSavedRegClasses() const { +PPCRegisterInfo::getCalleeSavedRegClasses(const MachineFunction *MF) const { // 32-bit Macho calling convention. static const TargetRegisterClass * const Macho32_CalleeSavedRegClasses[] = { &PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass, diff --git a/lib/Target/PowerPC/PPCRegisterInfo.h b/lib/Target/PowerPC/PPCRegisterInfo.h index 0caf106..4112034 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.h +++ b/lib/Target/PowerPC/PPCRegisterInfo.h @@ -57,9 +57,10 @@ public: virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum, int FrameIndex) const; - const unsigned *getCalleeSavedRegs() const; + const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const; - const TargetRegisterClass* const* getCalleeSavedRegClasses() const; + const TargetRegisterClass* const* getCalleeSavedRegClasses( + const MachineFunction *MF = 0) const; BitVector getReservedRegs(const MachineFunction &MF) const; -- cgit v1.1