Commit 3af78c05 authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: HasOnlyAsciiChars can return incorrect results. Fixup usages and rename.

Port r14453 (91869730)

BUG=

Review URL: https://codereview.chromium.org/14455010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent bc50e21b
...@@ -6307,18 +6307,18 @@ void StringAddStub::Generate(MacroAssembler* masm) { ...@@ -6307,18 +6307,18 @@ void StringAddStub::Generate(MacroAssembler* masm) {
__ bind(&non_ascii); __ bind(&non_ascii);
// At least one of the strings is two-byte. Check whether it happens // At least one of the strings is two-byte. Check whether it happens
// to contain only ASCII characters. // to contain only one byte characters.
// t0: first instance type. // t0: first instance type.
// t1: second instance type. // t1: second instance type.
// Branch to if _both_ instances have kAsciiDataHintMask set. // Branch to if _both_ instances have kOneByteDataHintMask set.
__ And(at, t0, Operand(kAsciiDataHintMask)); __ And(at, t0, Operand(kOneByteDataHintMask));
__ and_(at, at, t1); __ and_(at, at, t1);
__ Branch(&ascii_data, ne, at, Operand(zero_reg)); __ Branch(&ascii_data, ne, at, Operand(zero_reg));
__ Xor(t0, t0, Operand(t1)); __ Xor(t0, t0, Operand(t1));
STATIC_ASSERT(kOneByteStringTag != 0 && kAsciiDataHintTag != 0); STATIC_ASSERT(kOneByteStringTag != 0 && kOneByteDataHintTag != 0);
__ And(t0, t0, Operand(kOneByteStringTag | kAsciiDataHintTag)); __ And(t0, t0, Operand(kOneByteStringTag | kOneByteDataHintTag));
__ Branch(&ascii_data, eq, t0, __ Branch(&ascii_data, eq, t0,
Operand(kOneByteStringTag | kAsciiDataHintTag)); Operand(kOneByteStringTag | kOneByteDataHintTag));
// Allocate a two byte cons string. // Allocate a two byte cons string.
__ AllocateTwoByteConsString(v0, t2, t0, t1, &call_runtime); __ AllocateTwoByteConsString(v0, t2, t0, t1, &call_runtime);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment