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

Side by Side Diff: src/compiler/code-assembler.cc

Issue 2799863002: [Atomics] use TFJ builtins for atomic add, sub, and, or, and xor (Closed)
Patch Set: [Atomics] use TFJ builtins for atomic add, sub, and, or, and xor Created 3 years, 8 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/compiler/code-assembler.h" 5 #include "src/compiler/code-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 Node* CodeAssembler::StoreNoWriteBarrier(MachineRepresentation rep, Node* base, 509 Node* CodeAssembler::StoreNoWriteBarrier(MachineRepresentation rep, Node* base,
510 Node* offset, Node* value) { 510 Node* offset, Node* value) {
511 return raw_assembler()->Store(rep, base, offset, value, kNoWriteBarrier); 511 return raw_assembler()->Store(rep, base, offset, value, kNoWriteBarrier);
512 } 512 }
513 513
514 Node* CodeAssembler::AtomicStore(MachineRepresentation rep, Node* base, 514 Node* CodeAssembler::AtomicStore(MachineRepresentation rep, Node* base,
515 Node* offset, Node* value) { 515 Node* offset, Node* value) {
516 return raw_assembler()->AtomicStore(rep, base, offset, value); 516 return raw_assembler()->AtomicStore(rep, base, offset, value);
517 } 517 }
518 518
519 Node* CodeAssembler::AtomicExchange(MachineType type, Node* base, Node* offset, 519 #define ATOMIC_FUNCTION(name) \
520 Node* value) { 520 Node* CodeAssembler::Atomic##name(MachineType type, Node* base, \
521 return raw_assembler()->AtomicExchange(type, base, offset, value); 521 Node* offset, Node* value) { \
522 } 522 return raw_assembler()->Atomic##name(type, base, offset, value); \
523 }
524 ATOMIC_FUNCTION(Exchange);
525 ATOMIC_FUNCTION(Add);
526 ATOMIC_FUNCTION(Sub);
527 ATOMIC_FUNCTION(And);
528 ATOMIC_FUNCTION(Or);
529 ATOMIC_FUNCTION(Xor);
530 #undef ATOMIC_FUNCTION
523 531
524 Node* CodeAssembler::AtomicCompareExchange(MachineType type, Node* base, 532 Node* CodeAssembler::AtomicCompareExchange(MachineType type, Node* base,
525 Node* offset, Node* old_value, 533 Node* offset, Node* old_value,
526 Node* new_value) { 534 Node* new_value) {
527 return raw_assembler()->AtomicCompareExchange(type, base, offset, old_value, 535 return raw_assembler()->AtomicCompareExchange(type, base, offset, old_value,
528 new_value); 536 new_value);
529 } 537 }
530 538
531 Node* CodeAssembler::StoreRoot(Heap::RootListIndex root_index, Node* value) { 539 Node* CodeAssembler::StoreRoot(Heap::RootListIndex root_index, Node* value) {
532 DCHECK(Heap::RootCanBeWrittenAfterInitialization(root_index)); 540 DCHECK(Heap::RootCanBeWrittenAfterInitialization(root_index));
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 } 1029 }
1022 } 1030 }
1023 } 1031 }
1024 1032
1025 bound_ = true; 1033 bound_ = true;
1026 } 1034 }
1027 1035
1028 } // namespace compiler 1036 } // namespace compiler
1029 } // namespace internal 1037 } // namespace internal
1030 } // namespace v8 1038 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698