Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(721)

Side by Side Diff: lib/Target/ARM/ARMISelLowering.cpp

Issue 1173643002: Revert "Use R0/R1 instead of R4/R5 for ARM eh_return return values" (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Target/ARM/ARMFrameLowering.cpp ('k') | test/CodeGen/ARM/ehreturn.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- ARMISelLowering.cpp - ARM DAG Lowering Implementation -------------===// 1 //===-- ARMISelLowering.cpp - ARM DAG Lowering Implementation -------------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file defines the interfaces that ARM uses to lower LLVM code into a 10 // This file defines the interfaces that ARM uses to lower LLVM code into a
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 setOperationAction(ISD::VASTART, MVT::Other, Custom); 758 setOperationAction(ISD::VASTART, MVT::Other, Custom);
759 setOperationAction(ISD::VAARG, MVT::Other, Expand); 759 setOperationAction(ISD::VAARG, MVT::Other, Expand);
760 setOperationAction(ISD::VACOPY, MVT::Other, Expand); 760 setOperationAction(ISD::VACOPY, MVT::Other, Expand);
761 setOperationAction(ISD::VAEND, MVT::Other, Expand); 761 setOperationAction(ISD::VAEND, MVT::Other, Expand);
762 setOperationAction(ISD::STACKSAVE, MVT::Other, Expand); 762 setOperationAction(ISD::STACKSAVE, MVT::Other, Expand);
763 setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand); 763 setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand);
764 764
765 if (!Subtarget->isTargetMachO()) { 765 if (!Subtarget->isTargetMachO()) {
766 // Non-MachO platforms may return values in these registers via the 766 // Non-MachO platforms may return values in these registers via the
767 // personality function. 767 // personality function.
768 setExceptionPointerRegister(ARM::R0); 768 // @LOCALMOD-START
769 setExceptionSelectorRegister(ARM::R1); 769 if (Subtarget->isTargetNaCl()) {
770 // we use the first caller saved regs here
771 // c.f.: llvm-gcc/llvm-gcc-4.2/gcc/unwind-dw2.c::uw_install_context
772 // NOTE: these are related to the _Unwind_PNaClSetResult{0,1} functions
773 setExceptionPointerRegister(ARM::R4);
774 setExceptionSelectorRegister(ARM::R5);
775
776 setOperationAction(ISD::FRAME_TO_ARGS_OFFSET, MVT::i32, Custom);
777
778 setOperationAction(ISD::EH_RETURN, MVT::Other, Custom);
779 } else {
780 setExceptionPointerRegister(ARM::R0);
781 setExceptionSelectorRegister(ARM::R1);
782 }
783 // @LOCALMOD-END
770 } 784 }
771 785
772 // @LOCALMOD-START
773 if (Subtarget->isTargetNaCl()) {
774 setOperationAction(ISD::FRAME_TO_ARGS_OFFSET, MVT::i32, Custom);
775 setOperationAction(ISD::EH_RETURN, MVT::Other, Custom);
776 }
777 // @LOCALMOD-END
778
779 if (Subtarget->getTargetTriple().isWindowsItaniumEnvironment()) 786 if (Subtarget->getTargetTriple().isWindowsItaniumEnvironment())
780 setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Custom); 787 setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Custom);
781 else 788 else
782 setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand); 789 setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand);
783 790
784 // ARMv6 Thumb1 (except for CPUs that support dmb / dsb) and earlier use 791 // ARMv6 Thumb1 (except for CPUs that support dmb / dsb) and earlier use
785 // the default expansion. If we are targeting a single threaded system, 792 // the default expansion. If we are targeting a single threaded system,
786 // then set them all for expand so we can lower them later into their 793 // then set them all for expand so we can lower them later into their
787 // non-atomic form. 794 // non-atomic form.
788 if (TM.Options.ThreadModel == ThreadModel::Single) 795 if (TM.Options.ThreadModel == ThreadModel::Single)
(...skipping 10698 matching lines...) Expand 10 before | Expand all | Expand 10 after
11487 return false; 11494 return false;
11488 11495
11489 HABaseType Base = HA_UNKNOWN; 11496 HABaseType Base = HA_UNKNOWN;
11490 uint64_t Members = 0; 11497 uint64_t Members = 0;
11491 bool IsHA = isHomogeneousAggregate(Ty, Base, Members); 11498 bool IsHA = isHomogeneousAggregate(Ty, Base, Members);
11492 DEBUG(dbgs() << "isHA: " << IsHA << " "; Ty->dump()); 11499 DEBUG(dbgs() << "isHA: " << IsHA << " "; Ty->dump());
11493 11500
11494 bool IsIntArray = Ty->isArrayTy() && Ty->getArrayElementType()->isIntegerTy(); 11501 bool IsIntArray = Ty->isArrayTy() && Ty->getArrayElementType()->isIntegerTy();
11495 return IsHA || IsIntArray; 11502 return IsHA || IsIntArray;
11496 } 11503 }
OLDNEW
« no previous file with comments | « lib/Target/ARM/ARMFrameLowering.cpp ('k') | test/CodeGen/ARM/ehreturn.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698