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

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

Issue 78403002: MIPS: Use SmiTst and TrySmiTag MacroAssembler instructions. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
index 930afcb72abe8787d51955d2ca41235c27bd74ea..147ae7576c52a8666b55abd2135632c05f8e33fc 100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -4843,7 +4843,7 @@ void MacroAssembler::AssertSmi(Register object) {
void MacroAssembler::AssertString(Register object) {
if (emit_debug_code()) {
STATIC_ASSERT(kSmiTag == 0);
- And(t0, object, Operand(kSmiTagMask));
+ SmiTst(object, t0);
Check(ne, kOperandIsASmiAndNotAString, t0, Operand(zero_reg));
push(object);
lw(object, FieldMemOperand(object, HeapObject::kMapOffset));
@@ -4857,7 +4857,7 @@ void MacroAssembler::AssertString(Register object) {
void MacroAssembler::AssertName(Register object) {
if (emit_debug_code()) {
STATIC_ASSERT(kSmiTag == 0);
- And(t0, object, Operand(kSmiTagMask));
+ SmiTst(object, t0);
Check(ne, kOperandIsASmiAndNotAName, t0, Operand(zero_reg));
push(object);
lw(object, FieldMemOperand(object, HeapObject::kMapOffset));
@@ -5057,7 +5057,7 @@ void MacroAssembler::EmitSeqStringSetCharCheck(Register string,
Register scratch,
uint32_t encoding_mask) {
Label is_object;
- And(at, string, Operand(kSmiTagMask));
+ SmiTst(string, at);
ThrowIf(eq, kNonObject, at, Operand(zero_reg));
lw(at, FieldMemOperand(string, HeapObject::kMapOffset));
@@ -5071,9 +5071,7 @@ void MacroAssembler::EmitSeqStringSetCharCheck(Register string,
// string length without using a temp register, it is restored at the end of
// this function.
Label index_tag_ok, index_tag_bad;
- // On ARM TrySmiTag is used here.
- AdduAndCheckForOverflow(index, index, index, scratch);
- BranchOnOverflow(&index_tag_bad, scratch);
+ TrySmiTag(index, scratch, &index_tag_bad);
Branch(&index_tag_ok);
bind(&index_tag_bad);
Throw(kIndexIsTooLarge);
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698