| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 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 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2464 } else { | 2464 } else { |
| 2465 pop(scratch); | 2465 pop(scratch); |
| 2466 add(esp, Immediate(bytes_dropped)); | 2466 add(esp, Immediate(bytes_dropped)); |
| 2467 push(scratch); | 2467 push(scratch); |
| 2468 ret(0); | 2468 ret(0); |
| 2469 } | 2469 } |
| 2470 } | 2470 } |
| 2471 | 2471 |
| 2472 | 2472 |
| 2473 void MacroAssembler::VerifyX87StackDepth(uint32_t depth) { | 2473 void MacroAssembler::VerifyX87StackDepth(uint32_t depth) { |
| 2474 // Turn off the stack depth check when serializer is enabled to reduce the |
| 2475 // code size. |
| 2476 if (serializer_enabled()) return; |
| 2474 // Make sure the floating point stack is either empty or has depth items. | 2477 // Make sure the floating point stack is either empty or has depth items. |
| 2475 DCHECK(depth <= 7); | 2478 DCHECK(depth <= 7); |
| 2476 // This is very expensive. | 2479 // This is very expensive. |
| 2477 DCHECK(FLAG_debug_code && FLAG_enable_slow_asserts); | 2480 DCHECK(FLAG_debug_code && FLAG_enable_slow_asserts); |
| 2478 | 2481 |
| 2479 // The top-of-stack (tos) is 7 if there is one item pushed. | 2482 // The top-of-stack (tos) is 7 if there is one item pushed. |
| 2480 int tos = (8 - depth) % 8; | 2483 int tos = (8 - depth) % 8; |
| 2481 const int kTopMask = 0x3800; | 2484 const int kTopMask = 0x3800; |
| 2482 push(eax); | 2485 push(eax); |
| 2483 fwait(); | 2486 fwait(); |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3268 if (mag.shift > 0) sar(edx, mag.shift); | 3271 if (mag.shift > 0) sar(edx, mag.shift); |
| 3269 mov(eax, dividend); | 3272 mov(eax, dividend); |
| 3270 shr(eax, 31); | 3273 shr(eax, 31); |
| 3271 add(edx, eax); | 3274 add(edx, eax); |
| 3272 } | 3275 } |
| 3273 | 3276 |
| 3274 | 3277 |
| 3275 } } // namespace v8::internal | 3278 } } // namespace v8::internal |
| 3276 | 3279 |
| 3277 #endif // V8_TARGET_ARCH_X87 | 3280 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |