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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 11969004: MIPS: Remove move ascii data hint for one byte strings (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6666 matching lines...) Expand 10 before | Expand all | Expand 10 after
6677 6677
6678 __ bind(&non_ascii); 6678 __ bind(&non_ascii);
6679 // At least one of the strings is two-byte. Check whether it happens 6679 // At least one of the strings is two-byte. Check whether it happens
6680 // to contain only ASCII characters. 6680 // to contain only ASCII characters.
6681 // t0: first instance type. 6681 // t0: first instance type.
6682 // t1: second instance type. 6682 // t1: second instance type.
6683 // Branch to if _both_ instances have kAsciiDataHintMask set. 6683 // Branch to if _both_ instances have kAsciiDataHintMask set.
6684 __ And(at, t0, Operand(kAsciiDataHintMask)); 6684 __ And(at, t0, Operand(kAsciiDataHintMask));
6685 __ and_(at, at, t1); 6685 __ and_(at, at, t1);
6686 __ Branch(&ascii_data, ne, at, Operand(zero_reg)); 6686 __ Branch(&ascii_data, ne, at, Operand(zero_reg));
6687 __ Xor(t0, t0, Operand(t1));
6688 STATIC_ASSERT(kOneByteStringTag != 0 && kAsciiDataHintTag != 0);
6689 __ And(t0, t0, Operand(kOneByteStringTag | kAsciiDataHintTag));
6690 __ Branch(&ascii_data, eq, t0,
6691 Operand(kOneByteStringTag | kAsciiDataHintTag));
6687 6692
6688 // Allocate a two byte cons string. 6693 // Allocate a two byte cons string.
6689 __ AllocateTwoByteConsString(v0, t2, t0, t1, &call_runtime); 6694 __ AllocateTwoByteConsString(v0, t2, t0, t1, &call_runtime);
6690 __ Branch(&allocated); 6695 __ Branch(&allocated);
6691 6696
6692 // We cannot encounter sliced strings or cons strings here since: 6697 // We cannot encounter sliced strings or cons strings here since:
6693 STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength); 6698 STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength);
6694 // Handle creating a flat result from either external or sequential strings. 6699 // Handle creating a flat result from either external or sequential strings.
6695 // Locate the first characters' locations. 6700 // Locate the first characters' locations.
6696 // a0: first string 6701 // a0: first string
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
7869 __ Pop(ra, t1, a1); 7874 __ Pop(ra, t1, a1);
7870 __ Ret(); 7875 __ Ret();
7871 } 7876 }
7872 7877
7873 7878
7874 #undef __ 7879 #undef __
7875 7880
7876 } } // namespace v8::internal 7881 } } // namespace v8::internal
7877 7882
7878 #endif // V8_TARGET_ARCH_MIPS 7883 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698