OLD | NEW |
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 Loading... |
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 // @LOCALMOD-START | 768 setExceptionPointerRegister(ARM::R0); |
769 if (Subtarget->isTargetNaCl()) { | 769 setExceptionSelectorRegister(ARM::R1); |
770 // we use the first caller saved regs here | 770 } |
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 | 771 |
778 setOperationAction(ISD::EH_RETURN, MVT::Other, Custom); | 772 // @LOCALMOD-START |
779 } else { | 773 if (Subtarget->isTargetNaCl()) { |
780 setExceptionPointerRegister(ARM::R0); | 774 setOperationAction(ISD::FRAME_TO_ARGS_OFFSET, MVT::i32, Custom); |
781 setExceptionSelectorRegister(ARM::R1); | 775 setOperationAction(ISD::EH_RETURN, MVT::Other, Custom); |
782 } | |
783 // @LOCALMOD-END | |
784 } | 776 } |
| 777 // @LOCALMOD-END |
785 | 778 |
786 if (Subtarget->getTargetTriple().isWindowsItaniumEnvironment()) | 779 if (Subtarget->getTargetTriple().isWindowsItaniumEnvironment()) |
787 setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Custom); | 780 setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Custom); |
788 else | 781 else |
789 setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand); | 782 setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand); |
790 | 783 |
791 // ARMv6 Thumb1 (except for CPUs that support dmb / dsb) and earlier use | 784 // ARMv6 Thumb1 (except for CPUs that support dmb / dsb) and earlier use |
792 // the default expansion. If we are targeting a single threaded system, | 785 // the default expansion. If we are targeting a single threaded system, |
793 // then set them all for expand so we can lower them later into their | 786 // then set them all for expand so we can lower them later into their |
794 // non-atomic form. | 787 // non-atomic form. |
(...skipping 10699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11494 return false; | 11487 return false; |
11495 | 11488 |
11496 HABaseType Base = HA_UNKNOWN; | 11489 HABaseType Base = HA_UNKNOWN; |
11497 uint64_t Members = 0; | 11490 uint64_t Members = 0; |
11498 bool IsHA = isHomogeneousAggregate(Ty, Base, Members); | 11491 bool IsHA = isHomogeneousAggregate(Ty, Base, Members); |
11499 DEBUG(dbgs() << "isHA: " << IsHA << " "; Ty->dump()); | 11492 DEBUG(dbgs() << "isHA: " << IsHA << " "; Ty->dump()); |
11500 | 11493 |
11501 bool IsIntArray = Ty->isArrayTy() && Ty->getArrayElementType()->isIntegerTy(); | 11494 bool IsIntArray = Ty->isArrayTy() && Ty->getArrayElementType()->isIntegerTy(); |
11502 return IsHA || IsIntArray; | 11495 return IsHA || IsIntArray; |
11503 } | 11496 } |
OLD | NEW |