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

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

Issue 1899783003: MIPS: [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/ast/scopes.h" 5 #include "src/ast/scopes.h"
6 #include "src/compiler/code-generator.h" 6 #include "src/compiler/code-generator.h"
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 Operand(kFloat32ExponentBias + kFloat32MantissaBits)); \ 477 Operand(kFloat32ExponentBias + kFloat32MantissaBits)); \
478 __ mov_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); \ 478 __ mov_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); \
479 __ mode##_w_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); \ 479 __ mode##_w_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); \
480 __ mfc1(at, i.OutputDoubleRegister()); \ 480 __ mfc1(at, i.OutputDoubleRegister()); \
481 __ Branch(USE_DELAY_SLOT, ool->entry(), eq, at, Operand(zero_reg)); \ 481 __ Branch(USE_DELAY_SLOT, ool->entry(), eq, at, Operand(zero_reg)); \
482 __ cvt_s_w(i.OutputDoubleRegister(), i.OutputDoubleRegister()); \ 482 __ cvt_s_w(i.OutputDoubleRegister(), i.OutputDoubleRegister()); \
483 __ bind(ool->exit()); \ 483 __ bind(ool->exit()); \
484 __ bind(&done); \ 484 __ bind(&done); \
485 } 485 }
486 486
487 #define ASSEMBLE_ATOMIC_LOAD_INTEGER(asm_instr) \
488 do { \
489 __ asm_instr(i.OutputRegister(), i.MemoryOperand()); \
490 __ sync(); \
491 } while (0)
492
487 void CodeGenerator::AssembleDeconstructFrame() { 493 void CodeGenerator::AssembleDeconstructFrame() {
488 __ mov(sp, fp); 494 __ mov(sp, fp);
489 __ Pop(ra, fp); 495 __ Pop(ra, fp);
490 } 496 }
491 497
492 void CodeGenerator::AssembleSetupStackPointer() {} 498 void CodeGenerator::AssembleSetupStackPointer() {}
493 499
494 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { 500 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) {
495 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); 501 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta);
496 if (sp_slot_delta > 0) { 502 if (sp_slot_delta > 0) {
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 case kCheckedStoreWord64: 1574 case kCheckedStoreWord64:
1569 ASSEMBLE_CHECKED_STORE_INTEGER(sd); 1575 ASSEMBLE_CHECKED_STORE_INTEGER(sd);
1570 break; 1576 break;
1571 case kCheckedStoreFloat32: 1577 case kCheckedStoreFloat32:
1572 ASSEMBLE_CHECKED_STORE_FLOAT(Single, swc1); 1578 ASSEMBLE_CHECKED_STORE_FLOAT(Single, swc1);
1573 break; 1579 break;
1574 case kCheckedStoreFloat64: 1580 case kCheckedStoreFloat64:
1575 ASSEMBLE_CHECKED_STORE_FLOAT(Double, sdc1); 1581 ASSEMBLE_CHECKED_STORE_FLOAT(Double, sdc1);
1576 break; 1582 break;
1577 case kAtomicLoadInt8: 1583 case kAtomicLoadInt8:
1584 ASSEMBLE_ATOMIC_LOAD_INTEGER(lb);
1585 break;
1578 case kAtomicLoadUint8: 1586 case kAtomicLoadUint8:
1587 ASSEMBLE_ATOMIC_LOAD_INTEGER(lbu);
1588 break;
1579 case kAtomicLoadInt16: 1589 case kAtomicLoadInt16:
1590 ASSEMBLE_ATOMIC_LOAD_INTEGER(lh);
1591 break;
1580 case kAtomicLoadUint16: 1592 case kAtomicLoadUint16:
1593 ASSEMBLE_ATOMIC_LOAD_INTEGER(lhu);
1594 break;
1581 case kAtomicLoadWord32: 1595 case kAtomicLoadWord32:
1582 // TODO(binji): implement 1596 ASSEMBLE_ATOMIC_LOAD_INTEGER(lw);
1583 __ nop();
1584 break; 1597 break;
1585 } 1598 }
1586 } // NOLINT(readability/fn_size) 1599 } // NOLINT(readability/fn_size)
1587 1600
1588 1601
1589 #define UNSUPPORTED_COND(opcode, condition) \ 1602 #define UNSUPPORTED_COND(opcode, condition) \
1590 OFStream out(stdout); \ 1603 OFStream out(stdout); \
1591 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ 1604 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \
1592 UNIMPLEMENTED(); 1605 UNIMPLEMENTED();
1593 1606
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 padding_size -= v8::internal::Assembler::kInstrSize; 2216 padding_size -= v8::internal::Assembler::kInstrSize;
2204 } 2217 }
2205 } 2218 }
2206 } 2219 }
2207 2220
2208 #undef __ 2221 #undef __
2209 2222
2210 } // namespace compiler 2223 } // namespace compiler
2211 } // namespace internal 2224 } // namespace internal
2212 } // namespace v8 2225 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/mips64/instruction-selector-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698