OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/ast/scopes.h" | 7 #include "src/ast/scopes.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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 first_unused_stack_slot); | 720 first_unused_stack_slot); |
721 } | 721 } |
722 | 722 |
723 // Assembles an instruction after register allocation, producing machine code. | 723 // Assembles an instruction after register allocation, producing machine code. |
724 CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( | 724 CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
725 Instruction* instr) { | 725 Instruction* instr) { |
726 S390OperandConverter i(this, instr); | 726 S390OperandConverter i(this, instr); |
727 ArchOpcode opcode = ArchOpcodeField::decode(instr->opcode()); | 727 ArchOpcode opcode = ArchOpcodeField::decode(instr->opcode()); |
728 | 728 |
729 switch (opcode) { | 729 switch (opcode) { |
| 730 case kArchComment: { |
| 731 Address comment_string = i.InputExternalReference(0).address(); |
| 732 __ RecordComment(reinterpret_cast<const char*>(comment_string)); |
| 733 break; |
| 734 } |
730 case kArchCallCodeObject: { | 735 case kArchCallCodeObject: { |
731 EnsureSpaceForLazyDeopt(); | 736 EnsureSpaceForLazyDeopt(); |
732 if (HasRegisterInput(instr, 0)) { | 737 if (HasRegisterInput(instr, 0)) { |
733 __ AddP(ip, i.InputRegister(0), | 738 __ AddP(ip, i.InputRegister(0), |
734 Operand(Code::kHeaderSize - kHeapObjectTag)); | 739 Operand(Code::kHeaderSize - kHeapObjectTag)); |
735 __ Call(ip); | 740 __ Call(ip); |
736 } else { | 741 } else { |
737 __ Call(Handle<Code>::cast(i.InputHeapObject(0)), | 742 __ Call(Handle<Code>::cast(i.InputHeapObject(0)), |
738 RelocInfo::CODE_TARGET); | 743 RelocInfo::CODE_TARGET); |
739 } | 744 } |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 #if V8_TARGET_ARCH_S390X | 1216 #if V8_TARGET_ARCH_S390X |
1212 case kS390_Mul64: | 1217 case kS390_Mul64: |
1213 #endif | 1218 #endif |
1214 __ Mul(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); | 1219 __ Mul(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); |
1215 break; | 1220 break; |
1216 case kS390_MulHigh32: | 1221 case kS390_MulHigh32: |
1217 __ LoadRR(r1, i.InputRegister(0)); | 1222 __ LoadRR(r1, i.InputRegister(0)); |
1218 __ mr_z(r0, i.InputRegister(1)); | 1223 __ mr_z(r0, i.InputRegister(1)); |
1219 __ LoadW(i.OutputRegister(), r0); | 1224 __ LoadW(i.OutputRegister(), r0); |
1220 break; | 1225 break; |
| 1226 case kS390_Mul32WithHigh32: |
| 1227 __ LoadRR(r1, i.InputRegister(0)); |
| 1228 __ mr_z(r0, i.InputRegister(1)); |
| 1229 __ LoadW(i.OutputRegister(0), r1); // low |
| 1230 __ LoadW(i.OutputRegister(1), r0); // high |
| 1231 break; |
1221 case kS390_MulHighU32: | 1232 case kS390_MulHighU32: |
1222 __ LoadRR(r1, i.InputRegister(0)); | 1233 __ LoadRR(r1, i.InputRegister(0)); |
1223 __ mlr(r0, i.InputRegister(1)); | 1234 __ mlr(r0, i.InputRegister(1)); |
1224 __ LoadlW(i.OutputRegister(), r0); | 1235 __ LoadlW(i.OutputRegister(), r0); |
1225 break; | 1236 break; |
1226 case kS390_MulFloat: | 1237 case kS390_MulFloat: |
1227 // Ensure we don't clobber right | 1238 // Ensure we don't clobber right |
1228 if (i.OutputDoubleRegister().is(i.InputDoubleRegister(1))) { | 1239 if (i.OutputDoubleRegister().is(i.InputDoubleRegister(1))) { |
1229 ASSEMBLE_FLOAT_UNOP(meebr); | 1240 ASSEMBLE_FLOAT_UNOP(meebr); |
1230 } else { | 1241 } else { |
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2347 padding_size -= 2; | 2358 padding_size -= 2; |
2348 } | 2359 } |
2349 } | 2360 } |
2350 } | 2361 } |
2351 | 2362 |
2352 #undef __ | 2363 #undef __ |
2353 | 2364 |
2354 } // namespace compiler | 2365 } // namespace compiler |
2355 } // namespace internal | 2366 } // namespace internal |
2356 } // namespace v8 | 2367 } // namespace v8 |
OLD | NEW |