Index: src/compiler/arm64/instruction-selector-arm64.cc |
diff --git a/src/compiler/arm64/instruction-selector-arm64.cc b/src/compiler/arm64/instruction-selector-arm64.cc |
index 7e47632d4f39177459c0f94607402a0ea6c03c3c..982142b8e0411e94264709bb5cd35bd461295534 100644 |
--- a/src/compiler/arm64/instruction-selector-arm64.cc |
+++ b/src/compiler/arm64/instruction-selector-arm64.cc |
@@ -338,37 +338,36 @@ int32_t LeftShiftForReducedMultiply(Matcher* m) { |
void InstructionSelector::VisitLoad(Node* node) { |
- MachineType rep = RepresentationOf(OpParameter<LoadRepresentation>(node)); |
- MachineType typ = TypeOf(OpParameter<LoadRepresentation>(node)); |
+ LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
Arm64OperandGenerator g(this); |
Node* base = node->InputAt(0); |
Node* index = node->InputAt(1); |
ArchOpcode opcode; |
ImmediateMode immediate_mode = kNoImmediate; |
- switch (rep) { |
- case kRepFloat32: |
+ switch (load_rep.representation()) { |
+ case MachineRepresentation::kFloat32: |
opcode = kArm64LdrS; |
immediate_mode = kLoadStoreImm32; |
break; |
- case kRepFloat64: |
+ case MachineRepresentation::kFloat64: |
opcode = kArm64LdrD; |
immediate_mode = kLoadStoreImm64; |
break; |
- case kRepBit: // Fall through. |
- case kRepWord8: |
- opcode = typ == kTypeInt32 ? kArm64Ldrsb : kArm64Ldrb; |
+ case MachineRepresentation::kBit: // Fall through. |
+ case MachineRepresentation::kWord8: |
+ opcode = load_rep.IsSigned() ? kArm64Ldrsb : kArm64Ldrb; |
immediate_mode = kLoadStoreImm8; |
break; |
- case kRepWord16: |
- opcode = typ == kTypeInt32 ? kArm64Ldrsh : kArm64Ldrh; |
+ case MachineRepresentation::kWord16: |
+ opcode = load_rep.IsSigned() ? kArm64Ldrsh : kArm64Ldrh; |
immediate_mode = kLoadStoreImm16; |
break; |
- case kRepWord32: |
+ case MachineRepresentation::kWord32: |
opcode = kArm64LdrW; |
immediate_mode = kLoadStoreImm32; |
break; |
- case kRepTagged: // Fall through. |
- case kRepWord64: |
+ case MachineRepresentation::kTagged: // Fall through. |
+ case MachineRepresentation::kWord64: |
opcode = kArm64Ldr; |
immediate_mode = kLoadStoreImm64; |
break; |
@@ -394,11 +393,11 @@ void InstructionSelector::VisitStore(Node* node) { |
StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node); |
WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind(); |
- MachineType rep = RepresentationOf(store_rep.machine_type()); |
+ MachineRepresentation rep = store_rep.machine_type().representation(); |
// TODO(arm64): I guess this could be done in a better way. |
if (write_barrier_kind != kNoWriteBarrier) { |
- DCHECK_EQ(kRepTagged, rep); |
+ DCHECK_EQ(MachineRepresentation::kTagged, rep); |
InstructionOperand inputs[3]; |
size_t input_count = 0; |
inputs[input_count++] = g.UseUniqueRegister(base); |
@@ -430,29 +429,29 @@ void InstructionSelector::VisitStore(Node* node) { |
ArchOpcode opcode; |
ImmediateMode immediate_mode = kNoImmediate; |
switch (rep) { |
- case kRepFloat32: |
+ case MachineRepresentation::kFloat32: |
opcode = kArm64StrS; |
immediate_mode = kLoadStoreImm32; |
break; |
- case kRepFloat64: |
+ case MachineRepresentation::kFloat64: |
opcode = kArm64StrD; |
immediate_mode = kLoadStoreImm64; |
break; |
- case kRepBit: // Fall through. |
- case kRepWord8: |
+ case MachineRepresentation::kBit: // Fall through. |
+ case MachineRepresentation::kWord8: |
opcode = kArm64Strb; |
immediate_mode = kLoadStoreImm8; |
break; |
- case kRepWord16: |
+ case MachineRepresentation::kWord16: |
opcode = kArm64Strh; |
immediate_mode = kLoadStoreImm16; |
break; |
- case kRepWord32: |
+ case MachineRepresentation::kWord32: |
opcode = kArm64StrW; |
immediate_mode = kLoadStoreImm32; |
break; |
- case kRepTagged: // Fall through. |
- case kRepWord64: |
+ case MachineRepresentation::kTagged: // Fall through. |
+ case MachineRepresentation::kWord64: |
opcode = kArm64Str; |
immediate_mode = kLoadStoreImm64; |
break; |
@@ -472,30 +471,29 @@ void InstructionSelector::VisitStore(Node* node) { |
void InstructionSelector::VisitCheckedLoad(Node* node) { |
- MachineType rep = RepresentationOf(OpParameter<MachineType>(node)); |
- MachineType typ = TypeOf(OpParameter<MachineType>(node)); |
+ CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op()); |
Arm64OperandGenerator g(this); |
Node* const buffer = node->InputAt(0); |
Node* const offset = node->InputAt(1); |
Node* const length = node->InputAt(2); |
ArchOpcode opcode; |
- switch (rep) { |
- case kRepWord8: |
- opcode = typ == kTypeInt32 ? kCheckedLoadInt8 : kCheckedLoadUint8; |
+ switch (load_rep.representation()) { |
+ case MachineRepresentation::kWord8: |
+ opcode = load_rep.IsSigned() ? kCheckedLoadInt8 : kCheckedLoadUint8; |
break; |
- case kRepWord16: |
- opcode = typ == kTypeInt32 ? kCheckedLoadInt16 : kCheckedLoadUint16; |
+ case MachineRepresentation::kWord16: |
+ opcode = load_rep.IsSigned() ? kCheckedLoadInt16 : kCheckedLoadUint16; |
break; |
- case kRepWord32: |
+ case MachineRepresentation::kWord32: |
opcode = kCheckedLoadWord32; |
break; |
- case kRepWord64: |
+ case MachineRepresentation::kWord64: |
opcode = kCheckedLoadWord64; |
break; |
- case kRepFloat32: |
+ case MachineRepresentation::kFloat32: |
opcode = kCheckedLoadFloat32; |
break; |
- case kRepFloat64: |
+ case MachineRepresentation::kFloat64: |
opcode = kCheckedLoadFloat64; |
break; |
default: |
@@ -508,7 +506,8 @@ void InstructionSelector::VisitCheckedLoad(Node* node) { |
void InstructionSelector::VisitCheckedStore(Node* node) { |
- MachineType rep = RepresentationOf(OpParameter<MachineType>(node)); |
+ MachineRepresentation rep = |
+ CheckedStoreRepresentationOf(node->op()).representation(); |
Arm64OperandGenerator g(this); |
Node* const buffer = node->InputAt(0); |
Node* const offset = node->InputAt(1); |
@@ -516,22 +515,22 @@ void InstructionSelector::VisitCheckedStore(Node* node) { |
Node* const value = node->InputAt(3); |
ArchOpcode opcode; |
switch (rep) { |
- case kRepWord8: |
+ case MachineRepresentation::kWord8: |
opcode = kCheckedStoreWord8; |
break; |
- case kRepWord16: |
+ case MachineRepresentation::kWord16: |
opcode = kCheckedStoreWord16; |
break; |
- case kRepWord32: |
+ case MachineRepresentation::kWord32: |
opcode = kCheckedStoreWord32; |
break; |
- case kRepWord64: |
+ case MachineRepresentation::kWord64: |
opcode = kCheckedStoreWord64; |
break; |
- case kRepFloat32: |
+ case MachineRepresentation::kFloat32: |
opcode = kCheckedStoreFloat32; |
break; |
- case kRepFloat64: |
+ case MachineRepresentation::kFloat64: |
opcode = kCheckedStoreFloat64; |
break; |
default: |