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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 143633007: A64: Synchronize with r18764. (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/mips/ic-mips.cc ('k') | src/mips/lithium-mips.h » ('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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after
2844 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 2844 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2845 DeoptimizeIf(eq, instr->environment(), payload, Operand(at)); 2845 DeoptimizeIf(eq, instr->environment(), payload, Operand(at));
2846 } 2846 }
2847 2847
2848 // Store the value. 2848 // Store the value.
2849 __ sw(value, FieldMemOperand(cell, Cell::kValueOffset)); 2849 __ sw(value, FieldMemOperand(cell, Cell::kValueOffset));
2850 // Cells are always rescanned, so no write barrier here. 2850 // Cells are always rescanned, so no write barrier here.
2851 } 2851 }
2852 2852
2853 2853
2854 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) {
2855 ASSERT(ToRegister(instr->context()).is(cp));
2856 ASSERT(ToRegister(instr->global_object()).is(a1));
2857 ASSERT(ToRegister(instr->value()).is(a0));
2858
2859 __ li(a2, Operand(instr->name()));
2860 Handle<Code> ic = StoreIC::initialize_stub(isolate(),
2861 instr->strict_mode_flag(),
2862 CONTEXTUAL);
2863 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2864 }
2865
2866 2854
2867 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2855 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2868 Register context = ToRegister(instr->context()); 2856 Register context = ToRegister(instr->context());
2869 Register result = ToRegister(instr->result()); 2857 Register result = ToRegister(instr->result());
2870 2858
2871 __ lw(result, ContextOperand(context, instr->slot_index())); 2859 __ lw(result, ContextOperand(context, instr->slot_index()));
2872 if (instr->hydrogen()->RequiresHoleCheck()) { 2860 if (instr->hydrogen()->RequiresHoleCheck()) {
2873 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 2861 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2874 2862
2875 if (instr->hydrogen()->DeoptimizesOnHole()) { 2863 if (instr->hydrogen()->DeoptimizesOnHole()) {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
3075 constant_key = ToInteger32(LConstantOperand::cast(instr->key())); 3063 constant_key = ToInteger32(LConstantOperand::cast(instr->key()));
3076 if (constant_key & 0xF0000000) { 3064 if (constant_key & 0xF0000000) {
3077 Abort(kArrayIndexConstantValueTooBig); 3065 Abort(kArrayIndexConstantValueTooBig);
3078 } 3066 }
3079 } else { 3067 } else {
3080 key = ToRegister(instr->key()); 3068 key = ToRegister(instr->key());
3081 } 3069 }
3082 int element_size_shift = ElementsKindToShiftSize(elements_kind); 3070 int element_size_shift = ElementsKindToShiftSize(elements_kind);
3083 int shift_size = (instr->hydrogen()->key()->representation().IsSmi()) 3071 int shift_size = (instr->hydrogen()->key()->representation().IsSmi())
3084 ? (element_size_shift - kSmiTagSize) : element_size_shift; 3072 ? (element_size_shift - kSmiTagSize) : element_size_shift;
3085 int additional_offset = instr->additional_index() << element_size_shift; 3073 int additional_offset = IsFixedTypedArrayElementsKind(elements_kind)
3074 ? FixedTypedArrayBase::kDataOffset - kHeapObjectTag
3075 : 0;
3086 3076
3087 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || 3077 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS ||
3088 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { 3078 elements_kind == FLOAT32_ELEMENTS ||
3079 elements_kind == EXTERNAL_DOUBLE_ELEMENTS ||
3080 elements_kind == FLOAT64_ELEMENTS) {
3081 int base_offset =
3082 (instr->additional_index() << element_size_shift) + additional_offset;
3089 FPURegister result = ToDoubleRegister(instr->result()); 3083 FPURegister result = ToDoubleRegister(instr->result());
3090 if (key_is_constant) { 3084 if (key_is_constant) {
3091 __ Addu(scratch0(), external_pointer, constant_key << element_size_shift); 3085 __ Addu(scratch0(), external_pointer, constant_key << element_size_shift);
3092 } else { 3086 } else {
3093 __ sll(scratch0(), key, shift_size); 3087 __ sll(scratch0(), key, shift_size);
3094 __ Addu(scratch0(), scratch0(), external_pointer); 3088 __ Addu(scratch0(), scratch0(), external_pointer);
3095 } 3089 }
3096 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { 3090 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS ||
3097 __ lwc1(result, MemOperand(scratch0(), additional_offset)); 3091 elements_kind == FLOAT32_ELEMENTS) {
3092 __ lwc1(result, MemOperand(scratch0(), base_offset));
3098 __ cvt_d_s(result, result); 3093 __ cvt_d_s(result, result);
3099 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS 3094 } else { // loading doubles, not floats.
3100 __ ldc1(result, MemOperand(scratch0(), additional_offset)); 3095 __ ldc1(result, MemOperand(scratch0(), base_offset));
3101 } 3096 }
3102 } else { 3097 } else {
3103 Register result = ToRegister(instr->result()); 3098 Register result = ToRegister(instr->result());
3104 MemOperand mem_operand = PrepareKeyedOperand( 3099 MemOperand mem_operand = PrepareKeyedOperand(
3105 key, external_pointer, key_is_constant, constant_key, 3100 key, external_pointer, key_is_constant, constant_key,
3106 element_size_shift, shift_size, 3101 element_size_shift, shift_size,
3107 instr->additional_index(), additional_offset); 3102 instr->additional_index(), additional_offset);
3108 switch (elements_kind) { 3103 switch (elements_kind) {
3109 case EXTERNAL_BYTE_ELEMENTS: 3104 case EXTERNAL_BYTE_ELEMENTS:
3105 case INT8_ELEMENTS:
3110 __ lb(result, mem_operand); 3106 __ lb(result, mem_operand);
3111 break; 3107 break;
3112 case EXTERNAL_PIXEL_ELEMENTS: 3108 case EXTERNAL_PIXEL_ELEMENTS:
3113 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 3109 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
3110 case UINT8_ELEMENTS:
3111 case UINT8_CLAMPED_ELEMENTS:
3114 __ lbu(result, mem_operand); 3112 __ lbu(result, mem_operand);
3115 break; 3113 break;
3116 case EXTERNAL_SHORT_ELEMENTS: 3114 case EXTERNAL_SHORT_ELEMENTS:
3115 case INT16_ELEMENTS:
3117 __ lh(result, mem_operand); 3116 __ lh(result, mem_operand);
3118 break; 3117 break;
3119 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 3118 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
3119 case UINT16_ELEMENTS:
3120 __ lhu(result, mem_operand); 3120 __ lhu(result, mem_operand);
3121 break; 3121 break;
3122 case EXTERNAL_INT_ELEMENTS: 3122 case EXTERNAL_INT_ELEMENTS:
3123 case INT32_ELEMENTS:
3123 __ lw(result, mem_operand); 3124 __ lw(result, mem_operand);
3124 break; 3125 break;
3125 case EXTERNAL_UNSIGNED_INT_ELEMENTS: 3126 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
3127 case UINT32_ELEMENTS:
3126 __ lw(result, mem_operand); 3128 __ lw(result, mem_operand);
3127 if (!instr->hydrogen()->CheckFlag(HInstruction::kUint32)) { 3129 if (!instr->hydrogen()->CheckFlag(HInstruction::kUint32)) {
3128 DeoptimizeIf(Ugreater_equal, instr->environment(), 3130 DeoptimizeIf(Ugreater_equal, instr->environment(),
3129 result, Operand(0x80000000)); 3131 result, Operand(0x80000000));
3130 } 3132 }
3131 break; 3133 break;
3134 case FLOAT32_ELEMENTS:
3135 case FLOAT64_ELEMENTS:
3132 case EXTERNAL_FLOAT_ELEMENTS: 3136 case EXTERNAL_FLOAT_ELEMENTS:
3133 case EXTERNAL_DOUBLE_ELEMENTS: 3137 case EXTERNAL_DOUBLE_ELEMENTS:
3134 case FAST_DOUBLE_ELEMENTS: 3138 case FAST_DOUBLE_ELEMENTS:
3135 case FAST_ELEMENTS: 3139 case FAST_ELEMENTS:
3136 case FAST_SMI_ELEMENTS: 3140 case FAST_SMI_ELEMENTS:
3137 case FAST_HOLEY_DOUBLE_ELEMENTS: 3141 case FAST_HOLEY_DOUBLE_ELEMENTS:
3138 case FAST_HOLEY_ELEMENTS: 3142 case FAST_HOLEY_ELEMENTS:
3139 case FAST_HOLEY_SMI_ELEMENTS: 3143 case FAST_HOLEY_SMI_ELEMENTS:
3140 case DICTIONARY_ELEMENTS: 3144 case DICTIONARY_ELEMENTS:
3141 case NON_STRICT_ARGUMENTS_ELEMENTS: 3145 case NON_STRICT_ARGUMENTS_ELEMENTS:
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
3220 DeoptimizeIf(ne, instr->environment(), scratch, Operand(zero_reg)); 3224 DeoptimizeIf(ne, instr->environment(), scratch, Operand(zero_reg));
3221 } else { 3225 } else {
3222 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3226 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3223 DeoptimizeIf(eq, instr->environment(), result, Operand(scratch)); 3227 DeoptimizeIf(eq, instr->environment(), result, Operand(scratch));
3224 } 3228 }
3225 } 3229 }
3226 } 3230 }
3227 3231
3228 3232
3229 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { 3233 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) {
3230 if (instr->is_external()) { 3234 if (instr->is_typed_elements()) {
3231 DoLoadKeyedExternalArray(instr); 3235 DoLoadKeyedExternalArray(instr);
3232 } else if (instr->hydrogen()->representation().IsDouble()) { 3236 } else if (instr->hydrogen()->representation().IsDouble()) {
3233 DoLoadKeyedFixedDoubleArray(instr); 3237 DoLoadKeyedFixedDoubleArray(instr);
3234 } else { 3238 } else {
3235 DoLoadKeyedFixedArray(instr); 3239 DoLoadKeyedFixedArray(instr);
3236 } 3240 }
3237 } 3241 }
3238 3242
3239 3243
3240 MemOperand LCodeGen::PrepareKeyedOperand(Register key, 3244 MemOperand LCodeGen::PrepareKeyedOperand(Register key,
3241 Register base, 3245 Register base,
3242 bool key_is_constant, 3246 bool key_is_constant,
3243 int constant_key, 3247 int constant_key,
3244 int element_size, 3248 int element_size,
3245 int shift_size, 3249 int shift_size,
3246 int additional_index, 3250 int additional_index,
3247 int additional_offset) { 3251 int additional_offset) {
3248 if (additional_index != 0 && !key_is_constant) { 3252 int base_offset = (additional_index << element_size) + additional_offset;
3253 if (key_is_constant) {
3254 return MemOperand(base,
3255 base_offset + (constant_key << element_size));
3256 }
3257
3258 if (additional_offset != 0) {
3259 if (shift_size >= 0) {
3260 __ sll(scratch0(), key, shift_size);
3261 __ Addu(scratch0(), scratch0(), Operand(base_offset));
3262 } else {
3263 ASSERT_EQ(-1, shift_size);
3264 __ srl(scratch0(), key, 1);
3265 __ Addu(scratch0(), scratch0(), Operand(base_offset));
3266 }
3267 __ Addu(scratch0(), base, scratch0());
3268 return MemOperand(scratch0());
3269 }
3270
3271 if (additional_index != 0) {
3249 additional_index *= 1 << (element_size - shift_size); 3272 additional_index *= 1 << (element_size - shift_size);
3250 __ Addu(scratch0(), key, Operand(additional_index)); 3273 __ Addu(scratch0(), key, Operand(additional_index));
3251 } 3274 }
3252 3275
3253 if (key_is_constant) {
3254 return MemOperand(base,
3255 (constant_key << element_size) + additional_offset);
3256 }
3257
3258 if (additional_index == 0) { 3276 if (additional_index == 0) {
3259 if (shift_size >= 0) { 3277 if (shift_size >= 0) {
3260 __ sll(scratch0(), key, shift_size); 3278 __ sll(scratch0(), key, shift_size);
3261 __ Addu(scratch0(), base, scratch0()); 3279 __ Addu(scratch0(), base, scratch0());
3262 return MemOperand(scratch0()); 3280 return MemOperand(scratch0());
3263 } else { 3281 } else {
3264 ASSERT_EQ(-1, shift_size); 3282 ASSERT_EQ(-1, shift_size);
3265 __ srl(scratch0(), key, 1); 3283 __ srl(scratch0(), key, 1);
3266 __ Addu(scratch0(), base, scratch0()); 3284 __ Addu(scratch0(), base, scratch0());
3267 return MemOperand(scratch0()); 3285 return MemOperand(scratch0());
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
3947 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 3965 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
3948 } 3966 }
3949 3967
3950 3968
3951 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 3969 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
3952 ASSERT(ToRegister(instr->context()).is(cp)); 3970 ASSERT(ToRegister(instr->context()).is(cp));
3953 ASSERT(ToRegister(instr->constructor()).is(a1)); 3971 ASSERT(ToRegister(instr->constructor()).is(a1));
3954 ASSERT(ToRegister(instr->result()).is(v0)); 3972 ASSERT(ToRegister(instr->result()).is(v0));
3955 3973
3956 __ li(a0, Operand(instr->arity())); 3974 __ li(a0, Operand(instr->arity()));
3957 __ li(a2, Operand(instr->hydrogen()->property_cell())); 3975 __ li(a2, Operand(factory()->undefined_value()));
3958 ElementsKind kind = instr->hydrogen()->elements_kind(); 3976 ElementsKind kind = instr->hydrogen()->elements_kind();
3959 AllocationSiteOverrideMode override_mode = 3977 AllocationSiteOverrideMode override_mode =
3960 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) 3978 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE)
3961 ? DISABLE_ALLOCATION_SITES 3979 ? DISABLE_ALLOCATION_SITES
3962 : DONT_OVERRIDE; 3980 : DONT_OVERRIDE;
3963 3981
3964 if (instr->arity() == 0) { 3982 if (instr->arity() == 0) {
3965 ArrayNoArgumentConstructorStub stub(kind, override_mode); 3983 ArrayNoArgumentConstructorStub stub(kind, override_mode);
3966 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 3984 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
3967 } else if (instr->arity() == 1) { 3985 } else if (instr->arity() == 1) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
4108 4126
4109 4127
4110 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 4128 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
4111 ASSERT(ToRegister(instr->context()).is(cp)); 4129 ASSERT(ToRegister(instr->context()).is(cp));
4112 ASSERT(ToRegister(instr->object()).is(a1)); 4130 ASSERT(ToRegister(instr->object()).is(a1));
4113 ASSERT(ToRegister(instr->value()).is(a0)); 4131 ASSERT(ToRegister(instr->value()).is(a0));
4114 4132
4115 // Name is always in a2. 4133 // Name is always in a2.
4116 __ li(a2, Operand(instr->name())); 4134 __ li(a2, Operand(instr->name()));
4117 Handle<Code> ic = StoreIC::initialize_stub(isolate(), 4135 Handle<Code> ic = StoreIC::initialize_stub(isolate(),
4118 instr->strict_mode_flag(), 4136 instr->strict_mode_flag());
4119 NOT_CONTEXTUAL);
4120 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4137 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4121 } 4138 }
4122 4139
4123 4140
4124 void LCodeGen::ApplyCheckIf(Condition condition, 4141 void LCodeGen::ApplyCheckIf(Condition condition,
4125 LBoundsCheck* check, 4142 LBoundsCheck* check,
4126 Register src1, 4143 Register src1,
4127 const Operand& src2) { 4144 const Operand& src2) {
4128 if (FLAG_debug_code && check->hydrogen()->skip_check()) { 4145 if (FLAG_debug_code && check->hydrogen()->skip_check()) {
4129 Label done; 4146 Label done;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
4171 constant_key = ToInteger32(LConstantOperand::cast(instr->key())); 4188 constant_key = ToInteger32(LConstantOperand::cast(instr->key()));
4172 if (constant_key & 0xF0000000) { 4189 if (constant_key & 0xF0000000) {
4173 Abort(kArrayIndexConstantValueTooBig); 4190 Abort(kArrayIndexConstantValueTooBig);
4174 } 4191 }
4175 } else { 4192 } else {
4176 key = ToRegister(instr->key()); 4193 key = ToRegister(instr->key());
4177 } 4194 }
4178 int element_size_shift = ElementsKindToShiftSize(elements_kind); 4195 int element_size_shift = ElementsKindToShiftSize(elements_kind);
4179 int shift_size = (instr->hydrogen()->key()->representation().IsSmi()) 4196 int shift_size = (instr->hydrogen()->key()->representation().IsSmi())
4180 ? (element_size_shift - kSmiTagSize) : element_size_shift; 4197 ? (element_size_shift - kSmiTagSize) : element_size_shift;
4181 int additional_offset = instr->additional_index() << element_size_shift; 4198 int additional_offset = IsFixedTypedArrayElementsKind(elements_kind)
4199 ? FixedTypedArrayBase::kDataOffset - kHeapObjectTag
4200 : 0;
4182 4201
4183 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || 4202 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS ||
4184 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { 4203 elements_kind == FLOAT32_ELEMENTS ||
4204 elements_kind == EXTERNAL_DOUBLE_ELEMENTS ||
4205 elements_kind == FLOAT64_ELEMENTS) {
4206 int base_offset =
4207 (instr->additional_index() << element_size_shift) + additional_offset;
4185 Register address = scratch0(); 4208 Register address = scratch0();
4186 FPURegister value(ToDoubleRegister(instr->value())); 4209 FPURegister value(ToDoubleRegister(instr->value()));
4187 if (key_is_constant) { 4210 if (key_is_constant) {
4188 if (constant_key != 0) { 4211 if (constant_key != 0) {
4189 __ Addu(address, external_pointer, 4212 __ Addu(address, external_pointer,
4190 Operand(constant_key << element_size_shift)); 4213 Operand(constant_key << element_size_shift));
4191 } else { 4214 } else {
4192 address = external_pointer; 4215 address = external_pointer;
4193 } 4216 }
4194 } else { 4217 } else {
4195 __ sll(address, key, shift_size); 4218 __ sll(address, key, shift_size);
4196 __ Addu(address, external_pointer, address); 4219 __ Addu(address, external_pointer, address);
4197 } 4220 }
4198 4221
4199 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { 4222 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS ||
4223 elements_kind == FLOAT32_ELEMENTS) {
4200 __ cvt_s_d(double_scratch0(), value); 4224 __ cvt_s_d(double_scratch0(), value);
4201 __ swc1(double_scratch0(), MemOperand(address, additional_offset)); 4225 __ swc1(double_scratch0(), MemOperand(address, base_offset));
4202 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS 4226 } else { // Storing doubles, not floats.
4203 __ sdc1(value, MemOperand(address, additional_offset)); 4227 __ sdc1(value, MemOperand(address, base_offset));
4204 } 4228 }
4205 } else { 4229 } else {
4206 Register value(ToRegister(instr->value())); 4230 Register value(ToRegister(instr->value()));
4207 MemOperand mem_operand = PrepareKeyedOperand( 4231 MemOperand mem_operand = PrepareKeyedOperand(
4208 key, external_pointer, key_is_constant, constant_key, 4232 key, external_pointer, key_is_constant, constant_key,
4209 element_size_shift, shift_size, 4233 element_size_shift, shift_size,
4210 instr->additional_index(), additional_offset); 4234 instr->additional_index(), additional_offset);
4211 switch (elements_kind) { 4235 switch (elements_kind) {
4212 case EXTERNAL_PIXEL_ELEMENTS: 4236 case EXTERNAL_PIXEL_ELEMENTS:
4213 case EXTERNAL_BYTE_ELEMENTS: 4237 case EXTERNAL_BYTE_ELEMENTS:
4214 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 4238 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
4239 case UINT8_ELEMENTS:
4240 case UINT8_CLAMPED_ELEMENTS:
4241 case INT8_ELEMENTS:
4215 __ sb(value, mem_operand); 4242 __ sb(value, mem_operand);
4216 break; 4243 break;
4217 case EXTERNAL_SHORT_ELEMENTS: 4244 case EXTERNAL_SHORT_ELEMENTS:
4218 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 4245 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
4246 case INT16_ELEMENTS:
4247 case UINT16_ELEMENTS:
4219 __ sh(value, mem_operand); 4248 __ sh(value, mem_operand);
4220 break; 4249 break;
4221 case EXTERNAL_INT_ELEMENTS: 4250 case EXTERNAL_INT_ELEMENTS:
4222 case EXTERNAL_UNSIGNED_INT_ELEMENTS: 4251 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
4252 case INT32_ELEMENTS:
4253 case UINT32_ELEMENTS:
4223 __ sw(value, mem_operand); 4254 __ sw(value, mem_operand);
4224 break; 4255 break;
4256 case FLOAT32_ELEMENTS:
4257 case FLOAT64_ELEMENTS:
4225 case EXTERNAL_FLOAT_ELEMENTS: 4258 case EXTERNAL_FLOAT_ELEMENTS:
4226 case EXTERNAL_DOUBLE_ELEMENTS: 4259 case EXTERNAL_DOUBLE_ELEMENTS:
4227 case FAST_DOUBLE_ELEMENTS: 4260 case FAST_DOUBLE_ELEMENTS:
4228 case FAST_ELEMENTS: 4261 case FAST_ELEMENTS:
4229 case FAST_SMI_ELEMENTS: 4262 case FAST_SMI_ELEMENTS:
4230 case FAST_HOLEY_DOUBLE_ELEMENTS: 4263 case FAST_HOLEY_DOUBLE_ELEMENTS:
4231 case FAST_HOLEY_ELEMENTS: 4264 case FAST_HOLEY_ELEMENTS:
4232 case FAST_HOLEY_SMI_ELEMENTS: 4265 case FAST_HOLEY_SMI_ELEMENTS:
4233 case DICTIONARY_ELEMENTS: 4266 case DICTIONARY_ELEMENTS:
4234 case NON_STRICT_ARGUMENTS_ELEMENTS: 4267 case NON_STRICT_ARGUMENTS_ELEMENTS:
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
4333 GetRAState(), 4366 GetRAState(),
4334 kSaveFPRegs, 4367 kSaveFPRegs,
4335 EMIT_REMEMBERED_SET, 4368 EMIT_REMEMBERED_SET,
4336 check_needed); 4369 check_needed);
4337 } 4370 }
4338 } 4371 }
4339 4372
4340 4373
4341 void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) { 4374 void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
4342 // By cases: external, fast double 4375 // By cases: external, fast double
4343 if (instr->is_external()) { 4376 if (instr->is_typed_elements()) {
4344 DoStoreKeyedExternalArray(instr); 4377 DoStoreKeyedExternalArray(instr);
4345 } else if (instr->hydrogen()->value()->representation().IsDouble()) { 4378 } else if (instr->hydrogen()->value()->representation().IsDouble()) {
4346 DoStoreKeyedFixedDoubleArray(instr); 4379 DoStoreKeyedFixedDoubleArray(instr);
4347 } else { 4380 } else {
4348 DoStoreKeyedFixedArray(instr); 4381 DoStoreKeyedFixedArray(instr);
4349 } 4382 }
4350 } 4383 }
4351 4384
4352 4385
4353 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 4386 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
4404 Label no_memento_found; 4437 Label no_memento_found;
4405 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found, 4438 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found,
4406 ne, &no_memento_found); 4439 ne, &no_memento_found);
4407 DeoptimizeIf(al, instr->environment()); 4440 DeoptimizeIf(al, instr->environment());
4408 __ bind(&no_memento_found); 4441 __ bind(&no_memento_found);
4409 } 4442 }
4410 4443
4411 4444
4412 void LCodeGen::DoStringAdd(LStringAdd* instr) { 4445 void LCodeGen::DoStringAdd(LStringAdd* instr) {
4413 ASSERT(ToRegister(instr->context()).is(cp)); 4446 ASSERT(ToRegister(instr->context()).is(cp));
4414 if (FLAG_new_string_add) { 4447 ASSERT(ToRegister(instr->left()).is(a1));
4415 ASSERT(ToRegister(instr->left()).is(a1)); 4448 ASSERT(ToRegister(instr->right()).is(a0));
4416 ASSERT(ToRegister(instr->right()).is(a0)); 4449 StringAddStub stub(instr->hydrogen()->flags(),
4417 NewStringAddStub stub(instr->hydrogen()->flags(), 4450 isolate()->heap()->GetPretenureMode());
4418 isolate()->heap()->GetPretenureMode()); 4451 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
4419 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
4420 } else {
4421 __ push(ToRegister(instr->left()));
4422 __ push(ToRegister(instr->right()));
4423 StringAddStub stub(instr->hydrogen()->flags());
4424 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
4425 }
4426 } 4452 }
4427 4453
4428 4454
4429 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 4455 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
4430 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { 4456 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode {
4431 public: 4457 public:
4432 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 4458 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
4433 : LDeferredCode(codegen), instr_(instr) { } 4459 : LDeferredCode(codegen), instr_(instr) { }
4434 virtual void Generate() V8_OVERRIDE { 4460 virtual void Generate() V8_OVERRIDE {
4435 codegen()->DoDeferredStringCharCodeAt(instr_); 4461 codegen()->DoDeferredStringCharCodeAt(instr_);
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after
5789 __ Subu(scratch, result, scratch); 5815 __ Subu(scratch, result, scratch);
5790 __ lw(result, FieldMemOperand(scratch, 5816 __ lw(result, FieldMemOperand(scratch,
5791 FixedArray::kHeaderSize - kPointerSize)); 5817 FixedArray::kHeaderSize - kPointerSize));
5792 __ bind(&done); 5818 __ bind(&done);
5793 } 5819 }
5794 5820
5795 5821
5796 #undef __ 5822 #undef __
5797 5823
5798 } } // namespace v8::internal 5824 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698