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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } | 247 } |
248 } | 248 } |
249 | 249 |
250 } else if (source->IsConstantOperand()) { | 250 } else if (source->IsConstantOperand()) { |
251 Operand source_operand = cgen_->ToOperand(source); | 251 Operand source_operand = cgen_->ToOperand(source); |
252 if (destination->IsRegister()) { | 252 if (destination->IsRegister()) { |
253 __ mov(cgen_->ToRegister(destination), source_operand); | 253 __ mov(cgen_->ToRegister(destination), source_operand); |
254 } else { | 254 } else { |
255 ASSERT(destination->IsStackSlot()); | 255 ASSERT(destination->IsStackSlot()); |
256 ASSERT(!in_cycle_); // Constant moves happen after all cycles are gone. | 256 ASSERT(!in_cycle_); // Constant moves happen after all cycles are gone. |
257 MemOperand destination_operand = cgen_->ToMemOperand(destination); | |
258 __ mov(kSavedValueRegister, source_operand); | 257 __ mov(kSavedValueRegister, source_operand); |
259 __ str(kSavedValueRegister, cgen_->ToMemOperand(destination)); | 258 __ str(kSavedValueRegister, cgen_->ToMemOperand(destination)); |
260 } | 259 } |
261 | 260 |
262 } else if (source->IsDoubleRegister()) { | 261 } else if (source->IsDoubleRegister()) { |
263 DoubleRegister source_register = cgen_->ToDoubleRegister(source); | 262 DoubleRegister source_register = cgen_->ToDoubleRegister(source); |
264 if (destination->IsDoubleRegister()) { | 263 if (destination->IsDoubleRegister()) { |
265 __ vmov(cgen_->ToDoubleRegister(destination), source_register); | 264 __ vmov(cgen_->ToDoubleRegister(destination), source_register); |
266 } else { | 265 } else { |
267 ASSERT(destination->IsDoubleStackSlot()); | 266 ASSERT(destination->IsDoubleStackSlot()); |
268 MemOperand destination_operand = cgen_->ToMemOperand(destination); | 267 __ vstr(source_register, cgen_->ToMemOperand(destination)); |
269 __ vstr(source_register, destination_operand); | |
270 } | 268 } |
271 | 269 |
272 } else if (source->IsDoubleStackSlot()) { | 270 } else if (source->IsDoubleStackSlot()) { |
273 MemOperand source_operand = cgen_->ToMemOperand(source); | 271 MemOperand source_operand = cgen_->ToMemOperand(source); |
274 if (destination->IsDoubleRegister()) { | 272 if (destination->IsDoubleRegister()) { |
275 __ vldr(cgen_->ToDoubleRegister(destination), source_operand); | 273 __ vldr(cgen_->ToDoubleRegister(destination), source_operand); |
276 } else { | 274 } else { |
277 ASSERT(destination->IsDoubleStackSlot()); | 275 ASSERT(destination->IsDoubleStackSlot()); |
278 MemOperand destination_operand = cgen_->ToMemOperand(destination); | 276 MemOperand destination_operand = cgen_->ToMemOperand(destination); |
279 if (in_cycle_) { | 277 if (in_cycle_) { |
(...skipping 16 matching lines...) Expand all Loading... |
296 UNREACHABLE(); | 294 UNREACHABLE(); |
297 } | 295 } |
298 | 296 |
299 moves_[index].Eliminate(); | 297 moves_[index].Eliminate(); |
300 } | 298 } |
301 | 299 |
302 | 300 |
303 #undef __ | 301 #undef __ |
304 | 302 |
305 } } // namespace v8::internal | 303 } } // namespace v8::internal |
OLD | NEW |