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

Unified Diff: src/compiler/s390/code-generator-s390.cc

Issue 1897373003: S390: [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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/s390/instruction-selector-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/s390/code-generator-s390.cc
diff --git a/src/compiler/s390/code-generator-s390.cc b/src/compiler/s390/code-generator-s390.cc
index 3ebe0827482bd7bc6055c2bb7cde94cbe8dbb68a..bffdc93916f7d68991842d92678693fcb1d11012 100644
--- a/src/compiler/s390/code-generator-s390.cc
+++ b/src/compiler/s390/code-generator-s390.cc
@@ -67,8 +67,8 @@ class S390OperandConverter final : public InstructionOperandConverter {
MemOperand MemoryOperand(AddressingMode* mode, size_t* first_index) {
const size_t index = *first_index;
- *mode = AddressingModeField::decode(instr_->opcode());
- switch (*mode) {
+ if (mode) *mode = AddressingModeField::decode(instr_->opcode());
+ switch (AddressingModeField::decode(instr_->opcode())) {
case kMode_None:
break;
case kMode_MRI:
@@ -82,7 +82,8 @@ class S390OperandConverter final : public InstructionOperandConverter {
return MemOperand(r0);
}
- MemOperand MemoryOperand(AddressingMode* mode, size_t first_index = 0) {
+ MemOperand MemoryOperand(AddressingMode* mode = NULL,
+ size_t first_index = 0) {
return MemoryOperand(mode, &first_index);
}
@@ -1660,6 +1661,22 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
case kCheckedStoreFloat64:
ASSEMBLE_CHECKED_STORE_DOUBLE();
break;
+ case kAtomicLoadInt8:
+ __ LoadB(i.OutputRegister(), i.MemoryOperand());
+ break;
+ case kAtomicLoadUint8:
+ __ LoadlB(i.OutputRegister(), i.MemoryOperand());
+ break;
+ case kAtomicLoadInt16:
+ __ LoadHalfWordP(i.OutputRegister(), i.MemoryOperand());
+ break;
+ case kAtomicLoadUint16:
+ // ASSEMBLE_ATOMIC_LOAD_INTEGER(lhz, lhzx);
JoranSiu 2016/04/19 21:02:49 Can we remove this unnecessary comment?
+ __ llgh(i.OutputRegister(), i.MemoryOperand());
JoranSiu 2016/04/19 21:02:49 Should this be calling LoadLogicialHalfwordP (i.e.
+ break;
+ case kAtomicLoadWord32:
+ __ lgf(i.OutputRegister(), i.MemoryOperand());
JoranSiu 2016/04/19 21:02:49 Should this be Load(): L on 31-bit, LGF on 64-bit
+ break;
default:
UNREACHABLE();
break;
« no previous file with comments | « no previous file | src/compiler/s390/instruction-selector-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698