OLD | NEW |
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/base/bits.h" | 5 #include "src/base/bits.h" |
6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 59 matching lines...) Loading... |
70 return value >= -4095 && value <= 4095; | 70 return value >= -4095 && value <= 4095; |
71 | 71 |
72 case kArmLdrh: | 72 case kArmLdrh: |
73 case kArmLdrsh: | 73 case kArmLdrsh: |
74 case kArmStrh: | 74 case kArmStrh: |
75 return value >= -255 && value <= 255; | 75 return value >= -255 && value <= 255; |
76 | 76 |
77 case kArchCallAddress: | 77 case kArchCallAddress: |
78 case kArchCallCodeObject: | 78 case kArchCallCodeObject: |
79 case kArchCallJSFunction: | 79 case kArchCallJSFunction: |
80 case kArchDeoptimize: | |
81 case kArchDrop: | 80 case kArchDrop: |
82 case kArchJmp: | 81 case kArchJmp: |
83 case kArchNop: | 82 case kArchNop: |
84 case kArchRet: | 83 case kArchRet: |
85 case kArchTruncateDoubleToI: | 84 case kArchTruncateDoubleToI: |
86 case kArmMul: | 85 case kArmMul: |
87 case kArmMla: | 86 case kArmMla: |
88 case kArmMls: | 87 case kArmMls: |
89 case kArmSdiv: | 88 case kArmSdiv: |
90 case kArmUdiv: | 89 case kArmUdiv: |
(...skipping 696 matching lines...) Loading... |
787 frame_state_descriptor = | 786 frame_state_descriptor = |
788 GetFrameStateDescriptor(call->InputAt(descriptor->InputCount())); | 787 GetFrameStateDescriptor(call->InputAt(descriptor->InputCount())); |
789 } | 788 } |
790 | 789 |
791 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); | 790 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); |
792 | 791 |
793 // Compute InstructionOperands for inputs and outputs. | 792 // Compute InstructionOperands for inputs and outputs. |
794 // TODO(turbofan): on ARM64 it's probably better to use the code object in a | 793 // TODO(turbofan): on ARM64 it's probably better to use the code object in a |
795 // register if there are multiple uses of it. Improve constant pool and the | 794 // register if there are multiple uses of it. Improve constant pool and the |
796 // heuristics in the register allocator for where to emit constants. | 795 // heuristics in the register allocator for where to emit constants. |
797 InitializeCallBuffer(call, &buffer, true, false, continuation, | 796 InitializeCallBuffer(call, &buffer, true, false); |
798 deoptimization); | |
799 | 797 |
800 // TODO(dcarney): might be possible to use claim/poke instead | 798 // TODO(dcarney): might be possible to use claim/poke instead |
801 // Push any stack arguments. | 799 // Push any stack arguments. |
802 for (NodeVectorRIter input = buffer.pushed_nodes.rbegin(); | 800 for (NodeVectorRIter input = buffer.pushed_nodes.rbegin(); |
803 input != buffer.pushed_nodes.rend(); input++) { | 801 input != buffer.pushed_nodes.rend(); input++) { |
804 Emit(kArmPush, NULL, g.UseRegister(*input)); | 802 Emit(kArmPush, NULL, g.UseRegister(*input)); |
805 } | 803 } |
806 | 804 |
807 // Select the appropriate opcode based on the call type. | 805 // Select the appropriate opcode based on the call type. |
808 InstructionCode opcode; | 806 InstructionCode opcode; |
(...skipping 145 matching lines...) Loading... |
954 } else { | 952 } else { |
955 DCHECK(cont->IsSet()); | 953 DCHECK(cont->IsSet()); |
956 Emit(cont->Encode(kArmVcmpF64), g.DefineAsRegister(cont->result()), | 954 Emit(cont->Encode(kArmVcmpF64), g.DefineAsRegister(cont->result()), |
957 g.UseRegister(m.left().node()), g.UseRegister(m.right().node())); | 955 g.UseRegister(m.left().node()), g.UseRegister(m.right().node())); |
958 } | 956 } |
959 } | 957 } |
960 | 958 |
961 } // namespace compiler | 959 } // namespace compiler |
962 } // namespace internal | 960 } // namespace internal |
963 } // namespace v8 | 961 } // namespace v8 |
OLD | NEW |