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

Side by Side Diff: src/mips/macro-assembler-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 | « 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 4926 matching lines...) Expand 10 before | Expand all | Expand 10 after
4937 } 4937 }
4938 4938
4939 4939
4940 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( 4940 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii(
4941 Register first, 4941 Register first,
4942 Register second, 4942 Register second,
4943 Register scratch1, 4943 Register scratch1,
4944 Register scratch2, 4944 Register scratch2,
4945 Label* failure) { 4945 Label* failure) {
4946 int kFlatAsciiStringMask = 4946 int kFlatAsciiStringMask =
4947 kIsNotStringMask | kStringEncodingMask | kAsciiDataHintMask | 4947 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
4948 kStringRepresentationMask;
4949 int kFlatAsciiStringTag = ASCII_STRING_TYPE; 4948 int kFlatAsciiStringTag = ASCII_STRING_TYPE;
4950 ASSERT_EQ(ASCII_STRING_TYPE, ASCII_STRING_TYPE & kFlatAsciiStringMask);
4951 ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed. 4949 ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed.
4952 andi(scratch1, first, kFlatAsciiStringMask); 4950 andi(scratch1, first, kFlatAsciiStringMask);
4953 Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag)); 4951 Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag));
4954 andi(scratch2, second, kFlatAsciiStringMask); 4952 andi(scratch2, second, kFlatAsciiStringMask);
4955 Branch(failure, ne, scratch2, Operand(kFlatAsciiStringTag)); 4953 Branch(failure, ne, scratch2, Operand(kFlatAsciiStringTag));
4956 } 4954 }
4957 4955
4958 4956
4959 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, 4957 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type,
4960 Register scratch, 4958 Register scratch,
4961 Label* failure) { 4959 Label* failure) {
4962 int kFlatAsciiStringMask = 4960 int kFlatAsciiStringMask =
4963 kIsNotStringMask | kStringEncodingMask | kAsciiDataHintMask | 4961 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
4964 kStringRepresentationMask;
4965 int kFlatAsciiStringTag = ASCII_STRING_TYPE; 4962 int kFlatAsciiStringTag = ASCII_STRING_TYPE;
4966 ASSERT_EQ(ASCII_STRING_TYPE, ASCII_STRING_TYPE & kFlatAsciiStringMask);
4967 And(scratch, type, Operand(kFlatAsciiStringMask)); 4963 And(scratch, type, Operand(kFlatAsciiStringMask));
4968 Branch(failure, ne, scratch, Operand(kFlatAsciiStringTag)); 4964 Branch(failure, ne, scratch, Operand(kFlatAsciiStringTag));
4969 } 4965 }
4970 4966
4971 4967
4972 static const int kRegisterPassedArguments = 4; 4968 static const int kRegisterPassedArguments = 4;
4973 4969
4974 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, 4970 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments,
4975 int num_double_arguments) { 4971 int num_double_arguments) {
4976 int stack_passed_words = 0; 4972 int stack_passed_words = 0;
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
5531 opcode == BGTZL); 5527 opcode == BGTZL);
5532 opcode = (cond == eq) ? BEQ : BNE; 5528 opcode = (cond == eq) ? BEQ : BNE;
5533 instr = (instr & ~kOpcodeMask) | opcode; 5529 instr = (instr & ~kOpcodeMask) | opcode;
5534 masm_.emit(instr); 5530 masm_.emit(instr);
5535 } 5531 }
5536 5532
5537 5533
5538 } } // namespace v8::internal 5534 } } // namespace v8::internal
5539 5535
5540 #endif // V8_TARGET_ARCH_MIPS 5536 #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