Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: test/cctest/test-code-stubs-mips.cc

Issue 1337023002: MIPS: Save and restore callee-saved FP registers in cctest/ConvertDToI. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/cctest/test-code-stubs-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size)); 55 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size));
56 DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true, 56 DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true,
57 inline_fastpath); 57 inline_fastpath);
58 58
59 byte* start = stub.GetCode()->instruction_start(); 59 byte* start = stub.GetCode()->instruction_start();
60 Label done; 60 Label done;
61 61
62 // Save callee save registers. 62 // Save callee save registers.
63 __ MultiPush(kCalleeSaved | ra.bit()); 63 __ MultiPush(kCalleeSaved | ra.bit());
64 64
65 // Save callee-saved FPU registers.
66 __ MultiPushFPU(kCalleeSavedFPU);
67 // Set up the reserved register for 0.0.
68 __ Move(kDoubleRegZero, 0.0);
69
65 // For softfp, move the input value into f12. 70 // For softfp, move the input value into f12.
66 if (IsMipsSoftFloatABI) { 71 if (IsMipsSoftFloatABI) {
67 __ Move(f12, a0, a1); 72 __ Move(f12, a0, a1);
68 } 73 }
69 // Push the double argument. 74 // Push the double argument.
70 __ Subu(sp, sp, Operand(kDoubleSize)); 75 __ Subu(sp, sp, Operand(kDoubleSize));
71 __ sdc1(f12, MemOperand(sp)); 76 __ sdc1(f12, MemOperand(sp));
72 __ Move(source_reg, sp); 77 __ Move(source_reg, sp);
73 78
74 // Save registers make sure they don't get clobbered. 79 // Save registers make sure they don't get clobbered.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 115 }
111 } 116 }
112 117
113 __ Addu(sp, sp, Operand(kDoubleSize)); 118 __ Addu(sp, sp, Operand(kDoubleSize));
114 119
115 __ Move(v0, destination_reg); 120 __ Move(v0, destination_reg);
116 Label ok; 121 Label ok;
117 __ Branch(&ok, eq, v0, Operand(zero_reg)); 122 __ Branch(&ok, eq, v0, Operand(zero_reg));
118 __ bind(&ok); 123 __ bind(&ok);
119 124
125 // Restore callee-saved FPU registers.
126 __ MultiPopFPU(kCalleeSavedFPU);
127
120 // Restore callee save registers. 128 // Restore callee save registers.
121 __ MultiPop(kCalleeSaved | ra.bit()); 129 __ MultiPop(kCalleeSaved | ra.bit());
122 130
123 Label ok1; 131 Label ok1;
124 __ Branch(&ok1, eq, v0, Operand(zero_reg)); 132 __ Branch(&ok1, eq, v0, Operand(zero_reg));
125 __ bind(&ok1); 133 __ bind(&ok1);
126 __ Ret(); 134 __ Ret();
127 135
128 CodeDesc desc; 136 CodeDesc desc;
129 masm.GetCode(&desc); 137 masm.GetCode(&desc);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 false)); 187 false));
180 RunAllTruncationTests( 188 RunAllTruncationTests(
181 RunGeneratedCodeCallWrapper, 189 RunGeneratedCodeCallWrapper,
182 MakeConvertDToIFuncTrampoline(isolate, 190 MakeConvertDToIFuncTrampoline(isolate,
183 source_registers[s], 191 source_registers[s],
184 dest_registers[d], 192 dest_registers[d],
185 true)); 193 true));
186 } 194 }
187 } 195 }
188 } 196 }
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698