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

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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 Node* CodeAssembler::StoreNoWriteBarrier(MachineRepresentation rep, Node* base, 488 Node* CodeAssembler::StoreNoWriteBarrier(MachineRepresentation rep, Node* base,
489 Node* offset, Node* value) { 489 Node* offset, Node* value) {
490 return raw_assembler()->Store(rep, base, offset, value, kNoWriteBarrier); 490 return raw_assembler()->Store(rep, base, offset, value, kNoWriteBarrier);
491 } 491 }
492 492
493 Node* CodeAssembler::AtomicStore(MachineRepresentation rep, Node* base, 493 Node* CodeAssembler::AtomicStore(MachineRepresentation rep, Node* base,
494 Node* offset, Node* value) { 494 Node* offset, Node* value) {
495 return raw_assembler()->AtomicStore(rep, base, offset, value); 495 return raw_assembler()->AtomicStore(rep, base, offset, value);
496 } 496 }
497 497
498 Node* CodeAssembler::AtomicExchange(MachineType type, Node* base, Node* offset, 498 #define ATOMIC_FUNCTION(name) \
499 Node* value) { 499 Node* CodeAssembler::Atomic##name(MachineType type, Node* base, \
500 return raw_assembler()->AtomicExchange(type, base, offset, value); 500 Node* offset, Node* value) { \
501 } 501 return raw_assembler()->Atomic##name(type, base, offset, value); \
502 }
503 ATOMIC_FUNCTION(Exchange);
504 ATOMIC_FUNCTION(Add);
505 ATOMIC_FUNCTION(Sub);
506 ATOMIC_FUNCTION(And);
507 ATOMIC_FUNCTION(Or);
508 ATOMIC_FUNCTION(Xor);
509 #undef ATOMIC_FUNCTION
502 510
503 Node* CodeAssembler::AtomicCompareExchange(MachineType type, Node* base, 511 Node* CodeAssembler::AtomicCompareExchange(MachineType type, Node* base,
504 Node* offset, Node* old_value, 512 Node* offset, Node* old_value,
505 Node* new_value) { 513 Node* new_value) {
506 return raw_assembler()->AtomicCompareExchange(type, base, offset, old_value, 514 return raw_assembler()->AtomicCompareExchange(type, base, offset, old_value,
507 new_value); 515 new_value);
508 } 516 }
509 517
510 Node* CodeAssembler::StoreRoot(Heap::RootListIndex root_index, Node* value) { 518 Node* CodeAssembler::StoreRoot(Heap::RootListIndex root_index, Node* value) {
511 DCHECK(Heap::RootCanBeWrittenAfterInitialization(root_index)); 519 DCHECK(Heap::RootCanBeWrittenAfterInitialization(root_index));
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 } 913 }
906 } 914 }
907 } 915 }
908 916
909 bound_ = true; 917 bound_ = true;
910 } 918 }
911 919
912 } // namespace compiler 920 } // namespace compiler
913 } // namespace internal 921 } // namespace internal
914 } // namespace v8 922 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698