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/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // switching instructions. | 50 // switching instructions. |
51 return Assembler::IsImmLogical(static_cast<uint64_t>(value), 32, | 51 return Assembler::IsImmLogical(static_cast<uint64_t>(value), 32, |
52 &ignored, &ignored, &ignored); | 52 &ignored, &ignored, &ignored); |
53 case kLogical64Imm: | 53 case kLogical64Imm: |
54 return Assembler::IsImmLogical(static_cast<uint64_t>(value), 64, | 54 return Assembler::IsImmLogical(static_cast<uint64_t>(value), 64, |
55 &ignored, &ignored, &ignored); | 55 &ignored, &ignored, &ignored); |
56 case kArithimeticImm: | 56 case kArithimeticImm: |
57 // TODO(dcarney): -values can be handled by instruction swapping | 57 // TODO(dcarney): -values can be handled by instruction swapping |
58 return Assembler::IsImmAddSub(value); | 58 return Assembler::IsImmAddSub(value); |
59 case kShift32Imm: | 59 case kShift32Imm: |
60 return 0 <= value && value < 31; | 60 return 0 <= value && value < 32; |
61 case kShift64Imm: | 61 case kShift64Imm: |
62 return 0 <= value && value < 63; | 62 return 0 <= value && value < 64; |
63 case kLoadStoreImm: | 63 case kLoadStoreImm: |
64 return (0 <= value && value < (1 << 9)) || | 64 return (0 <= value && value < (1 << 9)) || |
65 (-(1 << 6) <= value && value < (1 << 6)); | 65 (-(1 << 6) <= value && value < (1 << 6)); |
66 case kNoImmediate: | 66 case kNoImmediate: |
67 return false; | 67 return false; |
68 } | 68 } |
69 return false; | 69 return false; |
70 } | 70 } |
71 }; | 71 }; |
72 | 72 |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 // Caller clean up of stack for C-style calls. | 671 // Caller clean up of stack for C-style calls. |
672 if (is_c_frame && aligned_push_count > 0) { | 672 if (is_c_frame && aligned_push_count > 0) { |
673 DCHECK(deoptimization == NULL && continuation == NULL); | 673 DCHECK(deoptimization == NULL && continuation == NULL); |
674 Emit(kArm64Drop | MiscField::encode(aligned_push_count), NULL); | 674 Emit(kArm64Drop | MiscField::encode(aligned_push_count), NULL); |
675 } | 675 } |
676 } | 676 } |
677 | 677 |
678 } // namespace compiler | 678 } // namespace compiler |
679 } // namespace internal | 679 } // namespace internal |
680 } // namespace v8 | 680 } // namespace v8 |
OLD | NEW |