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

Side by Side Diff: lib/Target/Mips/MipsISelLowering.cpp

Issue 10874034: Remove the llvm.nacl.thread.stack.padding intrinsic (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Created 8 years, 4 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/Mips/MipsISelLowering.h ('k') | lib/Target/X86/X86ISelLowering.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- MipsISelLowering.cpp - Mips DAG Lowering Implementation -----------===// 1 //===-- MipsISelLowering.cpp - Mips 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 Mips uses to lower LLVM code into a 10 // This file defines the interfaces that Mips uses to lower LLVM code into a
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 if (HasMips64) { 284 if (HasMips64) {
285 setLoadExtAction(ISD::SEXTLOAD, MVT::i32, Custom); 285 setLoadExtAction(ISD::SEXTLOAD, MVT::i32, Custom);
286 setLoadExtAction(ISD::ZEXTLOAD, MVT::i32, Custom); 286 setLoadExtAction(ISD::ZEXTLOAD, MVT::i32, Custom);
287 setLoadExtAction(ISD::EXTLOAD, MVT::i32, Custom); 287 setLoadExtAction(ISD::EXTLOAD, MVT::i32, Custom);
288 setTruncStoreAction(MVT::i64, MVT::i32, Custom); 288 setTruncStoreAction(MVT::i64, MVT::i32, Custom);
289 } 289 }
290 290
291 // @LOCALMOD-BEGIN 291 // @LOCALMOD-BEGIN
292 if (Subtarget->isTargetNaCl()) { 292 if (Subtarget->isTargetNaCl()) {
293 setOperationAction(ISD::NACL_THREAD_STACK_PADDING, MVT::i32, Custom);
294 setOperationAction(ISD::NACL_TP_ALIGN, MVT::i32, Custom); 293 setOperationAction(ISD::NACL_TP_ALIGN, MVT::i32, Custom);
295 setOperationAction(ISD::NACL_TP_TLS_OFFSET, MVT::i32, Custom); 294 setOperationAction(ISD::NACL_TP_TLS_OFFSET, MVT::i32, Custom);
296 setOperationAction(ISD::NACL_TP_TDB_OFFSET, MVT::i32, Custom); 295 setOperationAction(ISD::NACL_TP_TDB_OFFSET, MVT::i32, Custom);
297 } 296 }
298 // @LOCALMOD-END 297 // @LOCALMOD-END
299 298
300 setTargetDAGCombine(ISD::ADDE); 299 setTargetDAGCombine(ISD::ADDE);
301 setTargetDAGCombine(ISD::SUBE); 300 setTargetDAGCombine(ISD::SUBE);
302 setTargetDAGCombine(ISD::SDIVREM); 301 setTargetDAGCombine(ISD::SDIVREM);
303 setTargetDAGCombine(ISD::UDIVREM); 302 setTargetDAGCombine(ISD::UDIVREM);
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 case ISD::FRAMEADDR: return LowerFRAMEADDR(Op, DAG); 816 case ISD::FRAMEADDR: return LowerFRAMEADDR(Op, DAG);
818 case ISD::MEMBARRIER: return LowerMEMBARRIER(Op, DAG); 817 case ISD::MEMBARRIER: return LowerMEMBARRIER(Op, DAG);
819 case ISD::ATOMIC_FENCE: return LowerATOMIC_FENCE(Op, DAG); 818 case ISD::ATOMIC_FENCE: return LowerATOMIC_FENCE(Op, DAG);
820 case ISD::SHL_PARTS: return LowerShiftLeftParts(Op, DAG); 819 case ISD::SHL_PARTS: return LowerShiftLeftParts(Op, DAG);
821 case ISD::SRA_PARTS: return LowerShiftRightParts(Op, DAG, true); 820 case ISD::SRA_PARTS: return LowerShiftRightParts(Op, DAG, true);
822 case ISD::SRL_PARTS: return LowerShiftRightParts(Op, DAG, false); 821 case ISD::SRL_PARTS: return LowerShiftRightParts(Op, DAG, false);
823 case ISD::LOAD: return LowerLOAD(Op, DAG); 822 case ISD::LOAD: return LowerLOAD(Op, DAG);
824 case ISD::STORE: return LowerSTORE(Op, DAG); 823 case ISD::STORE: return LowerSTORE(Op, DAG);
825 824
826 // @LOCALMOD-BEGIN 825 // @LOCALMOD-BEGIN
827 case ISD::NACL_THREAD_STACK_PADDING:
828 return LowerNaClThreadStackPadding(Op, DAG);
829 case ISD::NACL_TP_ALIGN: return LowerNaClTpAlign(Op, DAG); 826 case ISD::NACL_TP_ALIGN: return LowerNaClTpAlign(Op, DAG);
830 case ISD::NACL_TP_TLS_OFFSET: return LowerNaClTpTlsOffset(Op, DAG); 827 case ISD::NACL_TP_TLS_OFFSET: return LowerNaClTpTlsOffset(Op, DAG);
831 case ISD::NACL_TP_TDB_OFFSET: return LowerNaClTpTdbOffset(Op, DAG); 828 case ISD::NACL_TP_TDB_OFFSET: return LowerNaClTpTdbOffset(Op, DAG);
832 // @LOCALMOD-END 829 // @LOCALMOD-END
833 } 830 }
834 return SDValue(); 831 return SDValue();
835 } 832 }
836 833
837 //===----------------------------------------------------------------------===// 834 //===----------------------------------------------------------------------===//
838 // Lower helper functions 835 // Lower helper functions
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 MachinePointerInfo(), false, false, false, 0); 1677 MachinePointerInfo(), false, false, false, 0);
1681 SDValue Lo = DAG.getNode(MipsISD::Lo, dl, ValTy, BALOOffset); 1678 SDValue Lo = DAG.getNode(MipsISD::Lo, dl, ValTy, BALOOffset);
1682 return DAG.getNode(ISD::ADD, dl, ValTy, Load, Lo); 1679 return DAG.getNode(ISD::ADD, dl, ValTy, Load, Lo);
1683 } 1680 }
1684 1681
1685 // @LOCALMOD-BEGIN 1682 // @LOCALMOD-BEGIN
1686 1683
1687 // NaCl TLS setup / layout intrinsics. 1684 // NaCl TLS setup / layout intrinsics.
1688 // See: native_client/src/untrusted/nacl/tls_params.h 1685 // See: native_client/src/untrusted/nacl/tls_params.h
1689 1686
1690 SDValue MipsTargetLowering::LowerNaClThreadStackPadding(SDValue Op,
1691 SelectionDAG &DAG) const {
1692 return DAG.getConstant(0, Op.getValueType().getSimpleVT());
1693 }
1694
1695 SDValue MipsTargetLowering::LowerNaClTpAlign(SDValue Op, 1687 SDValue MipsTargetLowering::LowerNaClTpAlign(SDValue Op,
1696 SelectionDAG &DAG) const { 1688 SelectionDAG &DAG) const {
1697 return DAG.getConstant(4, Op.getValueType().getSimpleVT()); 1689 return DAG.getConstant(4, Op.getValueType().getSimpleVT());
1698 } 1690 }
1699 1691
1700 SDValue MipsTargetLowering::LowerNaClTpTlsOffset(SDValue Op, 1692 SDValue MipsTargetLowering::LowerNaClTpTlsOffset(SDValue Op,
1701 SelectionDAG &DAG) const { 1693 SelectionDAG &DAG) const {
1702 return DAG.getConstant(0, Op.getValueType().getSimpleVT()); 1694 return DAG.getConstant(0, Op.getValueType().getSimpleVT());
1703 } 1695 }
1704 1696
(...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after
3580 return false; 3572 return false;
3581 return Imm.isZero(); 3573 return Imm.isZero();
3582 } 3574 }
3583 3575
3584 unsigned MipsTargetLowering::getJumpTableEncoding() const { 3576 unsigned MipsTargetLowering::getJumpTableEncoding() const {
3585 if (IsN64) 3577 if (IsN64)
3586 return MachineJumpTableInfo::EK_GPRel64BlockAddress; 3578 return MachineJumpTableInfo::EK_GPRel64BlockAddress;
3587 3579
3588 return TargetLowering::getJumpTableEncoding(); 3580 return TargetLowering::getJumpTableEncoding();
3589 } 3581 }
OLDNEW
« no previous file with comments | « lib/Target/Mips/MipsISelLowering.h ('k') | lib/Target/X86/X86ISelLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698