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

Side by Side Diff: src/IceTargetLoweringX86Base.h

Issue 1257643004: Subzero. Buildable, non-functional TargetLoweringX8664. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixes naming bug in IceInstX8632.h Created 5 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
OLDNEW
1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX86Base.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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 332 }
333 void _div(Variable *Dest, Operand *Src0, Operand *Src1) { 333 void _div(Variable *Dest, Operand *Src0, Operand *Src1) {
334 Context.insert(Traits::Insts::Div::create(Func, Dest, Src0, Src1)); 334 Context.insert(Traits::Insts::Div::create(Func, Dest, Src0, Src1));
335 } 335 }
336 void _divps(Variable *Dest, Operand *Src0) { 336 void _divps(Variable *Dest, Operand *Src0) {
337 Context.insert(Traits::Insts::Divps::create(Func, Dest, Src0)); 337 Context.insert(Traits::Insts::Divps::create(Func, Dest, Src0));
338 } 338 }
339 void _divss(Variable *Dest, Operand *Src0) { 339 void _divss(Variable *Dest, Operand *Src0) {
340 Context.insert(Traits::Insts::Divss::create(Func, Dest, Src0)); 340 Context.insert(Traits::Insts::Divss::create(Func, Dest, Src0));
341 } 341 }
342 void _fld(Operand *Src0) { 342 template <typename T = Traits>
343 Context.insert(Traits::Insts::Fld::create(Func, Src0)); 343 typename std::enable_if<T::UsesX87, void>::type _fld(Operand *Src0) {
344 Context.insert(Traits::Insts::template Fld<>::create(Func, Src0));
344 } 345 }
345 void _fstp(Variable *Dest) { 346 // TODO(jpp): when implementing the X8664 calling convention, make sure x8664
346 Context.insert(Traits::Insts::Fstp::create(Func, Dest)); 347 // does not invoke this method, and remove it.
348 template <typename T = Traits>
349 typename std::enable_if<!T::UsesX87, void>::type _fld(Operand *) {
350 llvm::report_fatal_error("fld is not available in x86-64");
351 }
352 template <typename T = Traits>
353 typename std::enable_if<T::UsesX87, void>::type _fstp(Variable *Dest) {
354 Context.insert(Traits::Insts::template Fstp<>::create(Func, Dest));
355 }
356 // TODO(jpp): when implementing the X8664 calling convention, make sure x8664
357 // does not invoke this method, and remove it.
358 template <typename T = Traits>
359 typename std::enable_if<!T::UsesX87, void>::type _fstp(Variable *) {
360 llvm::report_fatal_error("fstp is not available in x86-64");
347 } 361 }
348 void _idiv(Variable *Dest, Operand *Src0, Operand *Src1) { 362 void _idiv(Variable *Dest, Operand *Src0, Operand *Src1) {
349 Context.insert(Traits::Insts::Idiv::create(Func, Dest, Src0, Src1)); 363 Context.insert(Traits::Insts::Idiv::create(Func, Dest, Src0, Src1));
350 } 364 }
351 void _imul(Variable *Dest, Operand *Src0) { 365 void _imul(Variable *Dest, Operand *Src0) {
352 Context.insert(Traits::Insts::Imul::create(Func, Dest, Src0)); 366 Context.insert(Traits::Insts::Imul::create(Func, Dest, Src0));
353 } 367 }
354 void _insertps(Variable *Dest, Operand *Src0, Operand *Src1) { 368 void _insertps(Variable *Dest, Operand *Src0, Operand *Src1) {
355 Context.insert(Traits::Insts::Insertps::create(Func, Dest, Src0, Src1)); 369 Context.insert(Traits::Insts::Insertps::create(Func, Dest, Src0, Src1));
356 } 370 }
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 } 619 }
606 620
607 BoolFolding FoldingInfo; 621 BoolFolding FoldingInfo;
608 }; 622 };
609 } // end of namespace X86Internal 623 } // end of namespace X86Internal
610 } // end of namespace Ice 624 } // end of namespace Ice
611 625
612 #include "IceTargetLoweringX86BaseImpl.h" 626 #include "IceTargetLoweringX86BaseImpl.h"
613 627
614 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H 628 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H
OLDNEW
« src/IceTargetLoweringX8664Traits.h ('K') | « src/IceTargetLoweringX8664Traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698