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

Side by Side Diff: lib/Target/X86/X86ISelLowering.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/X86/X86ISelLowering.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- X86ISelLowering.cpp - X86 DAG Lowering Implementation -------------===// 1 //===-- X86ISelLowering.cpp - X86 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 X86 uses to lower LLVM code into a 10 // This file defines the interfaces that X86 uses to lower LLVM code into a
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 setTargetDAGCombine(ISD::UINT_TO_FP); 1240 setTargetDAGCombine(ISD::UINT_TO_FP);
1241 setTargetDAGCombine(ISD::SINT_TO_FP); 1241 setTargetDAGCombine(ISD::SINT_TO_FP);
1242 setTargetDAGCombine(ISD::SETCC); 1242 setTargetDAGCombine(ISD::SETCC);
1243 setTargetDAGCombine(ISD::FP_TO_SINT); 1243 setTargetDAGCombine(ISD::FP_TO_SINT);
1244 if (Subtarget->is64Bit()) 1244 if (Subtarget->is64Bit())
1245 setTargetDAGCombine(ISD::MUL); 1245 setTargetDAGCombine(ISD::MUL);
1246 setTargetDAGCombine(ISD::XOR); 1246 setTargetDAGCombine(ISD::XOR);
1247 1247
1248 // @LOCALMOD-BEGIN 1248 // @LOCALMOD-BEGIN
1249 if (Subtarget->isTargetNaCl()) { 1249 if (Subtarget->isTargetNaCl()) {
1250 setOperationAction(ISD::NACL_THREAD_STACK_PADDING, MVT::i32, Custom);
1251 setOperationAction(ISD::NACL_TP_ALIGN, MVT::i32, Custom); 1250 setOperationAction(ISD::NACL_TP_ALIGN, MVT::i32, Custom);
1252 setOperationAction(ISD::NACL_TP_TLS_OFFSET, MVT::i32, Custom); 1251 setOperationAction(ISD::NACL_TP_TLS_OFFSET, MVT::i32, Custom);
1253 setOperationAction(ISD::NACL_TP_TDB_OFFSET, MVT::i32, Custom); 1252 setOperationAction(ISD::NACL_TP_TDB_OFFSET, MVT::i32, Custom);
1254 setOperationAction(ISD::NACL_TARGET_ARCH, MVT::i32, Custom); 1253 setOperationAction(ISD::NACL_TARGET_ARCH, MVT::i32, Custom);
1255 } 1254 }
1256 // @LOCALMOD-END 1255 // @LOCALMOD-END
1257 1256
1258 computeRegisterProperties(); 1257 computeRegisterProperties();
1259 1258
1260 // On Darwin, -Os means optimize for size without hurting performance, 1259 // On Darwin, -Os means optimize for size without hurting performance,
(...skipping 8325 matching lines...) Expand 10 before | Expand all | Expand 10 after
9586 9585
9587 SDValue X86TargetLowering::LowerNaClTpTdbOffset(SDValue Op, 9586 SDValue X86TargetLowering::LowerNaClTpTdbOffset(SDValue Op,
9588 SelectionDAG &DAG) const { 9587 SelectionDAG &DAG) const {
9589 // ssize_t __nacl_tp_tdb_offset (size_t tdb_size) { 9588 // ssize_t __nacl_tp_tdb_offset (size_t tdb_size) {
9590 // return 0; 9589 // return 0;
9591 // } 9590 // }
9592 return DAG.getConstant(0, Op.getValueType().getSimpleVT()); 9591 return DAG.getConstant(0, Op.getValueType().getSimpleVT());
9593 } 9592 }
9594 9593
9595 SDValue 9594 SDValue
9596 X86TargetLowering::LowerNaClThreadStackPadding(SDValue Op,
9597 SelectionDAG &DAG) const {
9598 // size_t __nacl_thread_stack_padding () {
9599 // return reg_size;
9600 // }
9601 return DAG.getConstant(RegInfo->getSlotSize(),
9602 Op.getValueType().getSimpleVT());
9603 }
9604
9605 SDValue
9606 X86TargetLowering::LowerNaClTargetArch(SDValue Op, SelectionDAG &DAG) const { 9595 X86TargetLowering::LowerNaClTargetArch(SDValue Op, SelectionDAG &DAG) const {
9607 // int __nacl_target_arch () { 9596 // int __nacl_target_arch () {
9608 // return (is_64_bit ? 9597 // return (is_64_bit ?
9609 // PnaclTargetArchitectureX86_64 : 9598 // PnaclTargetArchitectureX86_64 :
9610 // PnaclTargetArchitectureX86_32); 9599 // PnaclTargetArchitectureX86_32);
9611 // } 9600 // }
9612 return DAG.getConstant((Subtarget->is64Bit() ? 9601 return DAG.getConstant((Subtarget->is64Bit() ?
9613 PnaclTargetArchitectureX86_64 : 9602 PnaclTargetArchitectureX86_64 :
9614 PnaclTargetArchitectureX86_32), 9603 PnaclTargetArchitectureX86_32),
9615 Op.getValueType().getSimpleVT()); 9604 Op.getValueType().getSimpleVT());
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
11119 case ISD::UMULO: return LowerXALUO(Op, DAG); 11108 case ISD::UMULO: return LowerXALUO(Op, DAG);
11120 case ISD::READCYCLECOUNTER: return LowerREADCYCLECOUNTER(Op, DAG); 11109 case ISD::READCYCLECOUNTER: return LowerREADCYCLECOUNTER(Op, DAG);
11121 case ISD::BITCAST: return LowerBITCAST(Op, DAG); 11110 case ISD::BITCAST: return LowerBITCAST(Op, DAG);
11122 case ISD::ADDC: 11111 case ISD::ADDC:
11123 case ISD::ADDE: 11112 case ISD::ADDE:
11124 case ISD::SUBC: 11113 case ISD::SUBC:
11125 case ISD::SUBE: return LowerADDC_ADDE_SUBC_SUBE(Op, DAG); 11114 case ISD::SUBE: return LowerADDC_ADDE_SUBC_SUBE(Op, DAG);
11126 case ISD::ADD: return LowerADD(Op, DAG); 11115 case ISD::ADD: return LowerADD(Op, DAG);
11127 case ISD::SUB: return LowerSUB(Op, DAG); 11116 case ISD::SUB: return LowerSUB(Op, DAG);
11128 // @LOCALMOD-BEGIN 11117 // @LOCALMOD-BEGIN
11129 case ISD::NACL_THREAD_STACK_PADDING:
11130 return LowerNaClThreadStackPadding(Op, DAG);
11131 case ISD::NACL_TP_ALIGN: return LowerNaClTpAlign(Op, DAG); 11118 case ISD::NACL_TP_ALIGN: return LowerNaClTpAlign(Op, DAG);
11132 case ISD::NACL_TP_TLS_OFFSET: return LowerNaClTpTlsOffset(Op, DAG); 11119 case ISD::NACL_TP_TLS_OFFSET: return LowerNaClTpTlsOffset(Op, DAG);
11133 case ISD::NACL_TP_TDB_OFFSET: return LowerNaClTpTdbOffset(Op, DAG); 11120 case ISD::NACL_TP_TDB_OFFSET: return LowerNaClTpTdbOffset(Op, DAG);
11134 case ISD::NACL_TARGET_ARCH: return LowerNaClTargetArch(Op, DAG); 11121 case ISD::NACL_TARGET_ARCH: return LowerNaClTargetArch(Op, DAG);
11135 // @LOCALMOD-END 11122 // @LOCALMOD-END
11136 } 11123 }
11137 } 11124 }
11138 11125
11139 static void ReplaceATOMIC_LOAD(SDNode *Node, 11126 static void ReplaceATOMIC_LOAD(SDNode *Node,
11140 SmallVectorImpl<SDValue> &Results, 11127 SmallVectorImpl<SDValue> &Results,
(...skipping 5163 matching lines...) Expand 10 before | Expand all | Expand 10 after
16304 else if (VT == MVT::f64 || VT == MVT::i64) 16291 else if (VT == MVT::f64 || VT == MVT::i64)
16305 Res.second = &X86::FR64RegClass; 16292 Res.second = &X86::FR64RegClass;
16306 else if (X86::VR128RegClass.hasType(VT)) 16293 else if (X86::VR128RegClass.hasType(VT))
16307 Res.second = &X86::VR128RegClass; 16294 Res.second = &X86::VR128RegClass;
16308 else if (X86::VR256RegClass.hasType(VT)) 16295 else if (X86::VR256RegClass.hasType(VT))
16309 Res.second = &X86::VR256RegClass; 16296 Res.second = &X86::VR256RegClass;
16310 } 16297 }
16311 16298
16312 return Res; 16299 return Res;
16313 } 16300 }
OLDNEW
« no previous file with comments | « lib/Target/X86/X86ISelLowering.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698