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

Unified Diff: src/compiler/mips64/code-generator-mips64.cc

Issue 2147883002: MIPS64: Implement Mips64And32, Mips64Or32, Mips64Nor32 and Mips64Xor32 operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/mips64/instruction-codes-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/mips64/code-generator-mips64.cc
diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc
index 387b1db04073637151a5c5da09cef559287f849b..e362b18968a0da35ff07cc2c5461df16c4b3fbae 100644
--- a/src/compiler/mips64/code-generator-mips64.cc
+++ b/src/compiler/mips64/code-generator-mips64.cc
@@ -920,9 +920,29 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
case kMips64And:
__ And(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
break;
+ case kMips64And32:
+ if (instr->InputAt(1)->IsRegister()) {
+ __ sll(i.InputRegister(0), i.InputRegister(0), 0x0);
+ __ sll(i.InputRegister(1), i.InputRegister(1), 0x0);
+ __ And(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
+ } else {
+ __ sll(i.InputRegister(0), i.InputRegister(0), 0x0);
+ __ And(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
+ }
+ break;
case kMips64Or:
__ Or(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
break;
+ case kMips64Or32:
+ if (instr->InputAt(1)->IsRegister()) {
+ __ sll(i.InputRegister(0), i.InputRegister(0), 0x0);
+ __ sll(i.InputRegister(1), i.InputRegister(1), 0x0);
+ __ Or(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
+ } else {
+ __ sll(i.InputRegister(0), i.InputRegister(0), 0x0);
+ __ Or(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
+ }
+ break;
case kMips64Nor:
if (instr->InputAt(1)->IsRegister()) {
__ Nor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
@@ -931,9 +951,30 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
__ Nor(i.OutputRegister(), i.InputRegister(0), zero_reg);
}
break;
+ case kMips64Nor32:
+ if (instr->InputAt(1)->IsRegister()) {
+ __ sll(i.InputRegister(0), i.InputRegister(0), 0x0);
+ __ sll(i.InputRegister(1), i.InputRegister(1), 0x0);
+ __ Nor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
+ } else {
+ DCHECK(i.InputOperand(1).immediate() == 0);
+ __ sll(i.InputRegister(0), i.InputRegister(0), 0x0);
+ __ Nor(i.OutputRegister(), i.InputRegister(0), zero_reg);
+ }
+ break;
case kMips64Xor:
__ Xor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
break;
+ case kMips64Xor32:
+ if (instr->InputAt(1)->IsRegister()) {
+ __ sll(i.InputRegister(0), i.InputRegister(0), 0x0);
+ __ sll(i.InputRegister(1), i.InputRegister(1), 0x0);
+ __ Xor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
+ } else {
+ __ sll(i.InputRegister(0), i.InputRegister(0), 0x0);
+ __ Xor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
+ }
+ break;
case kMips64Clz:
__ Clz(i.OutputRegister(), i.InputRegister(0));
break;
« no previous file with comments | « no previous file | src/compiler/mips64/instruction-codes-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698