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

Side by Side Diff: src/compiler/arm/code-generator-arm.cc

Issue 1938213002: [Atomics] Make Atomics.store a builtin using TF (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge again Created 4 years, 7 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
« no previous file with comments | « src/builtins.cc ('k') | src/compiler/arm/instruction-selector-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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/arm/macro-assembler-arm.h" 7 #include "src/arm/macro-assembler-arm.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compiler/code-generator-impl.h" 9 #include "src/compiler/code-generator-impl.h"
10 #include "src/compiler/gap-resolver.h" 10 #include "src/compiler/gap-resolver.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 DCHECK_EQ(LeaveCC, i.OutputSBit()); \ 388 DCHECK_EQ(LeaveCC, i.OutputSBit()); \
389 } while (0) 389 } while (0)
390 390
391 #define ASSEMBLE_ATOMIC_LOAD_INTEGER(asm_instr) \ 391 #define ASSEMBLE_ATOMIC_LOAD_INTEGER(asm_instr) \
392 do { \ 392 do { \
393 __ asm_instr(i.OutputRegister(), \ 393 __ asm_instr(i.OutputRegister(), \
394 MemOperand(i.InputRegister(0), i.InputRegister(1))); \ 394 MemOperand(i.InputRegister(0), i.InputRegister(1))); \
395 __ dmb(ISH); \ 395 __ dmb(ISH); \
396 } while (0) 396 } while (0)
397 397
398 #define ASSEMBLE_ATOMIC_STORE_INTEGER(asm_instr) \
399 do { \
400 __ dmb(ISH); \
401 __ asm_instr(i.InputRegister(2), \
402 MemOperand(i.InputRegister(0), i.InputRegister(1))); \
403 __ dmb(ISH); \
404 } while (0)
405
398 void CodeGenerator::AssembleDeconstructFrame() { 406 void CodeGenerator::AssembleDeconstructFrame() {
399 __ LeaveFrame(StackFrame::MANUAL); 407 __ LeaveFrame(StackFrame::MANUAL);
400 } 408 }
401 409
402 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { 410 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) {
403 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); 411 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta);
404 if (sp_slot_delta > 0) { 412 if (sp_slot_delta > 0) {
405 __ add(sp, sp, Operand(sp_slot_delta * kPointerSize)); 413 __ add(sp, sp, Operand(sp_slot_delta * kPointerSize));
406 } 414 }
407 frame_access_state()->SetFrameAccessToDefault(); 415 frame_access_state()->SetFrameAccessToDefault();
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 break; 1275 break;
1268 case kAtomicLoadInt16: 1276 case kAtomicLoadInt16:
1269 ASSEMBLE_ATOMIC_LOAD_INTEGER(ldrsh); 1277 ASSEMBLE_ATOMIC_LOAD_INTEGER(ldrsh);
1270 break; 1278 break;
1271 case kAtomicLoadUint16: 1279 case kAtomicLoadUint16:
1272 ASSEMBLE_ATOMIC_LOAD_INTEGER(ldrh); 1280 ASSEMBLE_ATOMIC_LOAD_INTEGER(ldrh);
1273 break; 1281 break;
1274 case kAtomicLoadWord32: 1282 case kAtomicLoadWord32:
1275 ASSEMBLE_ATOMIC_LOAD_INTEGER(ldr); 1283 ASSEMBLE_ATOMIC_LOAD_INTEGER(ldr);
1276 break; 1284 break;
1285
1286 case kAtomicStoreWord8:
1287 ASSEMBLE_ATOMIC_STORE_INTEGER(strb);
1288 break;
1289 case kAtomicStoreWord16:
1290 ASSEMBLE_ATOMIC_STORE_INTEGER(strh);
1291 break;
1292 case kAtomicStoreWord32:
1293 ASSEMBLE_ATOMIC_STORE_INTEGER(str);
1294 break;
1277 } 1295 }
1278 return kSuccess; 1296 return kSuccess;
1279 } // NOLINT(readability/fn_size) 1297 } // NOLINT(readability/fn_size)
1280 1298
1281 1299
1282 // Assembles branches after an instruction. 1300 // Assembles branches after an instruction.
1283 void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) { 1301 void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
1284 ArmOperandConverter i(this, instr); 1302 ArmOperandConverter i(this, instr);
1285 Label* tlabel = branch->true_label; 1303 Label* tlabel = branch->true_label;
1286 Label* flabel = branch->false_label; 1304 Label* flabel = branch->false_label;
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 padding_size -= v8::internal::Assembler::kInstrSize; 1699 padding_size -= v8::internal::Assembler::kInstrSize;
1682 } 1700 }
1683 } 1701 }
1684 } 1702 }
1685 1703
1686 #undef __ 1704 #undef __
1687 1705
1688 } // namespace compiler 1706 } // namespace compiler
1689 } // namespace internal 1707 } // namespace internal
1690 } // namespace v8 1708 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/compiler/arm/instruction-selector-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698