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

Side by Side Diff: src/x64/lithium-gap-resolver-x64.cc

Issue 6873006: X64 tweaks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added movaps and used it instead of movapd. Created 9 years, 8 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 | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution 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 // * Redistributions of source code must retain the above copyright 6 // * Redistributions 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 // * Redistributions in binary form must reproduce the above 8 // * Redistributions 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // Allow top 32 bits of an untagged Integer32 to be arbitrary. 207 // Allow top 32 bits of an untagged Integer32 to be arbitrary.
208 __ movl(dst, Immediate(cgen_->ToInteger32(constant_source))); 208 __ movl(dst, Immediate(cgen_->ToInteger32(constant_source)));
209 } else { 209 } else {
210 __ Move(dst, cgen_->ToHandle(constant_source)); 210 __ Move(dst, cgen_->ToHandle(constant_source));
211 } 211 }
212 } 212 }
213 213
214 } else if (source->IsDoubleRegister()) { 214 } else if (source->IsDoubleRegister()) {
215 XMMRegister src = cgen_->ToDoubleRegister(source); 215 XMMRegister src = cgen_->ToDoubleRegister(source);
216 if (destination->IsDoubleRegister()) { 216 if (destination->IsDoubleRegister()) {
217 __ movsd(cgen_->ToDoubleRegister(destination), src); 217 __ movaps(cgen_->ToDoubleRegister(destination), src);
218 } else { 218 } else {
219 ASSERT(destination->IsDoubleStackSlot()); 219 ASSERT(destination->IsDoubleStackSlot());
220 __ movsd(cgen_->ToOperand(destination), src); 220 __ movsd(cgen_->ToOperand(destination), src);
221 } 221 }
222 } else if (source->IsDoubleStackSlot()) { 222 } else if (source->IsDoubleStackSlot()) {
223 Operand src = cgen_->ToOperand(source); 223 Operand src = cgen_->ToOperand(source);
224 if (destination->IsDoubleRegister()) { 224 if (destination->IsDoubleRegister()) {
225 __ movsd(cgen_->ToDoubleRegister(destination), src); 225 __ movsd(cgen_->ToDoubleRegister(destination), src);
226 } else { 226 } else {
227 ASSERT(destination->IsDoubleStackSlot()); 227 ASSERT(destination->IsDoubleStackSlot());
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 Operand dst = cgen_->ToOperand(destination); 266 Operand dst = cgen_->ToOperand(destination);
267 __ movsd(xmm0, src); 267 __ movsd(xmm0, src);
268 __ movq(kScratchRegister, dst); 268 __ movq(kScratchRegister, dst);
269 __ movsd(dst, xmm0); 269 __ movsd(dst, xmm0);
270 __ movq(src, kScratchRegister); 270 __ movq(src, kScratchRegister);
271 271
272 } else if (source->IsDoubleRegister() && destination->IsDoubleRegister()) { 272 } else if (source->IsDoubleRegister() && destination->IsDoubleRegister()) {
273 // Swap two double registers. 273 // Swap two double registers.
274 XMMRegister source_reg = cgen_->ToDoubleRegister(source); 274 XMMRegister source_reg = cgen_->ToDoubleRegister(source);
275 XMMRegister destination_reg = cgen_->ToDoubleRegister(destination); 275 XMMRegister destination_reg = cgen_->ToDoubleRegister(destination);
276 __ movsd(xmm0, source_reg); 276 __ movaps(xmm0, source_reg);
277 __ movsd(source_reg, destination_reg); 277 __ movaps(source_reg, destination_reg);
278 __ movsd(destination_reg, xmm0); 278 __ movaps(destination_reg, xmm0);
279 279
280 } else if (source->IsDoubleRegister() || destination->IsDoubleRegister()) { 280 } else if (source->IsDoubleRegister() || destination->IsDoubleRegister()) {
281 // Swap a double register and a double stack slot. 281 // Swap a double register and a double stack slot.
282 ASSERT((source->IsDoubleRegister() && destination->IsDoubleStackSlot()) || 282 ASSERT((source->IsDoubleRegister() && destination->IsDoubleStackSlot()) ||
283 (source->IsDoubleStackSlot() && destination->IsDoubleRegister())); 283 (source->IsDoubleStackSlot() && destination->IsDoubleRegister()));
284 XMMRegister reg = cgen_->ToDoubleRegister(source->IsDoubleRegister() 284 XMMRegister reg = cgen_->ToDoubleRegister(source->IsDoubleRegister()
285 ? source 285 ? source
286 : destination); 286 : destination);
287 LOperand* other = source->IsDoubleRegister() ? destination : source; 287 LOperand* other = source->IsDoubleRegister() ? destination : source;
288 ASSERT(other->IsDoubleStackSlot()); 288 ASSERT(other->IsDoubleStackSlot());
(...skipping 22 matching lines...) Expand all
311 moves_[i].set_source(source); 311 moves_[i].set_source(source);
312 } 312 }
313 } 313 }
314 } 314 }
315 315
316 #undef __ 316 #undef __
317 317
318 } } // namespace v8::internal 318 } } // namespace v8::internal
319 319
320 #endif // V8_TARGET_ARCH_X64 320 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698