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

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: git pull 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
« no previous file with comments | « src/IceTargetLoweringX8664Traits.h ('k') | unittest/AssemblerX8632/TestUtil.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 //===- 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 } 335 }
336 void _div(Variable *Dest, Operand *Src0, Operand *Src1) { 336 void _div(Variable *Dest, Operand *Src0, Operand *Src1) {
337 Context.insert(Traits::Insts::Div::create(Func, Dest, Src0, Src1)); 337 Context.insert(Traits::Insts::Div::create(Func, Dest, Src0, Src1));
338 } 338 }
339 void _divps(Variable *Dest, Operand *Src0) { 339 void _divps(Variable *Dest, Operand *Src0) {
340 Context.insert(Traits::Insts::Divps::create(Func, Dest, Src0)); 340 Context.insert(Traits::Insts::Divps::create(Func, Dest, Src0));
341 } 341 }
342 void _divss(Variable *Dest, Operand *Src0) { 342 void _divss(Variable *Dest, Operand *Src0) {
343 Context.insert(Traits::Insts::Divss::create(Func, Dest, Src0)); 343 Context.insert(Traits::Insts::Divss::create(Func, Dest, Src0));
344 } 344 }
345 void _fld(Operand *Src0) { 345 template <typename T = Traits>
346 Context.insert(Traits::Insts::Fld::create(Func, Src0)); 346 typename std::enable_if<T::UsesX87, void>::type _fld(Operand *Src0) {
347 Context.insert(Traits::Insts::template Fld<>::create(Func, Src0));
347 } 348 }
348 void _fstp(Variable *Dest) { 349 // TODO(jpp): when implementing the X8664 calling convention, make sure x8664
349 Context.insert(Traits::Insts::Fstp::create(Func, Dest)); 350 // does not invoke this method, and remove it.
351 template <typename T = Traits>
352 typename std::enable_if<!T::UsesX87, void>::type _fld(Operand *) {
353 llvm::report_fatal_error("fld is not available in x86-64");
354 }
355 template <typename T = Traits>
356 typename std::enable_if<T::UsesX87, void>::type _fstp(Variable *Dest) {
357 Context.insert(Traits::Insts::template Fstp<>::create(Func, Dest));
358 }
359 // TODO(jpp): when implementing the X8664 calling convention, make sure x8664
360 // does not invoke this method, and remove it.
361 template <typename T = Traits>
362 typename std::enable_if<!T::UsesX87, void>::type _fstp(Variable *) {
363 llvm::report_fatal_error("fstp is not available in x86-64");
350 } 364 }
351 void _idiv(Variable *Dest, Operand *Src0, Operand *Src1) { 365 void _idiv(Variable *Dest, Operand *Src0, Operand *Src1) {
352 Context.insert(Traits::Insts::Idiv::create(Func, Dest, Src0, Src1)); 366 Context.insert(Traits::Insts::Idiv::create(Func, Dest, Src0, Src1));
353 } 367 }
354 void _imul(Variable *Dest, Operand *Src0) { 368 void _imul(Variable *Dest, Operand *Src0) {
355 Context.insert(Traits::Insts::Imul::create(Func, Dest, Src0)); 369 Context.insert(Traits::Insts::Imul::create(Func, Dest, Src0));
356 } 370 }
357 void _insertps(Variable *Dest, Operand *Src0, Operand *Src1) { 371 void _insertps(Variable *Dest, Operand *Src0, Operand *Src1) {
358 Context.insert(Traits::Insts::Insertps::create(Func, Dest, Src0, Src1)); 372 Context.insert(Traits::Insts::Insertps::create(Func, Dest, Src0, Src1));
359 } 373 }
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 } 622 }
609 623
610 BoolFolding FoldingInfo; 624 BoolFolding FoldingInfo;
611 }; 625 };
612 } // end of namespace X86Internal 626 } // end of namespace X86Internal
613 } // end of namespace Ice 627 } // end of namespace Ice
614 628
615 #include "IceTargetLoweringX86BaseImpl.h" 629 #include "IceTargetLoweringX86BaseImpl.h"
616 630
617 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H 631 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8664Traits.h ('k') | unittest/AssemblerX8632/TestUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698