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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2396 } | 2396 } |
2397 | 2397 |
2398 | 2398 |
2399 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, | 2399 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, |
2400 Register scratch) { | 2400 Register scratch) { |
2401 mov(scratch, cell); | 2401 mov(scratch, cell); |
2402 cmp(value, FieldOperand(scratch, WeakCell::kValueOffset)); | 2402 cmp(value, FieldOperand(scratch, WeakCell::kValueOffset)); |
2403 } | 2403 } |
2404 | 2404 |
2405 | 2405 |
| 2406 void MacroAssembler::GetWeakValue(Register value, Handle<WeakCell> cell) { |
| 2407 mov(value, cell); |
| 2408 mov(value, FieldOperand(value, WeakCell::kValueOffset)); |
| 2409 } |
| 2410 |
| 2411 |
2406 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell, | 2412 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell, |
2407 Label* miss) { | 2413 Label* miss) { |
2408 mov(value, cell); | 2414 GetWeakValue(value, cell); |
2409 mov(value, FieldOperand(value, WeakCell::kValueOffset)); | |
2410 JumpIfSmi(value, miss); | 2415 JumpIfSmi(value, miss); |
2411 } | 2416 } |
2412 | 2417 |
2413 | 2418 |
2414 void MacroAssembler::Ret() { | 2419 void MacroAssembler::Ret() { |
2415 ret(0); | 2420 ret(0); |
2416 } | 2421 } |
2417 | 2422 |
2418 | 2423 |
2419 void MacroAssembler::Ret(int bytes_dropped, Register scratch) { | 2424 void MacroAssembler::Ret(int bytes_dropped, Register scratch) { |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3278 if (mag.shift > 0) sar(edx, mag.shift); | 3283 if (mag.shift > 0) sar(edx, mag.shift); |
3279 mov(eax, dividend); | 3284 mov(eax, dividend); |
3280 shr(eax, 31); | 3285 shr(eax, 31); |
3281 add(edx, eax); | 3286 add(edx, eax); |
3282 } | 3287 } |
3283 | 3288 |
3284 | 3289 |
3285 } } // namespace v8::internal | 3290 } } // namespace v8::internal |
3286 | 3291 |
3287 #endif // V8_TARGET_ARCH_IA32 | 3292 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |