| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
| 10 #include "codegen.h" | 10 #include "codegen.h" |
| (...skipping 3164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3175 j(cc, condition_met, condition_met_distance); | 3175 j(cc, condition_met, condition_met_distance); |
| 3176 } | 3176 } |
| 3177 | 3177 |
| 3178 | 3178 |
| 3179 void MacroAssembler::CheckMapDeprecated(Handle<Map> map, | 3179 void MacroAssembler::CheckMapDeprecated(Handle<Map> map, |
| 3180 Register scratch, | 3180 Register scratch, |
| 3181 Label* if_deprecated) { | 3181 Label* if_deprecated) { |
| 3182 if (map->CanBeDeprecated()) { | 3182 if (map->CanBeDeprecated()) { |
| 3183 mov(scratch, map); | 3183 mov(scratch, map); |
| 3184 mov(scratch, FieldOperand(scratch, Map::kBitField3Offset)); | 3184 mov(scratch, FieldOperand(scratch, Map::kBitField3Offset)); |
| 3185 and_(scratch, Immediate(Map::Deprecated::kMask)); | 3185 and_(scratch, Immediate(Smi::FromInt(Map::Deprecated::kMask))); |
| 3186 j(not_zero, if_deprecated); | 3186 j(not_zero, if_deprecated); |
| 3187 } | 3187 } |
| 3188 } | 3188 } |
| 3189 | 3189 |
| 3190 | 3190 |
| 3191 void MacroAssembler::JumpIfBlack(Register object, | 3191 void MacroAssembler::JumpIfBlack(Register object, |
| 3192 Register scratch0, | 3192 Register scratch0, |
| 3193 Register scratch1, | 3193 Register scratch1, |
| 3194 Label* on_black, | 3194 Label* on_black, |
| 3195 Label::Distance on_black_near) { | 3195 Label::Distance on_black_near) { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3353 Check(less_equal, kLiveBytesCountOverflowChunkSize); | 3353 Check(less_equal, kLiveBytesCountOverflowChunkSize); |
| 3354 } | 3354 } |
| 3355 | 3355 |
| 3356 bind(&done); | 3356 bind(&done); |
| 3357 } | 3357 } |
| 3358 | 3358 |
| 3359 | 3359 |
| 3360 void MacroAssembler::EnumLength(Register dst, Register map) { | 3360 void MacroAssembler::EnumLength(Register dst, Register map) { |
| 3361 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); | 3361 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); |
| 3362 mov(dst, FieldOperand(map, Map::kBitField3Offset)); | 3362 mov(dst, FieldOperand(map, Map::kBitField3Offset)); |
| 3363 and_(dst, Immediate(Map::EnumLengthBits::kMask)); | 3363 and_(dst, Immediate(Smi::FromInt(Map::EnumLengthBits::kMask))); |
| 3364 SmiTag(dst); | |
| 3365 } | 3364 } |
| 3366 | 3365 |
| 3367 | 3366 |
| 3368 void MacroAssembler::CheckEnumCache(Label* call_runtime) { | 3367 void MacroAssembler::CheckEnumCache(Label* call_runtime) { |
| 3369 Label next, start; | 3368 Label next, start; |
| 3370 mov(ecx, eax); | 3369 mov(ecx, eax); |
| 3371 | 3370 |
| 3372 // Check if the enum length field is properly initialized, indicating that | 3371 // Check if the enum length field is properly initialized, indicating that |
| 3373 // there is an enum cache. | 3372 // there is an enum cache. |
| 3374 mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); | 3373 mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3465 if (ms.shift() > 0) sar(edx, ms.shift()); | 3464 if (ms.shift() > 0) sar(edx, ms.shift()); |
| 3466 mov(eax, dividend); | 3465 mov(eax, dividend); |
| 3467 shr(eax, 31); | 3466 shr(eax, 31); |
| 3468 add(edx, eax); | 3467 add(edx, eax); |
| 3469 } | 3468 } |
| 3470 | 3469 |
| 3471 | 3470 |
| 3472 } } // namespace v8::internal | 3471 } } // namespace v8::internal |
| 3473 | 3472 |
| 3474 #endif // V8_TARGET_ARCH_IA32 | 3473 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |