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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1414483008: Add CMP(register) and CMP(Immediate) to ARM integerated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 years, 1 month 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/IceInstARM32.h ('k') | tests_lit/assembler/arm32/branch-mult-fwd.ll » ('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/IceInstARM32.cpp - ARM32 instruction implementation ----===// 1 //===- subzero/src/IceInstARM32.cpp - ARM32 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 /// \file 10 /// \file
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 } 500 }
501 501
502 if (Src64 == nullptr) { 502 if (Src64 == nullptr) {
503 addSource(Src); 503 addSource(Src);
504 } else { 504 } else {
505 addSource(Src64->getLo()); 505 addSource(Src64->getLo());
506 addSource(Src64->getHi()); 506 addSource(Src64->getHi());
507 } 507 }
508 } 508 }
509 509
510 template <InstARM32::InstKindARM32 K>
511 void InstARM32CmpLike<K>::emitIAS(const Cfg *Func) const {
512 emitUsingTextFixup(Func);
513 }
514
515 template <> void InstARM32Cmp::emitIAS(const Cfg *Func) const {
516 assert(getSrcSize() == 2);
517 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
518 Asm->cmp(getSrc(0), getSrc(1), getPredicate());
519 if (Asm->needsTextFixup())
520 emitUsingTextFixup(Func);
521 }
522
510 InstARM32Vcmp::InstARM32Vcmp(Cfg *Func, Variable *Src0, Variable *Src1, 523 InstARM32Vcmp::InstARM32Vcmp(Cfg *Func, Variable *Src0, Variable *Src1,
511 CondARM32::Cond Predicate) 524 CondARM32::Cond Predicate)
512 : InstARM32Pred(Func, InstARM32::Vcmp, 2, nullptr, Predicate) { 525 : InstARM32Pred(Func, InstARM32::Vcmp, 2, nullptr, Predicate) {
513 addSource(Src0); 526 addSource(Src0);
514 addSource(Src1); 527 addSource(Src1);
515 } 528 }
516 529
517 InstARM32Vmrs::InstARM32Vmrs(Cfg *Func, CondARM32::Cond Predicate) 530 InstARM32Vmrs::InstARM32Vmrs(Cfg *Func, CondARM32::Cond Predicate)
518 : InstARM32Pred(Func, InstARM32::Vmrs, 0, nullptr, Predicate) {} 531 : InstARM32Pred(Func, InstARM32::Vmrs, 0, nullptr, Predicate) {}
519 532
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 1573
1561 template class InstARM32UnaryopGPR<InstARM32::Movw, false>; 1574 template class InstARM32UnaryopGPR<InstARM32::Movw, false>;
1562 template class InstARM32UnaryopGPR<InstARM32::Clz, false>; 1575 template class InstARM32UnaryopGPR<InstARM32::Clz, false>;
1563 template class InstARM32UnaryopGPR<InstARM32::Mvn, false>; 1576 template class InstARM32UnaryopGPR<InstARM32::Mvn, false>;
1564 template class InstARM32UnaryopGPR<InstARM32::Rbit, false>; 1577 template class InstARM32UnaryopGPR<InstARM32::Rbit, false>;
1565 template class InstARM32UnaryopGPR<InstARM32::Rev, false>; 1578 template class InstARM32UnaryopGPR<InstARM32::Rev, false>;
1566 template class InstARM32UnaryopGPR<InstARM32::Sxt, true>; 1579 template class InstARM32UnaryopGPR<InstARM32::Sxt, true>;
1567 template class InstARM32UnaryopGPR<InstARM32::Uxt, true>; 1580 template class InstARM32UnaryopGPR<InstARM32::Uxt, true>;
1568 template class InstARM32UnaryopFP<InstARM32::Vsqrt>; 1581 template class InstARM32UnaryopFP<InstARM32::Vsqrt>;
1569 1582
1583 template class InstARM32CmpLike<InstARM32::Cmp>;
1584 template class InstARM32CmpLike<InstARM32::Tst>;
1585
1570 } // end of namespace Ice 1586 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstARM32.h ('k') | tests_lit/assembler/arm32/branch-mult-fwd.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698