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/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/arm64/macro-assembler-arm64.h" | 7 #include "src/arm64/macro-assembler-arm64.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 case kArm64Xor: | 236 case kArm64Xor: |
237 __ Eor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); | 237 __ Eor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); |
238 break; | 238 break; |
239 case kArm64Xor32: | 239 case kArm64Xor32: |
240 __ Eor(i.OutputRegister32(), i.InputRegister32(0), i.InputOperand32(1)); | 240 __ Eor(i.OutputRegister32(), i.InputRegister32(0), i.InputOperand32(1)); |
241 break; | 241 break; |
242 case kArm64Sub: | 242 case kArm64Sub: |
243 __ Sub(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); | 243 __ Sub(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); |
244 break; | 244 break; |
245 case kArm64Sub32: | 245 case kArm64Sub32: |
246 __ Sub(i.OutputRegister32(), i.InputRegister32(0), i.InputOperand32(1)); | 246 if (FlagsModeField::decode(opcode) != kFlags_none) { |
| 247 __ Subs(i.OutputRegister32(), i.InputRegister32(0), |
| 248 i.InputOperand32(1)); |
| 249 } else { |
| 250 __ Sub(i.OutputRegister32(), i.InputRegister32(0), i.InputOperand32(1)); |
| 251 } |
247 break; | 252 break; |
248 case kArm64Shl: | 253 case kArm64Shl: |
249 ASSEMBLE_SHIFT(Lsl, 64); | 254 ASSEMBLE_SHIFT(Lsl, 64); |
250 break; | 255 break; |
251 case kArm64Shl32: | 256 case kArm64Shl32: |
252 ASSEMBLE_SHIFT(Lsl, 32); | 257 ASSEMBLE_SHIFT(Lsl, 32); |
253 break; | 258 break; |
254 case kArm64Shr: | 259 case kArm64Shr: |
255 ASSEMBLE_SHIFT(Lsr, 64); | 260 ASSEMBLE_SHIFT(Lsr, 64); |
256 break; | 261 break; |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 v8::internal::Instruction* instr = | 846 v8::internal::Instruction* instr = |
842 reinterpret_cast<v8::internal::Instruction*>(instr_address); | 847 reinterpret_cast<v8::internal::Instruction*>(instr_address); |
843 return instr->IsMovz() && instr->Rd() == xzr.code() && instr->SixtyFourBits(); | 848 return instr->IsMovz() && instr->Rd() == xzr.code() && instr->SixtyFourBits(); |
844 } | 849 } |
845 | 850 |
846 #endif // DEBUG | 851 #endif // DEBUG |
847 | 852 |
848 } // namespace compiler | 853 } // namespace compiler |
849 } // namespace internal | 854 } // namespace internal |
850 } // namespace v8 | 855 } // namespace v8 |
OLD | NEW |