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

Side by Side Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 2432373002: [SubZero] Fix f64 to/from i64 moves (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 2 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
OLDNEW
1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
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 /// \file 10 /// \file
(...skipping 3986 matching lines...) Expand 10 before | Expand all | Expand 10 after
3997 Variable *T = makeReg(Ty); 3997 Variable *T = makeReg(Ty);
3998 _movp(T, Slot); 3998 _movp(T, Slot);
3999 _movp(Instr->getDest(), T); 3999 _movp(Instr->getDest(), T);
4000 } 4000 }
4001 } 4001 }
4002 4002
4003 template <typename TraitsType> 4003 template <typename TraitsType>
4004 void TargetX86Base<TraitsType>::lowerIntrinsicCall( 4004 void TargetX86Base<TraitsType>::lowerIntrinsicCall(
4005 const InstIntrinsicCall *Instr) { 4005 const InstIntrinsicCall *Instr) {
4006 switch (Intrinsics::IntrinsicID ID = Instr->getIntrinsicInfo().ID) { 4006 switch (Intrinsics::IntrinsicID ID = Instr->getIntrinsicInfo().ID) {
4007 default:
4008 llvm::report_fatal_error("Unexpected intrinsic");
4009 return;
4010 case Intrinsics::AtomicCmpxchg: { 4007 case Intrinsics::AtomicCmpxchg: {
4011 if (!Intrinsics::isMemoryOrderValid( 4008 if (!Intrinsics::isMemoryOrderValid(
4012 ID, getConstantMemoryOrder(Instr->getArg(3)), 4009 ID, getConstantMemoryOrder(Instr->getArg(3)),
4013 getConstantMemoryOrder(Instr->getArg(4)))) { 4010 getConstantMemoryOrder(Instr->getArg(4)))) {
4014 Func->setError("Unexpected memory ordering for AtomicCmpxchg"); 4011 Func->setError("Unexpected memory ordering for AtomicCmpxchg");
4015 return; 4012 return;
4016 } 4013 }
4017 Variable *DestPrev = Instr->getDest(); 4014 Variable *DestPrev = Instr->getDest();
4018 Operand *PtrToMem = legalize(Instr->getArg(0)); 4015 Operand *PtrToMem = legalize(Instr->getArg(0));
4019 Operand *Expected = legalize(Instr->getArg(1)); 4016 Operand *Expected = legalize(Instr->getArg(1));
(...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after
6084 _movp(T, Src0RM); 6081 _movp(T, Src0RM);
6085 _punpckl(T, Src0RM); 6082 _punpckl(T, Src0RM);
6086 _movp(Dest, T); 6083 _movp(Dest, T);
6087 return; 6084 return;
6088 } 6085 }
6089 6086
6090 if (Instr->indexesAre(0, 8, 1, 9, 2, 10, 3, 11)) { 6087 if (Instr->indexesAre(0, 8, 1, 9, 2, 10, 3, 11)) {
6091 auto *T = makeReg(DestTy); 6088 auto *T = makeReg(DestTy);
6092 auto *Src0RM = legalize(Src0, Legal_Reg | Legal_Mem); 6089 auto *Src0RM = legalize(Src0, Legal_Reg | Legal_Mem);
6093 auto *Src1RM = legalize(Src1, Legal_Reg | Legal_Mem); 6090 auto *Src1RM = legalize(Src1, Legal_Reg | Legal_Mem);
6091 (void)Src1RM;
6094 _movp(T, Src0RM); 6092 _movp(T, Src0RM);
6095 _punpckl(T, Src0RM); 6093 _punpckl(T, Src0RM);
6096 _movp(Dest, T); 6094 _movp(Dest, T);
6097 return; 6095 return;
6098 } 6096 }
6099 6097
6100 if (Instr->indexesAre(4, 4, 5, 5, 6, 6, 7, 7)) { 6098 if (Instr->indexesAre(4, 4, 5, 5, 6, 6, 7, 7)) {
6101 auto *T = makeReg(DestTy); 6099 auto *T = makeReg(DestTy);
6102 auto *Src0RM = legalize(Src0, Legal_Reg | Legal_Mem); 6100 auto *Src0RM = legalize(Src0, Legal_Reg | Legal_Mem);
6103 _movp(T, Src0RM); 6101 _movp(T, Src0RM);
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
8251 emitGlobal(*Var, SectionSuffix); 8249 emitGlobal(*Var, SectionSuffix);
8252 } 8250 }
8253 } 8251 }
8254 } break; 8252 } break;
8255 } 8253 }
8256 } 8254 }
8257 } // end of namespace X86NAMESPACE 8255 } // end of namespace X86NAMESPACE
8258 } // end of namespace Ice 8256 } // end of namespace Ice
8259 8257
8260 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H 8258 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698