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

Side by Side Diff: src/IceInstX8632.cpp

Issue 547033002: Subzero: Be more strict about i1 calculations. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Revert unnecessary changes Created 6 years, 3 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/IceGlobalContext.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('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/IceInstX8632.cpp - X86-32 instruction implementation ---===// 1 //===- subzero/src/IceInstX8632.cpp - X86-32 instruction implementation ---===//
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 // This file implements the InstX8632 and OperandX8632 classes, 10 // This file implements the InstX8632 and OperandX8632 classes,
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 586
587 template <> void InstX8632Pblendvb::emit(const Cfg *Func) const { 587 template <> void InstX8632Pblendvb::emit(const Cfg *Func) const {
588 assert(static_cast<TargetX8632 *>(Func->getTarget())->getInstructionSet() >= 588 assert(static_cast<TargetX8632 *>(Func->getTarget())->getInstructionSet() >=
589 TargetX8632::SSE4_1); 589 TargetX8632::SSE4_1);
590 emitVariableBlendInst(Opcode, this, Func); 590 emitVariableBlendInst(Opcode, this, Func);
591 } 591 }
592 592
593 template <> void InstX8632Imul::emit(const Cfg *Func) const { 593 template <> void InstX8632Imul::emit(const Cfg *Func) const {
594 Ostream &Str = Func->getContext()->getStrEmit(); 594 Ostream &Str = Func->getContext()->getStrEmit();
595 assert(getSrcSize() == 2); 595 assert(getSrcSize() == 2);
596 if (getDest()->getType() == IceType_i8) { 596 if (getDest()->getType() == IceType_i1 ||
jvoung (off chromium) 2014/09/05 23:07:15 I don't think arithmetic is allowed on i1, only an
Jim Stichnoth 2014/09/05 23:46:48 Interesting, I didn't realize we were simplifying
597 getDest()->getType() == IceType_i8) {
597 // The 8-bit version of imul only allows the form "imul r/m8". 598 // The 8-bit version of imul only allows the form "imul r/m8".
598 Variable *Src0 = llvm::dyn_cast<Variable>(getSrc(0)); 599 Variable *Src0 = llvm::dyn_cast<Variable>(getSrc(0));
599 (void)Src0; 600 (void)Src0;
600 assert(Src0 && Src0->getRegNum() == TargetX8632::Reg_eax); 601 assert(Src0 && Src0->getRegNum() == TargetX8632::Reg_eax);
601 Str << "\timul\t"; 602 Str << "\timul\t";
602 getSrc(1)->emit(Func); 603 getSrc(1)->emit(Func);
603 Str << "\n"; 604 Str << "\n";
604 } else if (llvm::isa<Constant>(getSrc(1))) { 605 } else if (llvm::isa<Constant>(getSrc(1))) {
605 Str << "\timul\t"; 606 Str << "\timul\t";
606 getDest()->emit(Func); 607 getDest()->emit(Func);
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 default: 1474 default:
1474 Str << "???"; 1475 Str << "???";
1475 break; 1476 break;
1476 } 1477 }
1477 Str << "("; 1478 Str << "(";
1478 Var->dump(Func); 1479 Var->dump(Func);
1479 Str << ")"; 1480 Str << ")";
1480 } 1481 }
1481 1482
1482 } // end of namespace Ice 1483 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698