| 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 <cmath> | 5 #include <cmath> |
| 6 #include <functional> | 6 #include <functional> |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 compiler::Operator::kNoProperties, // properties | 57 compiler::Operator::kNoProperties, // properties |
| 58 kCalleeSaveRegisters, // callee-saved registers | 58 kCalleeSaveRegisters, // callee-saved registers |
| 59 kCalleeSaveFPRegisters, // callee-saved fp regs | 59 kCalleeSaveFPRegisters, // callee-saved fp regs |
| 60 CallDescriptor::kNoFlags, // flags | 60 CallDescriptor::kNoFlags, // flags |
| 61 "c-call"); | 61 "c-call"); |
| 62 } | 62 } |
| 63 } // namespace | 63 } // namespace |
| 64 | 64 |
| 65 | 65 |
| 66 TEST(ReturnThreeValues) { | 66 TEST(ReturnThreeValues) { |
| 67 base::AccountingAllocator allocator; | 67 v8::internal::AccountingAllocator allocator; |
| 68 Zone zone(&allocator); | 68 Zone zone(&allocator); |
| 69 CallDescriptor* desc = GetCallDescriptor(&zone, 3, 2); | 69 CallDescriptor* desc = GetCallDescriptor(&zone, 3, 2); |
| 70 HandleAndZoneScope handles; | 70 HandleAndZoneScope handles; |
| 71 RawMachineAssembler m(handles.main_isolate(), | 71 RawMachineAssembler m(handles.main_isolate(), |
| 72 new (handles.main_zone()) Graph(handles.main_zone()), | 72 new (handles.main_zone()) Graph(handles.main_zone()), |
| 73 desc, MachineType::PointerRepresentation(), | 73 desc, MachineType::PointerRepresentation(), |
| 74 InstructionSelector::SupportedMachineOperatorFlags()); | 74 InstructionSelector::SupportedMachineOperatorFlags()); |
| 75 | 75 |
| 76 Node* p0 = m.Parameter(0); | 76 Node* p0 = m.Parameter(0); |
| 77 Node* p1 = m.Parameter(1); | 77 Node* p1 = m.Parameter(1); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 106 OFStream os(stdout); | 106 OFStream os(stdout); |
| 107 code2->Disassemble("three_value_call", os); | 107 code2->Disassemble("three_value_call", os); |
| 108 } | 108 } |
| 109 #endif | 109 #endif |
| 110 CHECK_EQ((123 + 456) + (123 - 456) + (123 * 456), mt.Call()); | 110 CHECK_EQ((123 + 456) + (123 - 456) + (123 * 456), mt.Call()); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace compiler | 113 } // namespace compiler |
| 114 } // namespace internal | 114 } // namespace internal |
| 115 } // namespace v8 | 115 } // namespace v8 |
| OLD | NEW |