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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 553843002: Replace our home-grown BitCast with bit_cast from Chrome/Google3. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « no previous file | src/arm/simulator-arm.cc » ('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. 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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 save_fp, 493 save_fp,
494 remembered_set_action, 494 remembered_set_action,
495 OMIT_SMI_CHECK, 495 OMIT_SMI_CHECK,
496 pointers_to_here_check_for_value); 496 pointers_to_here_check_for_value);
497 497
498 bind(&done); 498 bind(&done);
499 499
500 // Clobber clobbered input registers when running with the debug-code flag 500 // Clobber clobbered input registers when running with the debug-code flag
501 // turned on to provoke errors. 501 // turned on to provoke errors.
502 if (emit_debug_code()) { 502 if (emit_debug_code()) {
503 mov(value, Operand(BitCast<int32_t>(kZapValue + 4))); 503 mov(value, Operand(bit_cast<int32_t>(kZapValue + 4)));
504 mov(dst, Operand(BitCast<int32_t>(kZapValue + 8))); 504 mov(dst, Operand(bit_cast<int32_t>(kZapValue + 8)));
505 } 505 }
506 } 506 }
507 507
508 508
509 // Will clobber 4 registers: object, map, dst, ip. The 509 // Will clobber 4 registers: object, map, dst, ip. The
510 // register 'object' contains a heap object pointer. 510 // register 'object' contains a heap object pointer.
511 void MacroAssembler::RecordWriteForMap(Register object, 511 void MacroAssembler::RecordWriteForMap(Register object,
512 Register map, 512 Register map,
513 Register dst, 513 Register dst,
514 LinkRegisterStatus lr_status, 514 LinkRegisterStatus lr_status,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 563
564 bind(&done); 564 bind(&done);
565 565
566 // Count number of write barriers in generated code. 566 // Count number of write barriers in generated code.
567 isolate()->counters()->write_barriers_static()->Increment(); 567 isolate()->counters()->write_barriers_static()->Increment();
568 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, ip, dst); 568 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, ip, dst);
569 569
570 // Clobber clobbered registers when running with the debug-code flag 570 // Clobber clobbered registers when running with the debug-code flag
571 // turned on to provoke errors. 571 // turned on to provoke errors.
572 if (emit_debug_code()) { 572 if (emit_debug_code()) {
573 mov(dst, Operand(BitCast<int32_t>(kZapValue + 12))); 573 mov(dst, Operand(bit_cast<int32_t>(kZapValue + 12)));
574 mov(map, Operand(BitCast<int32_t>(kZapValue + 16))); 574 mov(map, Operand(bit_cast<int32_t>(kZapValue + 16)));
575 } 575 }
576 } 576 }
577 577
578 578
579 // Will clobber 4 registers: object, address, scratch, ip. The 579 // Will clobber 4 registers: object, address, scratch, ip. The
580 // register 'object' contains a heap object pointer. The heap object 580 // register 'object' contains a heap object pointer. The heap object
581 // tag is shifted away. 581 // tag is shifted away.
582 void MacroAssembler::RecordWrite( 582 void MacroAssembler::RecordWrite(
583 Register object, 583 Register object,
584 Register address, 584 Register address,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 bind(&done); 635 bind(&done);
636 636
637 // Count number of write barriers in generated code. 637 // Count number of write barriers in generated code.
638 isolate()->counters()->write_barriers_static()->Increment(); 638 isolate()->counters()->write_barriers_static()->Increment();
639 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, ip, 639 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, ip,
640 value); 640 value);
641 641
642 // Clobber clobbered registers when running with the debug-code flag 642 // Clobber clobbered registers when running with the debug-code flag
643 // turned on to provoke errors. 643 // turned on to provoke errors.
644 if (emit_debug_code()) { 644 if (emit_debug_code()) {
645 mov(address, Operand(BitCast<int32_t>(kZapValue + 12))); 645 mov(address, Operand(bit_cast<int32_t>(kZapValue + 12)));
646 mov(value, Operand(BitCast<int32_t>(kZapValue + 16))); 646 mov(value, Operand(bit_cast<int32_t>(kZapValue + 16)));
647 } 647 }
648 } 648 }
649 649
650 650
651 void MacroAssembler::RememberedSetHelper(Register object, // For debug tests. 651 void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
652 Register address, 652 Register address,
653 Register scratch, 653 Register scratch,
654 SaveFPRegsMode fp_mode, 654 SaveFPRegsMode fp_mode,
655 RememberedSetFinalAction and_then) { 655 RememberedSetFinalAction and_then) {
656 Label done; 656 Label done;
(...skipping 3449 matching lines...) Expand 10 before | Expand all | Expand 10 after
4106 sub(result, result, Operand(dividend)); 4106 sub(result, result, Operand(dividend));
4107 } 4107 }
4108 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4108 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4109 add(result, result, Operand(dividend, LSR, 31)); 4109 add(result, result, Operand(dividend, LSR, 31));
4110 } 4110 }
4111 4111
4112 4112
4113 } } // namespace v8::internal 4113 } } // namespace v8::internal
4114 4114
4115 #endif // V8_TARGET_ARCH_ARM 4115 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698