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

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

Issue 139973004: A64: Synchronize with r15814. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.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 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after
3086 JumpIfNonSmisNotBothSequentialAsciiStrings(first, 3086 JumpIfNonSmisNotBothSequentialAsciiStrings(first,
3087 second, 3087 second,
3088 scratch1, 3088 scratch1,
3089 scratch2, 3089 scratch2,
3090 failure); 3090 failure);
3091 } 3091 }
3092 3092
3093 3093
3094 void MacroAssembler::JumpIfNotUniqueName(Register reg, 3094 void MacroAssembler::JumpIfNotUniqueName(Register reg,
3095 Label* not_unique_name) { 3095 Label* not_unique_name) {
3096 STATIC_ASSERT(((SYMBOL_TYPE - 1) & kIsInternalizedMask) == kInternalizedTag); 3096 STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0);
3097 cmp(reg, Operand(kInternalizedTag)); 3097 Label succeed;
3098 b(lt, not_unique_name); 3098 tst(reg, Operand(kIsNotStringMask | kIsNotInternalizedMask));
3099 b(eq, &succeed);
3099 cmp(reg, Operand(SYMBOL_TYPE)); 3100 cmp(reg, Operand(SYMBOL_TYPE));
3100 b(gt, not_unique_name); 3101 b(ne, not_unique_name);
3102
3103 bind(&succeed);
3101 } 3104 }
3102 3105
3103 3106
3104 // Allocates a heap number or jumps to the need_gc label if the young space 3107 // Allocates a heap number or jumps to the need_gc label if the young space
3105 // is full and a scavenge is needed. 3108 // is full and a scavenge is needed.
3106 void MacroAssembler::AllocateHeapNumber(Register result, 3109 void MacroAssembler::AllocateHeapNumber(Register result,
3107 Register scratch1, 3110 Register scratch1,
3108 Register scratch2, 3111 Register scratch2,
3109 Register heap_number_map, 3112 Register heap_number_map,
3110 Label* gc_required, 3113 Label* gc_required,
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
3250 add(location, location, Operand(16 * kDoubleSize), LeaveCC, eq); 3253 add(location, location, Operand(16 * kDoubleSize), LeaveCC, eq);
3251 } 3254 }
3252 3255
3253 3256
3254 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( 3257 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii(
3255 Register first, 3258 Register first,
3256 Register second, 3259 Register second,
3257 Register scratch1, 3260 Register scratch1,
3258 Register scratch2, 3261 Register scratch2,
3259 Label* failure) { 3262 Label* failure) {
3260 int kFlatAsciiStringMask = 3263 const int kFlatAsciiStringMask =
3261 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; 3264 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
3262 int kFlatAsciiStringTag = ASCII_STRING_TYPE; 3265 const int kFlatAsciiStringTag =
3266 kStringTag | kOneByteStringTag | kSeqStringTag;
3263 and_(scratch1, first, Operand(kFlatAsciiStringMask)); 3267 and_(scratch1, first, Operand(kFlatAsciiStringMask));
3264 and_(scratch2, second, Operand(kFlatAsciiStringMask)); 3268 and_(scratch2, second, Operand(kFlatAsciiStringMask));
3265 cmp(scratch1, Operand(kFlatAsciiStringTag)); 3269 cmp(scratch1, Operand(kFlatAsciiStringTag));
3266 // Ignore second test if first test failed. 3270 // Ignore second test if first test failed.
3267 cmp(scratch2, Operand(kFlatAsciiStringTag), eq); 3271 cmp(scratch2, Operand(kFlatAsciiStringTag), eq);
3268 b(ne, failure); 3272 b(ne, failure);
3269 } 3273 }
3270 3274
3271 3275
3272 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, 3276 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type,
3273 Register scratch, 3277 Register scratch,
3274 Label* failure) { 3278 Label* failure) {
3275 int kFlatAsciiStringMask = 3279 const int kFlatAsciiStringMask =
3276 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; 3280 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
3277 int kFlatAsciiStringTag = ASCII_STRING_TYPE; 3281 const int kFlatAsciiStringTag =
3282 kStringTag | kOneByteStringTag | kSeqStringTag;
3278 and_(scratch, type, Operand(kFlatAsciiStringMask)); 3283 and_(scratch, type, Operand(kFlatAsciiStringMask));
3279 cmp(scratch, Operand(kFlatAsciiStringTag)); 3284 cmp(scratch, Operand(kFlatAsciiStringTag));
3280 b(ne, failure); 3285 b(ne, failure);
3281 } 3286 }
3282 3287
3283 static const int kRegisterPassedArguments = 4; 3288 static const int kRegisterPassedArguments = 4;
3284 3289
3285 3290
3286 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, 3291 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments,
3287 int num_double_arguments) { 3292 int num_double_arguments) {
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
3740 ldr(r2, FieldMemOperand(r2, JSObject::kElementsOffset)); 3745 ldr(r2, FieldMemOperand(r2, JSObject::kElementsOffset));
3741 cmp(r2, empty_fixed_array_value); 3746 cmp(r2, empty_fixed_array_value);
3742 b(ne, call_runtime); 3747 b(ne, call_runtime);
3743 3748
3744 ldr(r2, FieldMemOperand(r1, Map::kPrototypeOffset)); 3749 ldr(r2, FieldMemOperand(r1, Map::kPrototypeOffset));
3745 cmp(r2, null_value); 3750 cmp(r2, null_value);
3746 b(ne, &next); 3751 b(ne, &next);
3747 } 3752 }
3748 3753
3749 3754
3750 void MacroAssembler::TestJSArrayForAllocationSiteInfo( 3755 void MacroAssembler::TestJSArrayForAllocationMemento(
3751 Register receiver_reg, 3756 Register receiver_reg,
3752 Register scratch_reg) { 3757 Register scratch_reg) {
3753 Label no_info_available; 3758 Label no_memento_available;
3754 ExternalReference new_space_start = 3759 ExternalReference new_space_start =
3755 ExternalReference::new_space_start(isolate()); 3760 ExternalReference::new_space_start(isolate());
3756 ExternalReference new_space_allocation_top = 3761 ExternalReference new_space_allocation_top =
3757 ExternalReference::new_space_allocation_top_address(isolate()); 3762 ExternalReference::new_space_allocation_top_address(isolate());
3758 add(scratch_reg, receiver_reg, 3763 add(scratch_reg, receiver_reg,
3759 Operand(JSArray::kSize + AllocationSiteInfo::kSize - kHeapObjectTag)); 3764 Operand(JSArray::kSize + AllocationMemento::kSize - kHeapObjectTag));
3760 cmp(scratch_reg, Operand(new_space_start)); 3765 cmp(scratch_reg, Operand(new_space_start));
3761 b(lt, &no_info_available); 3766 b(lt, &no_memento_available);
3762 mov(ip, Operand(new_space_allocation_top)); 3767 mov(ip, Operand(new_space_allocation_top));
3763 ldr(ip, MemOperand(ip)); 3768 ldr(ip, MemOperand(ip));
3764 cmp(scratch_reg, ip); 3769 cmp(scratch_reg, ip);
3765 b(gt, &no_info_available); 3770 b(gt, &no_memento_available);
3766 ldr(scratch_reg, MemOperand(scratch_reg, -AllocationSiteInfo::kSize)); 3771 ldr(scratch_reg, MemOperand(scratch_reg, -AllocationMemento::kSize));
3767 cmp(scratch_reg, 3772 cmp(scratch_reg,
3768 Operand(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); 3773 Operand(Handle<Map>(isolate()->heap()->allocation_memento_map())));
3769 bind(&no_info_available); 3774 bind(&no_memento_available);
3770 } 3775 }
3771 3776
3772 3777
3773 #ifdef DEBUG 3778 #ifdef DEBUG
3774 bool AreAliased(Register reg1, 3779 bool AreAliased(Register reg1,
3775 Register reg2, 3780 Register reg2,
3776 Register reg3, 3781 Register reg3,
3777 Register reg4, 3782 Register reg4,
3778 Register reg5, 3783 Register reg5,
3779 Register reg6) { 3784 Register reg6) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3828 void CodePatcher::EmitCondition(Condition cond) { 3833 void CodePatcher::EmitCondition(Condition cond) {
3829 Instr instr = Assembler::instr_at(masm_.pc_); 3834 Instr instr = Assembler::instr_at(masm_.pc_);
3830 instr = (instr & ~kCondMask) | cond; 3835 instr = (instr & ~kCondMask) | cond;
3831 masm_.emit(instr); 3836 masm_.emit(instr);
3832 } 3837 }
3833 3838
3834 3839
3835 } } // namespace v8::internal 3840 } } // namespace v8::internal
3836 3841
3837 #endif // V8_TARGET_ARCH_ARM 3842 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698