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

Side by Side Diff: lib/Target/ARM/ARMISelLowering.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/ARM/ARMISelLowering.h ('k') | lib/Target/Mips/MipsISelLowering.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 //===-- 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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 } 814 }
815 // Special handling for half-precision FP. 815 // Special handling for half-precision FP.
816 if (!Subtarget->hasFP16()) { 816 if (!Subtarget->hasFP16()) {
817 setOperationAction(ISD::FP16_TO_FP32, MVT::f32, Expand); 817 setOperationAction(ISD::FP16_TO_FP32, MVT::f32, Expand);
818 setOperationAction(ISD::FP32_TO_FP16, MVT::i32, Expand); 818 setOperationAction(ISD::FP32_TO_FP16, MVT::i32, Expand);
819 } 819 }
820 } 820 }
821 821
822 // @LOCALMOD-BEGIN 822 // @LOCALMOD-BEGIN
823 if (Subtarget->isTargetNaCl()) { 823 if (Subtarget->isTargetNaCl()) {
824 setOperationAction(ISD::NACL_THREAD_STACK_PADDING, MVT::i32, Custom);
825 setOperationAction(ISD::NACL_TP_ALIGN, MVT::i32, Custom); 824 setOperationAction(ISD::NACL_TP_ALIGN, MVT::i32, Custom);
826 setOperationAction(ISD::NACL_TP_TLS_OFFSET, MVT::i32, Custom); 825 setOperationAction(ISD::NACL_TP_TLS_OFFSET, MVT::i32, Custom);
827 setOperationAction(ISD::NACL_TP_TDB_OFFSET, MVT::i32, Custom); 826 setOperationAction(ISD::NACL_TP_TDB_OFFSET, MVT::i32, Custom);
828 setOperationAction(ISD::NACL_TARGET_ARCH, MVT::i32, Custom); 827 setOperationAction(ISD::NACL_TARGET_ARCH, MVT::i32, Custom);
829 } 828 }
830 // @LOCALMOD-END 829 // @LOCALMOD-END
831 830
832 // We have target-specific dag combine patterns for the following nodes: 831 // We have target-specific dag combine patterns for the following nodes:
833 // ARMISD::VMOVRRD - No need to call setTargetDAGCombine 832 // ARMISD::VMOVRRD - No need to call setTargetDAGCombine
834 setTargetDAGCombine(ISD::ADD); 833 setTargetDAGCombine(ISD::ADD);
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 // ssize_t __nacl_tp_tdb_offset (size_t tdb_size) { 2182 // ssize_t __nacl_tp_tdb_offset (size_t tdb_size) {
2184 // return -tdb_size; 2183 // return -tdb_size;
2185 // } 2184 // }
2186 DebugLoc dl = Op.getDebugLoc(); 2185 DebugLoc dl = Op.getDebugLoc();
2187 return DAG.getNode(ISD::SUB, dl, Op.getValueType().getSimpleVT(), 2186 return DAG.getNode(ISD::SUB, dl, Op.getValueType().getSimpleVT(),
2188 DAG.getConstant(0, Op.getValueType().getSimpleVT()), 2187 DAG.getConstant(0, Op.getValueType().getSimpleVT()),
2189 Op.getOperand(0)); 2188 Op.getOperand(0));
2190 } 2189 }
2191 2190
2192 SDValue 2191 SDValue
2193 ARMTargetLowering::LowerNaClThreadStackPadding(SDValue Op,
2194 SelectionDAG &DAG) const {
2195 // size_t __nacl_thread_stack_padding () {
2196 // return 0;
2197 // }
2198 return DAG.getConstant(0, Op.getValueType().getSimpleVT());
2199 }
2200
2201 SDValue
2202 ARMTargetLowering::LowerNaClTargetArch(SDValue Op, SelectionDAG &DAG) const { 2192 ARMTargetLowering::LowerNaClTargetArch(SDValue Op, SelectionDAG &DAG) const {
2203 // size_t __nacl_target_arch () { 2193 // size_t __nacl_target_arch () {
2204 // return PnaclTargetArchitectureARM_32; 2194 // return PnaclTargetArchitectureARM_32;
2205 // } 2195 // }
2206 return DAG.getConstant(PnaclTargetArchitectureARM_32, 2196 return DAG.getConstant(PnaclTargetArchitectureARM_32,
2207 Op.getValueType().getSimpleVT()); 2197 Op.getValueType().getSimpleVT());
2208 } 2198 }
2209 2199
2210 ////////////////////////////////////////////////////////////////////// 2200 //////////////////////////////////////////////////////////////////////
2211 2201
(...skipping 3286 matching lines...) Expand 10 before | Expand all | Expand 10 after
5498 case ISD::MUL: return LowerMUL(Op, DAG); 5488 case ISD::MUL: return LowerMUL(Op, DAG);
5499 case ISD::SDIV: return LowerSDIV(Op, DAG); 5489 case ISD::SDIV: return LowerSDIV(Op, DAG);
5500 case ISD::UDIV: return LowerUDIV(Op, DAG); 5490 case ISD::UDIV: return LowerUDIV(Op, DAG);
5501 case ISD::ADDC: 5491 case ISD::ADDC:
5502 case ISD::ADDE: 5492 case ISD::ADDE:
5503 case ISD::SUBC: 5493 case ISD::SUBC:
5504 case ISD::SUBE: return LowerADDC_ADDE_SUBC_SUBE(Op, DAG); 5494 case ISD::SUBE: return LowerADDC_ADDE_SUBC_SUBE(Op, DAG);
5505 case ISD::ATOMIC_LOAD: 5495 case ISD::ATOMIC_LOAD:
5506 case ISD::ATOMIC_STORE: return LowerAtomicLoadStore(Op, DAG); 5496 case ISD::ATOMIC_STORE: return LowerAtomicLoadStore(Op, DAG);
5507 // @LOCALMOD-BEGIN 5497 // @LOCALMOD-BEGIN
5508 case ISD::NACL_THREAD_STACK_PADDING:
5509 return LowerNaClThreadStackPadding(Op, DAG);
5510 case ISD::NACL_TP_ALIGN: return LowerNaClTpAlign(Op, DAG); 5498 case ISD::NACL_TP_ALIGN: return LowerNaClTpAlign(Op, DAG);
5511 case ISD::NACL_TP_TLS_OFFSET: return LowerNaClTpTlsOffset(Op, DAG); 5499 case ISD::NACL_TP_TLS_OFFSET: return LowerNaClTpTlsOffset(Op, DAG);
5512 case ISD::NACL_TP_TDB_OFFSET: return LowerNaClTpTdbOffset(Op, DAG); 5500 case ISD::NACL_TP_TDB_OFFSET: return LowerNaClTpTdbOffset(Op, DAG);
5513 case ISD::NACL_TARGET_ARCH: return LowerNaClTargetArch(Op, DAG); 5501 case ISD::NACL_TARGET_ARCH: return LowerNaClTargetArch(Op, DAG);
5514 // @LOCALMOD-END 5502 // @LOCALMOD-END
5515 } 5503 }
5516 } 5504 }
5517 5505
5518 /// ReplaceNodeResults - Replace the results of node with an illegal result 5506 /// ReplaceNodeResults - Replace the results of node with an illegal result
5519 /// type with new values built out of custom code. 5507 /// type with new values built out of custom code.
(...skipping 4469 matching lines...) Expand 10 before | Expand all | Expand 10 after
9989 Info.readMem = true; 9977 Info.readMem = true;
9990 Info.writeMem = false; 9978 Info.writeMem = false;
9991 return true; 9979 return true;
9992 } 9980 }
9993 default: 9981 default:
9994 break; 9982 break;
9995 } 9983 }
9996 9984
9997 return false; 9985 return false;
9998 } 9986 }
OLDNEW
« no previous file with comments | « lib/Target/ARM/ARMISelLowering.h ('k') | lib/Target/Mips/MipsISelLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698