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

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

Issue 1895643002: Revert of [Atomics] Remove Atomics code stubs; use TF ops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 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/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/arm64/macro-assembler-arm64.h" 8 #include "src/arm64/macro-assembler-arm64.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler/code-generator-impl.h" 10 #include "src/compiler/code-generator-impl.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 __ asm_instr(i.OutputRegister##width(), i.InputRegister##width(0), \ 465 __ asm_instr(i.OutputRegister##width(), i.InputRegister##width(0), \
466 i.InputRegister##width(1)); \ 466 i.InputRegister##width(1)); \
467 } else { \ 467 } else { \
468 uint32_t imm = \ 468 uint32_t imm = \
469 static_cast<uint32_t>(i.InputOperand##width(1).ImmediateValue()); \ 469 static_cast<uint32_t>(i.InputOperand##width(1).ImmediateValue()); \
470 __ asm_instr(i.OutputRegister##width(), i.InputRegister##width(0), \ 470 __ asm_instr(i.OutputRegister##width(), i.InputRegister##width(0), \
471 imm % (width)); \ 471 imm % (width)); \
472 } \ 472 } \
473 } while (0) 473 } while (0)
474 474
475 #define ASSEMBLE_ATOMIC_LOAD_INTEGER(asm_instr) \
476 do { \
477 __ asm_instr(i.OutputRegister(), \
478 MemOperand(i.InputRegister(0), i.InputRegister(1))); \
479 __ Dmb(InnerShareable, BarrierAll); \
480 } while (0)
481
482 void CodeGenerator::AssembleDeconstructFrame() { 475 void CodeGenerator::AssembleDeconstructFrame() {
483 const CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); 476 const CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
484 if (descriptor->IsCFunctionCall() || descriptor->UseNativeStack()) { 477 if (descriptor->IsCFunctionCall() || descriptor->UseNativeStack()) {
485 __ Mov(csp, fp); 478 __ Mov(csp, fp);
486 } else { 479 } else {
487 __ Mov(jssp, fp); 480 __ Mov(jssp, fp);
488 } 481 }
489 __ Pop(fp, lr); 482 __ Pop(fp, lr);
490 } 483 }
491 484
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 break; 1397 break;
1405 case kCheckedStoreWord64: 1398 case kCheckedStoreWord64:
1406 ASSEMBLE_CHECKED_STORE_INTEGER_64(Str); 1399 ASSEMBLE_CHECKED_STORE_INTEGER_64(Str);
1407 break; 1400 break;
1408 case kCheckedStoreFloat32: 1401 case kCheckedStoreFloat32:
1409 ASSEMBLE_CHECKED_STORE_FLOAT(32); 1402 ASSEMBLE_CHECKED_STORE_FLOAT(32);
1410 break; 1403 break;
1411 case kCheckedStoreFloat64: 1404 case kCheckedStoreFloat64:
1412 ASSEMBLE_CHECKED_STORE_FLOAT(64); 1405 ASSEMBLE_CHECKED_STORE_FLOAT(64);
1413 break; 1406 break;
1414 case kAtomicLoadInt8:
1415 ASSEMBLE_ATOMIC_LOAD_INTEGER(Ldrsb);
1416 break;
1417 case kAtomicLoadUint8:
1418 ASSEMBLE_ATOMIC_LOAD_INTEGER(Ldrb);
1419 break;
1420 case kAtomicLoadInt16:
1421 ASSEMBLE_ATOMIC_LOAD_INTEGER(Ldrsh);
1422 break;
1423 case kAtomicLoadUint16:
1424 ASSEMBLE_ATOMIC_LOAD_INTEGER(Ldrh);
1425 break;
1426 case kAtomicLoadWord32:
1427 __ Ldr(i.OutputRegister32(),
1428 MemOperand(i.InputRegister(0), i.InputRegister(1)));
1429 __ Dmb(InnerShareable, BarrierAll);
1430 break;
1431 } 1407 }
1432 } // NOLINT(readability/fn_size) 1408 } // NOLINT(readability/fn_size)
1433 1409
1434 1410
1435 // Assemble branches after this instruction. 1411 // Assemble branches after this instruction.
1436 void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) { 1412 void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
1437 Arm64OperandConverter i(this, instr); 1413 Arm64OperandConverter i(this, instr);
1438 Label* tlabel = branch->true_label; 1414 Label* tlabel = branch->true_label;
1439 Label* flabel = branch->false_label; 1415 Label* flabel = branch->false_label;
1440 FlagsCondition condition = branch->condition; 1416 FlagsCondition condition = branch->condition;
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 padding_size -= kInstructionSize; 1814 padding_size -= kInstructionSize;
1839 } 1815 }
1840 } 1816 }
1841 } 1817 }
1842 1818
1843 #undef __ 1819 #undef __
1844 1820
1845 } // namespace compiler 1821 } // namespace compiler
1846 } // namespace internal 1822 } // namespace internal
1847 } // namespace v8 1823 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/arm64/instruction-selector-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698