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

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 11316091: MIPS: Make kAsciiDataHintTag have correct semantics for all both 1 and 2 byte string types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | 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 4878 matching lines...) Expand 10 before | Expand all | Expand 10 after
4889 } 4889 }
4890 4890
4891 4891
4892 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( 4892 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii(
4893 Register first, 4893 Register first,
4894 Register second, 4894 Register second,
4895 Register scratch1, 4895 Register scratch1,
4896 Register scratch2, 4896 Register scratch2,
4897 Label* failure) { 4897 Label* failure) {
4898 int kFlatAsciiStringMask = 4898 int kFlatAsciiStringMask =
4899 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; 4899 kIsNotStringMask | kStringEncodingMask | kAsciiDataHintMask |
4900 kStringRepresentationMask;
4900 int kFlatAsciiStringTag = ASCII_STRING_TYPE; 4901 int kFlatAsciiStringTag = ASCII_STRING_TYPE;
4902 ASSERT_EQ(ASCII_STRING_TYPE, ASCII_STRING_TYPE & kFlatAsciiStringMask);
4901 ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed. 4903 ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed.
4902 andi(scratch1, first, kFlatAsciiStringMask); 4904 andi(scratch1, first, kFlatAsciiStringMask);
4903 Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag)); 4905 Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag));
4904 andi(scratch2, second, kFlatAsciiStringMask); 4906 andi(scratch2, second, kFlatAsciiStringMask);
4905 Branch(failure, ne, scratch2, Operand(kFlatAsciiStringTag)); 4907 Branch(failure, ne, scratch2, Operand(kFlatAsciiStringTag));
4906 } 4908 }
4907 4909
4908 4910
4909 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, 4911 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type,
4910 Register scratch, 4912 Register scratch,
4911 Label* failure) { 4913 Label* failure) {
4912 int kFlatAsciiStringMask = 4914 int kFlatAsciiStringMask =
4913 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; 4915 kIsNotStringMask | kStringEncodingMask | kAsciiDataHintMask |
4916 kStringRepresentationMask;
4914 int kFlatAsciiStringTag = ASCII_STRING_TYPE; 4917 int kFlatAsciiStringTag = ASCII_STRING_TYPE;
4918 ASSERT_EQ(ASCII_STRING_TYPE, ASCII_STRING_TYPE & kFlatAsciiStringMask);
4915 And(scratch, type, Operand(kFlatAsciiStringMask)); 4919 And(scratch, type, Operand(kFlatAsciiStringMask));
4916 Branch(failure, ne, scratch, Operand(kFlatAsciiStringTag)); 4920 Branch(failure, ne, scratch, Operand(kFlatAsciiStringTag));
4917 } 4921 }
4918 4922
4919 4923
4920 static const int kRegisterPassedArguments = 4; 4924 static const int kRegisterPassedArguments = 4;
4921 4925
4922 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, 4926 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments,
4923 int num_double_arguments) { 4927 int num_double_arguments) {
4924 int stack_passed_words = 0; 4928 int stack_passed_words = 0;
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
5458 opcode == BGTZL); 5462 opcode == BGTZL);
5459 opcode = (cond == eq) ? BEQ : BNE; 5463 opcode = (cond == eq) ? BEQ : BNE;
5460 instr = (instr & ~kOpcodeMask) | opcode; 5464 instr = (instr & ~kOpcodeMask) | opcode;
5461 masm_.emit(instr); 5465 masm_.emit(instr);
5462 } 5466 }
5463 5467
5464 5468
5465 } } // namespace v8::internal 5469 } } // namespace v8::internal
5466 5470
5467 #endif // V8_TARGET_ARCH_MIPS 5471 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698