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

Side by Side Diff: src/IceInstMIPS32.cpp

Issue 1948093002: [Subzero][MIPS32] Implement sext, zext and trunc (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressed review comments Created 4 years, 7 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/IceInstMips32.cpp - Mips32 instruction implementation --===// 1 //===- subzero/src/IceInstMips32.cpp - Mips32 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return "TBD"; 49 return "TBD";
50 } 50 }
51 51
52 template <> const char *InstMIPS32Addiu::Opcode = "addiu"; 52 template <> const char *InstMIPS32Addiu::Opcode = "addiu";
53 template <> const char *InstMIPS32Lui::Opcode = "lui"; 53 template <> const char *InstMIPS32Lui::Opcode = "lui";
54 template <> const char *InstMIPS32La::Opcode = "la"; 54 template <> const char *InstMIPS32La::Opcode = "la";
55 // Three-addr ops 55 // Three-addr ops
56 template <> const char *InstMIPS32Add::Opcode = "add"; 56 template <> const char *InstMIPS32Add::Opcode = "add";
57 template <> const char *InstMIPS32Addu::Opcode = "addu"; 57 template <> const char *InstMIPS32Addu::Opcode = "addu";
58 template <> const char *InstMIPS32And::Opcode = "and"; 58 template <> const char *InstMIPS32And::Opcode = "and";
59 template <> const char *InstMIPS32Andi::Opcode = "andi";
59 template <> const char *InstMIPS32Mfhi::Opcode = "mfhi"; 60 template <> const char *InstMIPS32Mfhi::Opcode = "mfhi";
60 template <> const char *InstMIPS32Mflo::Opcode = "mflo"; 61 template <> const char *InstMIPS32Mflo::Opcode = "mflo";
61 template <> const char *InstMIPS32Mthi::Opcode = "mthi"; 62 template <> const char *InstMIPS32Mthi::Opcode = "mthi";
62 template <> const char *InstMIPS32Mtlo::Opcode = "mtlo"; 63 template <> const char *InstMIPS32Mtlo::Opcode = "mtlo";
63 template <> const char *InstMIPS32Mul::Opcode = "mul"; 64 template <> const char *InstMIPS32Mul::Opcode = "mul";
64 template <> const char *InstMIPS32Mult::Opcode = "mult"; 65 template <> const char *InstMIPS32Mult::Opcode = "mult";
65 template <> const char *InstMIPS32Multu::Opcode = "multu"; 66 template <> const char *InstMIPS32Multu::Opcode = "multu";
66 template <> const char *InstMIPS32Or::Opcode = "or"; 67 template <> const char *InstMIPS32Or::Opcode = "or";
67 template <> const char *InstMIPS32Ori::Opcode = "ori"; 68 template <> const char *InstMIPS32Ori::Opcode = "ori";
69 template <> const char *InstMIPS32Sll::Opcode = "sll";
68 template <> const char *InstMIPS32Slt::Opcode = "slt"; 70 template <> const char *InstMIPS32Slt::Opcode = "slt";
69 template <> const char *InstMIPS32Slti::Opcode = "slti"; 71 template <> const char *InstMIPS32Slti::Opcode = "slti";
70 template <> const char *InstMIPS32Sltiu::Opcode = "sltiu"; 72 template <> const char *InstMIPS32Sltiu::Opcode = "sltiu";
71 template <> const char *InstMIPS32Sltu::Opcode = "sltu"; 73 template <> const char *InstMIPS32Sltu::Opcode = "sltu";
74 template <> const char *InstMIPS32Sra::Opcode = "sra";
72 template <> const char *InstMIPS32Sub::Opcode = "sub"; 75 template <> const char *InstMIPS32Sub::Opcode = "sub";
73 template <> const char *InstMIPS32Subu::Opcode = "subu"; 76 template <> const char *InstMIPS32Subu::Opcode = "subu";
74 template <> const char *InstMIPS32Xor::Opcode = "xor"; 77 template <> const char *InstMIPS32Xor::Opcode = "xor";
75 template <> const char *InstMIPS32Xori::Opcode = "xori"; 78 template <> const char *InstMIPS32Xori::Opcode = "xori";
76 79
77 template <> void InstMIPS32Mflo::emit(const Cfg *Func) const { 80 template <> void InstMIPS32Mflo::emit(const Cfg *Func) const {
78 if (!BuildDefs::dump()) 81 if (!BuildDefs::dump())
79 return; 82 return;
80 emitUnaryopGPRFLoHi(Opcode, this, Func); 83 emitUnaryopGPRFLoHi(Opcode, this, Func);
81 } 84 }
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } 454 }
452 455
453 Str << "\t"; 456 Str << "\t";
454 getDest()->emit(Func); 457 getDest()->emit(Func);
455 Str << ", "; 458 Str << ", ";
456 getSrc(0)->emit(Func); 459 getSrc(0)->emit(Func);
457 } 460 }
458 461
459 } // end of namespace MIPS32 462 } // end of namespace MIPS32
460 } // end of namespace Ice 463 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698