Commit ec9dc278 authored by yangguo@chromium.org's avatar yangguo@chromium.org

MIPS: Remove move ascii data hint for one byte strings

Port r13375 (198859e8)

Original commit message:
This is mostly a rollback of r12966 [Make kAsciiDataHintTag have correct semantics for all both 1 and 2 byte string types.]

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/11969004
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 72878509
......@@ -6684,6 +6684,11 @@ void StringAddStub::Generate(MacroAssembler* masm) {
__ And(at, t0, Operand(kAsciiDataHintMask));
__ and_(at, at, t1);
__ Branch(&ascii_data, ne, at, Operand(zero_reg));
__ Xor(t0, t0, Operand(t1));
STATIC_ASSERT(kOneByteStringTag != 0 && kAsciiDataHintTag != 0);
__ And(t0, t0, Operand(kOneByteStringTag | kAsciiDataHintTag));
__ Branch(&ascii_data, eq, t0,
Operand(kOneByteStringTag | kAsciiDataHintTag));
// Allocate a two byte cons string.
__ AllocateTwoByteConsString(v0, t2, t0, t1, &call_runtime);
......
......@@ -4944,10 +4944,8 @@ void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii(
Register scratch2,
Label* failure) {
int kFlatAsciiStringMask =
kIsNotStringMask | kStringEncodingMask | kAsciiDataHintMask |
kStringRepresentationMask;
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
int kFlatAsciiStringTag = ASCII_STRING_TYPE;
ASSERT_EQ(ASCII_STRING_TYPE, ASCII_STRING_TYPE & kFlatAsciiStringMask);
ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed.
andi(scratch1, first, kFlatAsciiStringMask);
Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag));
......@@ -4960,10 +4958,8 @@ void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type,
Register scratch,
Label* failure) {
int kFlatAsciiStringMask =
kIsNotStringMask | kStringEncodingMask | kAsciiDataHintMask |
kStringRepresentationMask;
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
int kFlatAsciiStringTag = ASCII_STRING_TYPE;
ASSERT_EQ(ASCII_STRING_TYPE, ASCII_STRING_TYPE & kFlatAsciiStringMask);
And(scratch, type, Operand(kFlatAsciiStringMask));
Branch(failure, ne, scratch, Operand(kFlatAsciiStringTag));
}
......
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