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

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

Issue 19514004: In MacroAssembler::JumpIfNotBothSequentialAsciiStrings a custom mask (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update after comments with fixes Created 7 years, 5 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/ia32/full-codegen-ia32.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 3242 matching lines...) Expand 10 before | Expand all | Expand 10 after
3253 add(location, location, Operand(16 * kDoubleSize), LeaveCC, eq); 3253 add(location, location, Operand(16 * kDoubleSize), LeaveCC, eq);
3254 } 3254 }
3255 3255
3256 3256
3257 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( 3257 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii(
3258 Register first, 3258 Register first,
3259 Register second, 3259 Register second,
3260 Register scratch1, 3260 Register scratch1,
3261 Register scratch2, 3261 Register scratch2,
3262 Label* failure) { 3262 Label* failure) {
3263 int kFlatAsciiStringMask = 3263 const int kFlatAsciiStringMask =
3264 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; 3264 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
3265 int kFlatAsciiStringTag = ASCII_STRING_TYPE; 3265 const int kFlatAsciiStringTag =
3266 kStringTag | kOneByteStringTag | kSeqStringTag;
3266 and_(scratch1, first, Operand(kFlatAsciiStringMask)); 3267 and_(scratch1, first, Operand(kFlatAsciiStringMask));
3267 and_(scratch2, second, Operand(kFlatAsciiStringMask)); 3268 and_(scratch2, second, Operand(kFlatAsciiStringMask));
3268 cmp(scratch1, Operand(kFlatAsciiStringTag)); 3269 cmp(scratch1, Operand(kFlatAsciiStringTag));
3269 // Ignore second test if first test failed. 3270 // Ignore second test if first test failed.
3270 cmp(scratch2, Operand(kFlatAsciiStringTag), eq); 3271 cmp(scratch2, Operand(kFlatAsciiStringTag), eq);
3271 b(ne, failure); 3272 b(ne, failure);
3272 } 3273 }
3273 3274
3274 3275
3275 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, 3276 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type,
3276 Register scratch, 3277 Register scratch,
3277 Label* failure) { 3278 Label* failure) {
3278 int kFlatAsciiStringMask = 3279 const int kFlatAsciiStringMask =
3279 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; 3280 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
3280 int kFlatAsciiStringTag = ASCII_STRING_TYPE; 3281 const int kFlatAsciiStringTag =
3282 kStringTag | kOneByteStringTag | kSeqStringTag;
3281 and_(scratch, type, Operand(kFlatAsciiStringMask)); 3283 and_(scratch, type, Operand(kFlatAsciiStringMask));
3282 cmp(scratch, Operand(kFlatAsciiStringTag)); 3284 cmp(scratch, Operand(kFlatAsciiStringTag));
3283 b(ne, failure); 3285 b(ne, failure);
3284 } 3286 }
3285 3287
3286 static const int kRegisterPassedArguments = 4; 3288 static const int kRegisterPassedArguments = 4;
3287 3289
3288 3290
3289 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, 3291 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments,
3290 int num_double_arguments) { 3292 int num_double_arguments) {
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
3831 void CodePatcher::EmitCondition(Condition cond) { 3833 void CodePatcher::EmitCondition(Condition cond) {
3832 Instr instr = Assembler::instr_at(masm_.pc_); 3834 Instr instr = Assembler::instr_at(masm_.pc_);
3833 instr = (instr & ~kCondMask) | cond; 3835 instr = (instr & ~kCondMask) | cond;
3834 masm_.emit(instr); 3836 masm_.emit(instr);
3835 } 3837 }
3836 3838
3837 3839
3838 } } // namespace v8::internal 3840 } } // namespace v8::internal
3839 3841
3840 #endif // V8_TARGET_ARCH_ARM 3842 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698