OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <stdlib.h> | 5 #include <stdlib.h> |
6 #include <cmath> | 6 #include <cmath> |
7 #include <cstdarg> | 7 #include <cstdarg> |
8 #include "v8.h" | 8 #include "v8.h" |
9 | 9 |
10 #if V8_TARGET_ARCH_ARM64 | 10 #if V8_TARGET_ARCH_ARM64 |
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1972 case RORV_w: | 1972 case RORV_w: |
1973 case RORV_x: shift_op = ROR; break; | 1973 case RORV_x: shift_op = ROR; break; |
1974 default: UNIMPLEMENTED(); | 1974 default: UNIMPLEMENTED(); |
1975 } | 1975 } |
1976 | 1976 |
1977 unsigned reg_size = instr->SixtyFourBits() ? kXRegSizeInBits | 1977 unsigned reg_size = instr->SixtyFourBits() ? kXRegSizeInBits |
1978 : kWRegSizeInBits; | 1978 : kWRegSizeInBits; |
1979 if (shift_op != NO_SHIFT) { | 1979 if (shift_op != NO_SHIFT) { |
1980 // Shift distance encoded in the least-significant five/six bits of the | 1980 // Shift distance encoded in the least-significant five/six bits of the |
1981 // register. | 1981 // register. |
1982 int mask = (instr->SixtyFourBits() == 1) ? 0x3f : 0x1f; | 1982 int mask = (instr->SixtyFourBits() == 1) ? kShiftAmountXRegMask |
| 1983 : kShiftAmountWRegMask; |
1983 unsigned shift = wreg(instr->Rm()) & mask; | 1984 unsigned shift = wreg(instr->Rm()) & mask; |
1984 result = ShiftOperand(reg_size, reg(reg_size, instr->Rn()), shift_op, | 1985 result = ShiftOperand(reg_size, reg(reg_size, instr->Rn()), shift_op, |
1985 shift); | 1986 shift); |
1986 } | 1987 } |
1987 set_reg(reg_size, instr->Rd(), result); | 1988 set_reg(reg_size, instr->Rd(), result); |
1988 } | 1989 } |
1989 | 1990 |
1990 | 1991 |
1991 // The algorithm used is described in section 8.2 of | 1992 // The algorithm used is described in section 8.2 of |
1992 // Hacker's Delight, by Henry S. Warren, Jr. | 1993 // Hacker's Delight, by Henry S. Warren, Jr. |
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3632 default: | 3633 default: |
3633 UNIMPLEMENTED(); | 3634 UNIMPLEMENTED(); |
3634 } | 3635 } |
3635 } | 3636 } |
3636 | 3637 |
3637 #endif // USE_SIMULATOR | 3638 #endif // USE_SIMULATOR |
3638 | 3639 |
3639 } } // namespace v8::internal | 3640 } } // namespace v8::internal |
3640 | 3641 |
3641 #endif // V8_TARGET_ARCH_ARM64 | 3642 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |