| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 FixedArray::kHeaderSize - kHeapObjectTag)); | 342 FixedArray::kHeaderSize - kHeapObjectTag)); |
| 343 | 343 |
| 344 RecordWrite(object, dst, value, remembered_set_action, OMIT_SMI_CHECK, | 344 RecordWrite(object, dst, value, remembered_set_action, OMIT_SMI_CHECK, |
| 345 pointers_to_here_check_for_value); | 345 pointers_to_here_check_for_value); |
| 346 | 346 |
| 347 bind(&done); | 347 bind(&done); |
| 348 | 348 |
| 349 // Clobber clobbered input registers when running with the debug-code flag | 349 // Clobber clobbered input registers when running with the debug-code flag |
| 350 // turned on to provoke errors. | 350 // turned on to provoke errors. |
| 351 if (emit_debug_code()) { | 351 if (emit_debug_code()) { |
| 352 mov(value, Immediate(BitCast<int32_t>(kZapValue))); | 352 mov(value, Immediate(bit_cast<int32_t>(kZapValue))); |
| 353 mov(index, Immediate(BitCast<int32_t>(kZapValue))); | 353 mov(index, Immediate(bit_cast<int32_t>(kZapValue))); |
| 354 } | 354 } |
| 355 } | 355 } |
| 356 | 356 |
| 357 | 357 |
| 358 void MacroAssembler::RecordWriteField( | 358 void MacroAssembler::RecordWriteField( |
| 359 Register object, | 359 Register object, |
| 360 int offset, | 360 int offset, |
| 361 Register value, | 361 Register value, |
| 362 Register dst, | 362 Register dst, |
| 363 RememberedSetAction remembered_set_action, | 363 RememberedSetAction remembered_set_action, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 386 } | 386 } |
| 387 | 387 |
| 388 RecordWrite(object, dst, value, remembered_set_action, OMIT_SMI_CHECK, | 388 RecordWrite(object, dst, value, remembered_set_action, OMIT_SMI_CHECK, |
| 389 pointers_to_here_check_for_value); | 389 pointers_to_here_check_for_value); |
| 390 | 390 |
| 391 bind(&done); | 391 bind(&done); |
| 392 | 392 |
| 393 // Clobber clobbered input registers when running with the debug-code flag | 393 // Clobber clobbered input registers when running with the debug-code flag |
| 394 // turned on to provoke errors. | 394 // turned on to provoke errors. |
| 395 if (emit_debug_code()) { | 395 if (emit_debug_code()) { |
| 396 mov(value, Immediate(BitCast<int32_t>(kZapValue))); | 396 mov(value, Immediate(bit_cast<int32_t>(kZapValue))); |
| 397 mov(dst, Immediate(BitCast<int32_t>(kZapValue))); | 397 mov(dst, Immediate(bit_cast<int32_t>(kZapValue))); |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 | 400 |
| 401 | 401 |
| 402 void MacroAssembler::RecordWriteForMap( | 402 void MacroAssembler::RecordWriteForMap( |
| 403 Register object, | 403 Register object, |
| 404 Handle<Map> map, | 404 Handle<Map> map, |
| 405 Register scratch1, | 405 Register scratch1, |
| 406 Register scratch2) { | 406 Register scratch2) { |
| 407 Label done; | 407 Label done; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 | 445 |
| 446 bind(&done); | 446 bind(&done); |
| 447 | 447 |
| 448 // Count number of write barriers in generated code. | 448 // Count number of write barriers in generated code. |
| 449 isolate()->counters()->write_barriers_static()->Increment(); | 449 isolate()->counters()->write_barriers_static()->Increment(); |
| 450 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1); | 450 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1); |
| 451 | 451 |
| 452 // Clobber clobbered input registers when running with the debug-code flag | 452 // Clobber clobbered input registers when running with the debug-code flag |
| 453 // turned on to provoke errors. | 453 // turned on to provoke errors. |
| 454 if (emit_debug_code()) { | 454 if (emit_debug_code()) { |
| 455 mov(value, Immediate(BitCast<int32_t>(kZapValue))); | 455 mov(value, Immediate(bit_cast<int32_t>(kZapValue))); |
| 456 mov(scratch1, Immediate(BitCast<int32_t>(kZapValue))); | 456 mov(scratch1, Immediate(bit_cast<int32_t>(kZapValue))); |
| 457 mov(scratch2, Immediate(BitCast<int32_t>(kZapValue))); | 457 mov(scratch2, Immediate(bit_cast<int32_t>(kZapValue))); |
| 458 } | 458 } |
| 459 } | 459 } |
| 460 | 460 |
| 461 | 461 |
| 462 void MacroAssembler::RecordWrite( | 462 void MacroAssembler::RecordWrite( |
| 463 Register object, | 463 Register object, |
| 464 Register address, | 464 Register address, |
| 465 Register value, | 465 Register value, |
| 466 RememberedSetAction remembered_set_action, | 466 RememberedSetAction remembered_set_action, |
| 467 SmiCheck smi_check, | 467 SmiCheck smi_check, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 514 |
| 515 bind(&done); | 515 bind(&done); |
| 516 | 516 |
| 517 // Count number of write barriers in generated code. | 517 // Count number of write barriers in generated code. |
| 518 isolate()->counters()->write_barriers_static()->Increment(); | 518 isolate()->counters()->write_barriers_static()->Increment(); |
| 519 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1); | 519 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1); |
| 520 | 520 |
| 521 // Clobber clobbered registers when running with the debug-code flag | 521 // Clobber clobbered registers when running with the debug-code flag |
| 522 // turned on to provoke errors. | 522 // turned on to provoke errors. |
| 523 if (emit_debug_code()) { | 523 if (emit_debug_code()) { |
| 524 mov(address, Immediate(BitCast<int32_t>(kZapValue))); | 524 mov(address, Immediate(bit_cast<int32_t>(kZapValue))); |
| 525 mov(value, Immediate(BitCast<int32_t>(kZapValue))); | 525 mov(value, Immediate(bit_cast<int32_t>(kZapValue))); |
| 526 } | 526 } |
| 527 } | 527 } |
| 528 | 528 |
| 529 | 529 |
| 530 void MacroAssembler::DebugBreak() { | 530 void MacroAssembler::DebugBreak() { |
| 531 Move(eax, Immediate(0)); | 531 Move(eax, Immediate(0)); |
| 532 mov(ebx, Immediate(ExternalReference(Runtime::kDebugBreak, isolate()))); | 532 mov(ebx, Immediate(ExternalReference(Runtime::kDebugBreak, isolate()))); |
| 533 CEntryStub ces(isolate(), 1); | 533 CEntryStub ces(isolate(), 1); |
| 534 call(ces.GetCode(), RelocInfo::DEBUG_BREAK); | 534 call(ces.GetCode(), RelocInfo::DEBUG_BREAK); |
| 535 } | 535 } |
| (...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2009 | 2009 |
| 2010 | 2010 |
| 2011 Operand ApiParameterOperand(int index) { | 2011 Operand ApiParameterOperand(int index) { |
| 2012 return Operand(esp, index * kPointerSize); | 2012 return Operand(esp, index * kPointerSize); |
| 2013 } | 2013 } |
| 2014 | 2014 |
| 2015 | 2015 |
| 2016 void MacroAssembler::PrepareCallApiFunction(int argc) { | 2016 void MacroAssembler::PrepareCallApiFunction(int argc) { |
| 2017 EnterApiExitFrame(argc); | 2017 EnterApiExitFrame(argc); |
| 2018 if (emit_debug_code()) { | 2018 if (emit_debug_code()) { |
| 2019 mov(esi, Immediate(BitCast<int32_t>(kZapValue))); | 2019 mov(esi, Immediate(bit_cast<int32_t>(kZapValue))); |
| 2020 } | 2020 } |
| 2021 } | 2021 } |
| 2022 | 2022 |
| 2023 | 2023 |
| 2024 void MacroAssembler::CallApiFunctionAndReturn( | 2024 void MacroAssembler::CallApiFunctionAndReturn( |
| 2025 Register function_address, | 2025 Register function_address, |
| 2026 ExternalReference thunk_ref, | 2026 ExternalReference thunk_ref, |
| 2027 Operand thunk_last_arg, | 2027 Operand thunk_last_arg, |
| 2028 int stack_space, | 2028 int stack_space, |
| 2029 Operand return_value_operand, | 2029 Operand return_value_operand, |
| (...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3321 if (mag.shift > 0) sar(edx, mag.shift); | 3321 if (mag.shift > 0) sar(edx, mag.shift); |
| 3322 mov(eax, dividend); | 3322 mov(eax, dividend); |
| 3323 shr(eax, 31); | 3323 shr(eax, 31); |
| 3324 add(edx, eax); | 3324 add(edx, eax); |
| 3325 } | 3325 } |
| 3326 | 3326 |
| 3327 | 3327 |
| 3328 } } // namespace v8::internal | 3328 } } // namespace v8::internal |
| 3329 | 3329 |
| 3330 #endif // V8_TARGET_ARCH_X87 | 3330 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |