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

Side by Side Diff: src/arm64/simulator-arm64.cc

Issue 257203002: ARM64: Use the shifter operand to merge in previous shift instructions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address first round of review comments Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698