From 9c7a753e51a8d31989e3ba056eef39084477e9a3 Mon Sep 17 00:00:00 2001 From: "balazs.kilvady@imgtec.com" Date: Thu, 16 Oct 2014 17:24:15 +0000 Subject: [PATCH] MIPS: Fix clang compilation error. Port r24662 (4722032) BUG= R=dusan.milosavljevic@imgtec.com Review URL: https://codereview.chromium.org/657413003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips64/code-stubs-mips64.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc index d570c5879e..f75792da7b 100644 --- a/src/mips64/code-stubs-mips64.cc +++ b/src/mips64/code-stubs-mips64.cc @@ -2809,14 +2809,16 @@ void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { DCHECK(!a4.is(object_)); // If the receiver is a smi trigger the non-string case. - __ JumpIfSmi(object_, receiver_not_string_); + if (check_mode_ == RECEIVER_IS_UNKNOWN) { + __ JumpIfSmi(object_, receiver_not_string_); - // Fetch the instance type of the receiver into result register. - __ ld(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); - __ lbu(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); - // If the receiver is not a string trigger the non-string case. - __ And(a4, result_, Operand(kIsNotStringMask)); - __ Branch(receiver_not_string_, ne, a4, Operand(zero_reg)); + // Fetch the instance type of the receiver into result register. + __ ld(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); + __ lbu(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); + // If the receiver is not a string trigger the non-string case. + __ And(a4, result_, Operand(kIsNotStringMask)); + __ Branch(receiver_not_string_, ne, a4, Operand(zero_reg)); + } // If the index is non-smi trigger the non-smi case. __ JumpIfNotSmi(index_, &index_not_smi_);