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

Side by Side Diff: src/compiler/x64/instruction-codes-x64.h

Issue 615483003: [turbofan] x64 lea multiplication matching (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
OLDNEW
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 #ifndef V8_COMPILER_X64_INSTRUCTION_CODES_X64_H_ 5 #ifndef V8_COMPILER_X64_INSTRUCTION_CODES_X64_H_
6 #define V8_COMPILER_X64_INSTRUCTION_CODES_X64_H_ 6 #define V8_COMPILER_X64_INSTRUCTION_CODES_X64_H_
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 V(X64Movzxbl) \ 61 V(X64Movzxbl) \
62 V(X64Movb) \ 62 V(X64Movb) \
63 V(X64Movsxwl) \ 63 V(X64Movsxwl) \
64 V(X64Movzxwl) \ 64 V(X64Movzxwl) \
65 V(X64Movw) \ 65 V(X64Movw) \
66 V(X64Movl) \ 66 V(X64Movl) \
67 V(X64Movsxlq) \ 67 V(X64Movsxlq) \
68 V(X64Movq) \ 68 V(X64Movq) \
69 V(X64Movsd) \ 69 V(X64Movsd) \
70 V(X64Movss) \ 70 V(X64Movss) \
71 V(X64Lea32) \
72 V(X64Lea) \
71 V(X64Push) \ 73 V(X64Push) \
72 V(X64StoreWriteBarrier) 74 V(X64StoreWriteBarrier)
73 75
74 76
75 // Addressing modes represent the "shape" of inputs to an instruction. 77 // Addressing modes represent the "shape" of inputs to an instruction.
76 // Many instructions support multiple addressing modes. Addressing modes 78 // Many instructions support multiple addressing modes. Addressing modes
77 // are encoded into the InstructionCode of the instruction and tell the 79 // are encoded into the InstructionCode of the instruction and tell the
78 // code generator after register allocation which assembler method to call. 80 // code generator after register allocation which assembler method to call.
79 // 81 //
80 // We use the following local notation for addressing modes: 82 // We use the following local notation for addressing modes:
81 // 83 //
82 // M = memory operand 84 // M = memory operand
83 // R = base register 85 // R = base register
86 // X = base == index register
84 // N = index register * N for N in {1, 2, 4, 8} 87 // N = index register * N for N in {1, 2, 4, 8}
85 // I = immediate displacement (int32_t) 88 // I = immediate displacement (int32_t)
86 89
87 #define TARGET_ADDRESSING_MODE_LIST(V) \ 90 #define TARGET_ADDRESSING_MODE_LIST(V) \
88 V(MR) /* [%r1 ] */ \ 91 V(MR) /* [%r1 ] */ \
89 V(MRI) /* [%r1 + K] */ \ 92 V(MRI) /* [%r1 + K] */ \
90 V(MR1) /* [%r1 + %r2*1 ] */ \ 93 V(MR1) /* [%r1 + %r2*1 ] */ \
91 V(MR2) /* [%r1 + %r2*2 ] */ \ 94 V(MR2) /* [%r1 + %r2*2 ] */ \
92 V(MR4) /* [%r1 + %r2*4 ] */ \ 95 V(MR4) /* [%r1 + %r2*4 ] */ \
93 V(MR8) /* [%r1 + %r2*8 ] */ \ 96 V(MR8) /* [%r1 + %r2*8 ] */ \
97 V(MX1) /* [%r1 + %r1*1 ] */ \
Benedikt Meurer 2014/09/30 04:55:04 Why do we need these additional modes? MXn is just
dcarney 2014/09/30 08:03:22 The number of operands to generated instructions a
Benedikt Meurer 2014/09/30 09:14:21 Well, just specify the same operand twice, that do
98 V(MX2) /* [%r1 + %r1*2 ] */ \
99 V(MX4) /* [%r1 + %r1*4 ] */ \
100 V(MX8) /* [%r1 + %r1*8 ] */ \
94 V(MR1I) /* [%r1 + %r2*1 + K] */ \ 101 V(MR1I) /* [%r1 + %r2*1 + K] */ \
95 V(MR2I) /* [%r1 + %r2*2 + K] */ \ 102 V(MR2I) /* [%r1 + %r2*2 + K] */ \
96 V(MR4I) /* [%r1 + %r2*3 + K] */ \ 103 V(MR4I) /* [%r1 + %r2*3 + K] */ \
97 V(MR8I) /* [%r1 + %r2*4 + K] */ \ 104 V(MR8I) /* [%r1 + %r2*4 + K] */ \
98 V(M1) /* [ %r2*1 ] */ \ 105 V(M1) /* [ %r2*1 ] */ \
99 V(M2) /* [ %r2*2 ] */ \ 106 V(M2) /* [ %r2*2 ] */ \
100 V(M4) /* [ %r2*4 ] */ \ 107 V(M4) /* [ %r2*4 ] */ \
101 V(M8) /* [ %r2*8 ] */ \ 108 V(M8) /* [ %r2*8 ] */ \
102 V(M1I) /* [ %r2*1 + K] */ \ 109 V(M1I) /* [ %r2*1 + K] */ \
103 V(M2I) /* [ %r2*2 + K] */ \ 110 V(M2I) /* [ %r2*2 + K] */ \
104 V(M4I) /* [ %r2*4 + K] */ \ 111 V(M4I) /* [ %r2*4 + K] */ \
105 V(M8I) /* [ %r2*8 + K] */ 112 V(M8I) /* [ %r2*8 + K] */
106 113
107 } // namespace compiler 114 } // namespace compiler
108 } // namespace internal 115 } // namespace internal
109 } // namespace v8 116 } // namespace v8
110 117
111 #endif // V8_COMPILER_X64_INSTRUCTION_CODES_X64_H_ 118 #endif // V8_COMPILER_X64_INSTRUCTION_CODES_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698