| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |