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

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

Issue 1182493007: Revert of MIPS64: Enable shorten-64-to-32 warning. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « src/base/platform/time.cc ('k') | src/compiler/mips64/instruction-selector-mips64.cc » ('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 5296ea82f7af01cb7ff304df99db54fba9017ab9..94e96d429d17047efd00661acf7c5b59565678c3 100644
--- a/src/compiler/mips64/code-generator-mips64.cc
+++ b/src/compiler/mips64/code-generator-mips64.cc
@@ -310,7 +310,7 @@
__ Daddu(at, i.InputRegister(2), offset); \
__ asm_instr(result, MemOperand(at, 0)); \
} else { \
- int offset = static_cast<int>(i.InputOperand(0).immediate()); \
+ auto offset = i.InputOperand(0).immediate(); \
__ Branch(ool->entry(), ls, i.InputRegister(1), Operand(offset)); \
__ asm_instr(result, MemOperand(i.InputRegister(2), offset)); \
} \
@@ -328,7 +328,7 @@
__ Daddu(at, i.InputRegister(2), offset); \
__ asm_instr(result, MemOperand(at, 0)); \
} else { \
- int offset = static_cast<int>(i.InputOperand(0).immediate()); \
+ auto offset = i.InputOperand(0).immediate(); \
__ Branch(ool->entry(), ls, i.InputRegister(1), Operand(offset)); \
__ asm_instr(result, MemOperand(i.InputRegister(2), offset)); \
} \
@@ -346,7 +346,7 @@
__ Daddu(at, i.InputRegister(3), offset); \
__ asm_instr(value, MemOperand(at, 0)); \
} else { \
- int offset = static_cast<int>(i.InputOperand(0).immediate()); \
+ auto offset = i.InputOperand(0).immediate(); \
auto value = i.Input##width##Register(2); \
__ Branch(&done, ls, i.InputRegister(1), Operand(offset)); \
__ asm_instr(value, MemOperand(i.InputRegister(3), offset)); \
@@ -365,7 +365,7 @@
__ Daddu(at, i.InputRegister(3), offset); \
__ asm_instr(value, MemOperand(at, 0)); \
} else { \
- int offset = static_cast<int>(i.InputOperand(0).immediate()); \
+ auto offset = i.InputOperand(0).immediate(); \
auto value = i.InputRegister(2); \
__ Branch(&done, ls, i.InputRegister(1), Operand(offset)); \
__ asm_instr(value, MemOperand(i.InputRegister(3), offset)); \
@@ -559,27 +559,24 @@
if (instr->InputAt(1)->IsRegister()) {
__ sllv(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
} else {
- int64_t imm = i.InputOperand(1).immediate();
- __ sll(i.OutputRegister(), i.InputRegister(0),
- static_cast<uint16_t>(imm));
+ int32_t imm = i.InputOperand(1).immediate();
+ __ sll(i.OutputRegister(), i.InputRegister(0), imm);
}
break;
case kMips64Shr:
if (instr->InputAt(1)->IsRegister()) {
__ srlv(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
} else {
- int64_t imm = i.InputOperand(1).immediate();
- __ srl(i.OutputRegister(), i.InputRegister(0),
- static_cast<uint16_t>(imm));
+ int32_t imm = i.InputOperand(1).immediate();
+ __ srl(i.OutputRegister(), i.InputRegister(0), imm);
}
break;
case kMips64Sar:
if (instr->InputAt(1)->IsRegister()) {
__ srav(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
} else {
- int64_t imm = i.InputOperand(1).immediate();
- __ sra(i.OutputRegister(), i.InputRegister(0),
- static_cast<uint16_t>(imm));
+ int32_t imm = i.InputOperand(1).immediate();
+ __ sra(i.OutputRegister(), i.InputRegister(0), imm);
}
break;
case kMips64Ext:
@@ -594,13 +591,11 @@
if (instr->InputAt(1)->IsRegister()) {
__ dsllv(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
} else {
- int64_t imm = i.InputOperand(1).immediate();
+ int32_t imm = i.InputOperand(1).immediate();
if (imm < 32) {
- __ dsll(i.OutputRegister(), i.InputRegister(0),
- static_cast<uint16_t>(imm));
+ __ dsll(i.OutputRegister(), i.InputRegister(0), imm);
} else {
- __ dsll32(i.OutputRegister(), i.InputRegister(0),
- static_cast<uint16_t>(imm - 32));
+ __ dsll32(i.OutputRegister(), i.InputRegister(0), imm - 32);
}
}
break;
@@ -608,13 +603,11 @@
if (instr->InputAt(1)->IsRegister()) {
__ dsrlv(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
} else {
- int64_t imm = i.InputOperand(1).immediate();
+ int32_t imm = i.InputOperand(1).immediate();
if (imm < 32) {
- __ dsrl(i.OutputRegister(), i.InputRegister(0),
- static_cast<uint16_t>(imm));
+ __ dsrl(i.OutputRegister(), i.InputRegister(0), imm);
} else {
- __ dsrl32(i.OutputRegister(), i.InputRegister(0),
- static_cast<uint16_t>(imm - 32));
+ __ dsrl32(i.OutputRegister(), i.InputRegister(0), imm - 32);
}
}
break;
@@ -622,7 +615,7 @@
if (instr->InputAt(1)->IsRegister()) {
__ dsrav(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
} else {
- int64_t imm = i.InputOperand(1).immediate();
+ int32_t imm = i.InputOperand(1).immediate();
if (imm < 32) {
__ dsra(i.OutputRegister(), i.InputRegister(0), imm);
} else {
@@ -1103,7 +1096,7 @@
Label here;
__ Branch(GetLabel(i.InputRpo(1)), hs, input, Operand(case_count));
- __ BlockTrampolinePoolFor(static_cast<int>(case_count) * 2 + 7);
+ __ BlockTrampolinePoolFor(case_count * 2 + 7);
// Ensure that dd-ed labels use 8 byte aligned addresses.
if ((masm()->pc_offset() & 7) != 0) {
__ nop();
« no previous file with comments | « src/base/platform/time.cc ('k') | src/compiler/mips64/instruction-selector-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698