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

Unified Diff: src/mips64/macro-assembler-mips64.cc

Issue 1605093002: MIPS64: Use the Lsa() and Dlsa() macro/r6 instructions in existing code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/mips64/deoptimizer-mips64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/macro-assembler-mips64.cc
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc
index e60ba6a7c92a4f0a270de5de9b38828029803cfd..179378a48a9ed0fd9c5975b3ba6e9ae380bf4a64 100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -503,16 +503,14 @@ void MacroAssembler::GetNumberHash(Register reg0, Register scratch) {
// hash = ~hash + (hash << 15);
// The algorithm uses 32-bit integer values.
nor(scratch, reg0, zero_reg);
- sll(at, reg0, 15);
- addu(reg0, scratch, at);
+ Lsa(reg0, scratch, reg0, 15);
// hash = hash ^ (hash >> 12);
srl(at, reg0, 12);
xor_(reg0, reg0, at);
// hash = hash + (hash << 2);
- sll(at, reg0, 2);
- addu(reg0, reg0, at);
+ Lsa(reg0, reg0, reg0, 2);
// hash = hash ^ (hash >> 4);
srl(at, reg0, 4);
@@ -520,8 +518,7 @@ void MacroAssembler::GetNumberHash(Register reg0, Register scratch) {
// hash = hash * 2057;
sll(scratch, reg0, 11);
- sll(at, reg0, 3);
- addu(reg0, reg0, at);
+ Lsa(reg0, reg0, reg0, 3);
addu(reg0, reg0, scratch);
// hash = hash ^ (hash >> 16);
@@ -581,12 +578,10 @@ void MacroAssembler::LoadFromNumberDictionary(Label* miss,
// Scale the index by multiplying by the element size.
DCHECK(SeededNumberDictionary::kEntrySize == 3);
- dsll(at, reg2, 1); // 2x.
- daddu(reg2, reg2, at); // reg2 = reg2 * 3.
+ Dlsa(reg2, reg2, reg2, 1); // reg2 = reg2 * 3.
// Check if the key is identical to the name.
- dsll(at, reg2, kPointerSizeLog2);
- daddu(reg2, elements, at);
+ Dlsa(reg2, elements, reg2, kPointerSizeLog2);
ld(at, FieldMemOperand(reg2, SeededNumberDictionary::kElementsStartOffset));
if (i != kNumberDictionaryProbes - 1) {
@@ -3839,8 +3834,7 @@ void MacroAssembler::Allocate(Register object_size, Register result,
// to calculate the new top. Object size may be in words so a shift is
// required to get the number of bytes.
if ((flags & SIZE_IN_WORDS) != 0) {
- dsll(result_end, object_size, kPointerSizeLog2);
- Daddu(result_end, result, result_end);
+ Dlsa(result_end, result, object_size, kPointerSizeLog2);
} else {
Daddu(result_end, result, Operand(object_size));
}
@@ -5596,8 +5590,7 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, Register argument_count,
if (argument_count_is_length) {
daddu(sp, sp, argument_count);
} else {
- dsll(t8, argument_count, kPointerSizeLog2);
- daddu(sp, sp, t8);
+ Dlsa(sp, sp, argument_count, kPointerSizeLog2, t8);
}
}
@@ -6185,8 +6178,7 @@ void MacroAssembler::GetMarkBits(Register addr_reg,
Ext(mask_reg, addr_reg, kPointerSizeLog2, Bitmap::kBitsPerCellLog2);
const int kLowBits = kPointerSizeLog2 + Bitmap::kBitsPerCellLog2;
Ext(t8, addr_reg, kLowBits, kPageSizeBits - kLowBits);
- dsll(t8, t8, Bitmap::kBytesPerCellLog2);
- Daddu(bitmap_reg, bitmap_reg, t8);
+ Dlsa(bitmap_reg, bitmap_reg, t8, Bitmap::kBytesPerCellLog2);
li(t8, Operand(1));
dsllv(mask_reg, t8, mask_reg);
}
« no previous file with comments | « src/mips64/deoptimizer-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698