| 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 "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } else { \ | 177 } else { \ |
| 178 if (instr->InputAt(1)->IsRegister()) { \ | 178 if (instr->InputAt(1)->IsRegister()) { \ |
| 179 __ asm_instr(i.OutputRegister(), i.InputRegister(1)); \ | 179 __ asm_instr(i.OutputRegister(), i.InputRegister(1)); \ |
| 180 } else { \ | 180 } else { \ |
| 181 __ asm_instr(i.OutputRegister(), i.InputOperand(1)); \ | 181 __ asm_instr(i.OutputRegister(), i.InputOperand(1)); \ |
| 182 } \ | 182 } \ |
| 183 } \ | 183 } \ |
| 184 } while (0) | 184 } while (0) |
| 185 | 185 |
| 186 | 186 |
| 187 #define ASSEMBLE_SHIFT(asm_instr, width) \ | 187 #define ASSEMBLE_SHIFT(asm_instr, width) \ |
| 188 do { \ | 188 do { \ |
| 189 if (HasImmediateInput(instr, 1)) { \ | 189 if (HasImmediateInput(instr, 1)) { \ |
| 190 __ asm_instr(i.OutputRegister(), Immediate(i.InputInt##width(1))); \ | 190 if (instr->Output()->IsRegister()) { \ |
| 191 } else { \ | 191 __ asm_instr(i.OutputRegister(), Immediate(i.InputInt##width(1))); \ |
| 192 __ asm_instr##_cl(i.OutputRegister()); \ | 192 } else { \ |
| 193 } \ | 193 __ asm_instr(i.OutputOperand(), Immediate(i.InputInt##width(1))); \ |
| 194 } \ |
| 195 } else { \ |
| 196 if (instr->Output()->IsRegister()) { \ |
| 197 __ asm_instr##_cl(i.OutputRegister()); \ |
| 198 } else { \ |
| 199 __ asm_instr##_cl(i.OutputOperand()); \ |
| 200 } \ |
| 201 } \ |
| 194 } while (0) | 202 } while (0) |
| 195 | 203 |
| 196 | 204 |
| 197 // Assembles an instruction after register allocation, producing machine code. | 205 // Assembles an instruction after register allocation, producing machine code. |
| 198 void CodeGenerator::AssembleArchInstruction(Instruction* instr) { | 206 void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
| 199 X64OperandConverter i(this, instr); | 207 X64OperandConverter i(this, instr); |
| 200 | 208 |
| 201 switch (ArchOpcodeField::decode(instr->opcode())) { | 209 switch (ArchOpcodeField::decode(instr->opcode())) { |
| 202 case kArchCallCodeObject: { | 210 case kArchCallCodeObject: { |
| 203 EnsureSpaceForLazyDeopt(); | 211 EnsureSpaceForLazyDeopt(); |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 } | 986 } |
| 979 } | 987 } |
| 980 MarkLazyDeoptSite(); | 988 MarkLazyDeoptSite(); |
| 981 } | 989 } |
| 982 | 990 |
| 983 #undef __ | 991 #undef __ |
| 984 | 992 |
| 985 } // namespace internal | 993 } // namespace internal |
| 986 } // namespace compiler | 994 } // namespace compiler |
| 987 } // namespace v8 | 995 } // namespace v8 |
| OLD | NEW |