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/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 if (handler) { | 1409 if (handler) { |
1410 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); | 1410 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); |
1411 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); | 1411 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); |
1412 if (hint == IfExceptionHint::kLocallyCaught) { | 1412 if (hint == IfExceptionHint::kLocallyCaught) { |
1413 flags |= CallDescriptor::kHasLocalCatchHandler; | 1413 flags |= CallDescriptor::kHasLocalCatchHandler; |
1414 } | 1414 } |
1415 flags |= CallDescriptor::kHasExceptionHandler; | 1415 flags |= CallDescriptor::kHasExceptionHandler; |
1416 buffer.instruction_args.push_back(g.Label(handler)); | 1416 buffer.instruction_args.push_back(g.Label(handler)); |
1417 } | 1417 } |
1418 | 1418 |
| 1419 // (arm64 only) caller uses JSSP but callee might destroy it. |
| 1420 if (descriptor->UseNativeStack() && |
| 1421 !linkage()->GetIncomingDescriptor()->UseNativeStack()) { |
| 1422 flags |= CallDescriptor::kRestoreJSSP; |
| 1423 } |
| 1424 |
| 1425 |
1419 // Select the appropriate opcode based on the call type. | 1426 // Select the appropriate opcode based on the call type. |
1420 InstructionCode opcode = kArchNop; | 1427 InstructionCode opcode = kArchNop; |
1421 switch (descriptor->kind()) { | 1428 switch (descriptor->kind()) { |
1422 case CallDescriptor::kCallAddress: | 1429 case CallDescriptor::kCallAddress: |
1423 opcode = | 1430 opcode = |
1424 kArchCallCFunction | | 1431 kArchCallCFunction | |
1425 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); | 1432 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); |
1426 break; | 1433 break; |
1427 case CallDescriptor::kCallCodeObject: | 1434 case CallDescriptor::kCallCodeObject: |
1428 opcode = kArchCallCodeObject | MiscField::encode(flags); | 1435 opcode = kArchCallCodeObject | MiscField::encode(flags); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 return new (instruction_zone()) FrameStateDescriptor( | 1625 return new (instruction_zone()) FrameStateDescriptor( |
1619 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1626 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1620 state_info.state_combine(), parameters, locals, stack, | 1627 state_info.state_combine(), parameters, locals, stack, |
1621 state_info.shared_info(), outer_state); | 1628 state_info.shared_info(), outer_state); |
1622 } | 1629 } |
1623 | 1630 |
1624 | 1631 |
1625 } // namespace compiler | 1632 } // namespace compiler |
1626 } // namespace internal | 1633 } // namespace internal |
1627 } // namespace v8 | 1634 } // namespace v8 |
OLD | NEW |