diff options
author | Dale Johannesen <dalej@apple.com> | 2010-04-29 19:32:19 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-04-29 19:32:19 +0000 |
commit | 8c5358c93675b009ba2d57c3a5980f6bc58ba536 (patch) | |
tree | f164b234d189a1c4a26824a3466bbd66f241397d /lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 67a444ca362b6f2dc64016494eb1165d46aef0bf (diff) |
Make naked functions work on PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | lib/CodeGen/PrologEpilogInserter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index 365a84ab52..16bf6ea765 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -197,6 +197,10 @@ void PEI::calculateCalleeSavedRegisters(MachineFunction &Fn) { if (CSRegs == 0 || CSRegs[0] == 0) return; + // In Naked functions we aren't going to save any registers. + if (Fn.getFunction()->hasFnAttr(Attribute::Naked)) + return; + // Figure out which *callee saved* registers are modified by the current // function, thus needing to be saved and restored in the prolog/epilog. const TargetRegisterClass * const *CSRegClasses = |