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

Side by Side Diff: src/compiler/mips/code-generator-mips.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
« no previous file with comments | « no previous file | src/compiler/mips/instruction-selector-mips.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/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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 Operand(kFloat32ExponentBias + kFloat32MantissaBits)); \ 465 Operand(kFloat32ExponentBias + kFloat32MantissaBits)); \
466 __ mov_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); \ 466 __ mov_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); \
467 __ mode##_w_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); \ 467 __ mode##_w_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); \
468 __ mfc1(at, i.OutputDoubleRegister()); \ 468 __ mfc1(at, i.OutputDoubleRegister()); \
469 __ Branch(USE_DELAY_SLOT, ool->entry(), eq, at, Operand(zero_reg)); \ 469 __ Branch(USE_DELAY_SLOT, ool->entry(), eq, at, Operand(zero_reg)); \
470 __ cvt_s_w(i.OutputDoubleRegister(), i.OutputDoubleRegister()); \ 470 __ cvt_s_w(i.OutputDoubleRegister(), i.OutputDoubleRegister()); \
471 __ bind(ool->exit()); \ 471 __ bind(ool->exit()); \
472 __ bind(&done); \ 472 __ bind(&done); \
473 } 473 }
474 474
475 #define ASSEMBLE_ATOMIC_LOAD_INTEGER(asm_instr) \
476 do { \
477 __ asm_instr(i.OutputRegister(), i.MemoryOperand()); \
478 __ sync(); \
479 } while (0)
480
475 void CodeGenerator::AssembleDeconstructFrame() { 481 void CodeGenerator::AssembleDeconstructFrame() {
476 __ mov(sp, fp); 482 __ mov(sp, fp);
477 __ Pop(ra, fp); 483 __ Pop(ra, fp);
478 } 484 }
479 485
480 void CodeGenerator::AssembleSetupStackPointer() {} 486 void CodeGenerator::AssembleSetupStackPointer() {}
481 487
482 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { 488 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) {
483 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); 489 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta);
484 if (sp_slot_delta > 0) { 490 if (sp_slot_delta > 0) {
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 ASSEMBLE_CHECKED_STORE_FLOAT(Single, swc1); 1324 ASSEMBLE_CHECKED_STORE_FLOAT(Single, swc1);
1319 break; 1325 break;
1320 case kCheckedStoreFloat64: 1326 case kCheckedStoreFloat64:
1321 ASSEMBLE_CHECKED_STORE_FLOAT(Double, sdc1); 1327 ASSEMBLE_CHECKED_STORE_FLOAT(Double, sdc1);
1322 break; 1328 break;
1323 case kCheckedLoadWord64: 1329 case kCheckedLoadWord64:
1324 case kCheckedStoreWord64: 1330 case kCheckedStoreWord64:
1325 UNREACHABLE(); // currently unsupported checked int64 load/store. 1331 UNREACHABLE(); // currently unsupported checked int64 load/store.
1326 break; 1332 break;
1327 case kAtomicLoadInt8: 1333 case kAtomicLoadInt8:
1334 ASSEMBLE_ATOMIC_LOAD_INTEGER(lb);
1335 break;
1328 case kAtomicLoadUint8: 1336 case kAtomicLoadUint8:
1337 ASSEMBLE_ATOMIC_LOAD_INTEGER(lbu);
1338 break;
1329 case kAtomicLoadInt16: 1339 case kAtomicLoadInt16:
1340 ASSEMBLE_ATOMIC_LOAD_INTEGER(lh);
1341 break;
1330 case kAtomicLoadUint16: 1342 case kAtomicLoadUint16:
1343 ASSEMBLE_ATOMIC_LOAD_INTEGER(lhu);
1344 break;
1331 case kAtomicLoadWord32: 1345 case kAtomicLoadWord32:
1332 // TODO(binji): implement 1346 ASSEMBLE_ATOMIC_LOAD_INTEGER(lw);
1333 __ nop();
1334 break; 1347 break;
1335 } 1348 }
1336 } // NOLINT(readability/fn_size) 1349 } // NOLINT(readability/fn_size)
1337 1350
1338 1351
1339 #define UNSUPPORTED_COND(opcode, condition) \ 1352 #define UNSUPPORTED_COND(opcode, condition) \
1340 OFStream out(stdout); \ 1353 OFStream out(stdout); \
1341 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ 1354 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \
1342 UNIMPLEMENTED(); 1355 UNIMPLEMENTED();
1343 1356
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 padding_size -= v8::internal::Assembler::kInstrSize; 1952 padding_size -= v8::internal::Assembler::kInstrSize;
1940 } 1953 }
1941 } 1954 }
1942 } 1955 }
1943 1956
1944 #undef __ 1957 #undef __
1945 1958
1946 } // namespace compiler 1959 } // namespace compiler
1947 } // namespace internal 1960 } // namespace internal
1948 } // namespace v8 1961 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/mips/instruction-selector-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698