OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Rrdistribution and use in source and binary forms, with or without | 2 // Rrdistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Rrdistributions of source code must retain the above copyright | 6 // * Rrdistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Rrdistributions in binary form must reproduce the above | 8 // * Rrdistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #include <stdlib.h> | 28 #include <stdlib.h> |
29 | 29 |
30 #include "src/v8.h" | 30 #include "src/v8.h" |
31 | 31 |
32 #include "src/base/platform/platform.h" | 32 #include "src/base/platform/platform.h" |
33 #include "src/code-stubs.h" | 33 #include "src/code-stubs.h" |
34 #include "src/factory.h" | 34 #include "src/factory.h" |
35 #include "src/macro-assembler.h" | 35 #include "src/macro-assembler.h" |
36 #include "src/mips/constants-mips.h" | 36 #include "src/mips/constants-mips.h" |
37 #include "src/register-configuration.h" | |
38 #include "src/simulator.h" | 37 #include "src/simulator.h" |
39 #include "test/cctest/cctest.h" | 38 #include "test/cctest/cctest.h" |
40 #include "test/cctest/test-code-stubs.h" | 39 #include "test/cctest/test-code-stubs.h" |
41 | 40 |
42 using namespace v8::internal; | 41 using namespace v8::internal; |
43 | 42 |
44 #define __ masm. | 43 #define __ masm. |
45 | 44 |
46 ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, | 45 ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, |
47 Register source_reg, | 46 Register source_reg, |
(...skipping 25 matching lines...) Expand all Loading... |
73 __ Move(f12, a0, a1); | 72 __ Move(f12, a0, a1); |
74 } | 73 } |
75 // Push the double argument. | 74 // Push the double argument. |
76 __ Subu(sp, sp, Operand(kDoubleSize)); | 75 __ Subu(sp, sp, Operand(kDoubleSize)); |
77 __ sdc1(f12, MemOperand(sp)); | 76 __ sdc1(f12, MemOperand(sp)); |
78 __ Move(source_reg, sp); | 77 __ Move(source_reg, sp); |
79 | 78 |
80 // Save registers make sure they don't get clobbered. | 79 // Save registers make sure they don't get clobbered. |
81 int source_reg_offset = kDoubleSize; | 80 int source_reg_offset = kDoubleSize; |
82 int reg_num = 2; | 81 int reg_num = 2; |
83 for (; reg_num < Register::kNumRegisters; ++reg_num) { | 82 for (; reg_num < Register::NumAllocatableRegisters(); ++reg_num) { |
84 Register reg = Register::from_code(reg_num); | 83 Register reg = Register::from_code(reg_num); |
85 if (reg.IsAllocatable()) { | 84 if (!reg.is(destination_reg)) { |
86 if (!reg.is(destination_reg)) { | 85 __ push(reg); |
87 __ push(reg); | 86 source_reg_offset += kPointerSize; |
88 source_reg_offset += kPointerSize; | |
89 } | |
90 } | 87 } |
91 } | 88 } |
92 | 89 |
93 // Re-push the double argument. | 90 // Re-push the double argument. |
94 __ Subu(sp, sp, Operand(kDoubleSize)); | 91 __ Subu(sp, sp, Operand(kDoubleSize)); |
95 __ sdc1(f12, MemOperand(sp)); | 92 __ sdc1(f12, MemOperand(sp)); |
96 | 93 |
97 // Call through to the actual stub | 94 // Call through to the actual stub |
98 if (inline_fastpath) { | 95 if (inline_fastpath) { |
99 __ ldc1(f12, MemOperand(source_reg)); | 96 __ ldc1(f12, MemOperand(source_reg)); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 false)); | 187 false)); |
191 RunAllTruncationTests( | 188 RunAllTruncationTests( |
192 RunGeneratedCodeCallWrapper, | 189 RunGeneratedCodeCallWrapper, |
193 MakeConvertDToIFuncTrampoline(isolate, | 190 MakeConvertDToIFuncTrampoline(isolate, |
194 source_registers[s], | 191 source_registers[s], |
195 dest_registers[d], | 192 dest_registers[d], |
196 true)); | 193 true)); |
197 } | 194 } |
198 } | 195 } |
199 } | 196 } |
OLD | NEW |