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

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

Issue 169533002: A64: Tidy up Push and Pop TODOs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase after Abort code-size optimizations. Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-assembler-a64.cc ('k') | no next file » | 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 byte* start = stub.GetCode(isolate)->instruction_start(); 58 byte* start = stub.GetCode(isolate)->instruction_start();
59 Label done; 59 Label done;
60 60
61 __ SetStackPointer(csp); 61 __ SetStackPointer(csp);
62 __ PushCalleeSavedRegisters(); 62 __ PushCalleeSavedRegisters();
63 __ Mov(jssp, csp); 63 __ Mov(jssp, csp);
64 __ SetStackPointer(jssp); 64 __ SetStackPointer(jssp);
65 65
66 // Push the double argument. 66 // Push the double argument.
67 __ Push(d0); 67 __ Push(d0);
68 if (!source_reg.is(jssp)) { 68 __ Mov(source_reg, jssp);
69 __ Mov(source_reg, jssp); 69
70 } 70 MacroAssembler::PushPopQueue queue(&masm);
71 71
72 // Save registers make sure they don't get clobbered. 72 // Save registers make sure they don't get clobbered.
73 int source_reg_offset = kDoubleSize; 73 int source_reg_offset = kDoubleSize;
74 int reg_num = 0; 74 int reg_num = 0;
75 for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) { 75 for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) {
76 Register reg = Register::from_code(reg_num); 76 Register reg = Register::from_code(reg_num);
77 if (!reg.is(destination_reg)) { 77 if (!reg.is(destination_reg)) {
78 __ Push(reg); 78 queue.Queue(reg);
79 source_reg_offset += kPointerSize; 79 source_reg_offset += kPointerSize;
80 } 80 }
81 } 81 }
82 // Re-push the double argument.
83 queue.Queue(d0);
82 84
83 // Re-push the double argument. 85 queue.PushQueued();
84 __ Push(d0);
85 86
86 // Call through to the actual stub 87 // Call through to the actual stub
87 if (inline_fastpath) { 88 if (inline_fastpath) {
88 __ Ldr(d0, MemOperand(source_reg)); 89 __ Ldr(d0, MemOperand(source_reg));
89 __ TryInlineTruncateDoubleToI(destination_reg, d0, &done); 90 __ TryInlineTruncateDoubleToI(destination_reg, d0, &done);
90 if (destination_reg.is(source_reg)) { 91 if (destination_reg.is(source_reg)) {
91 // Restore clobbered source_reg. 92 // Restore clobbered source_reg.
92 __ add(source_reg, jssp, Operand(source_reg_offset)); 93 __ add(source_reg, jssp, Operand(source_reg_offset));
93 } 94 }
94 } 95 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 false)); 180 false));
180 RunAllTruncationTests( 181 RunAllTruncationTests(
181 RunGeneratedCodeCallWrapper, 182 RunGeneratedCodeCallWrapper,
182 MakeConvertDToIFuncTrampoline(isolate, 183 MakeConvertDToIFuncTrampoline(isolate,
183 source_registers[s], 184 source_registers[s],
184 dest_registers[d], 185 dest_registers[d],
185 true)); 186 true));
186 } 187 }
187 } 188 }
188 } 189 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-a64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698