OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/compilation-info.h" | 7 #include "src/compilation-info.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 178 } |
179 }; | 179 }; |
180 | 180 |
181 | 181 |
182 namespace { | 182 namespace { |
183 | 183 |
184 bool HasImmediateInput(Instruction* instr, size_t index) { | 184 bool HasImmediateInput(Instruction* instr, size_t index) { |
185 return instr->InputAt(index)->IsImmediate(); | 185 return instr->InputAt(index)->IsImmediate(); |
186 } | 186 } |
187 | 187 |
188 class OutOfLineLoadZero final : public OutOfLineCode { | 188 class OutOfLineLoadInteger final : public OutOfLineCode { |
189 public: | 189 public: |
190 OutOfLineLoadZero(CodeGenerator* gen, Register result) | 190 OutOfLineLoadInteger(CodeGenerator* gen, Register result) |
191 : OutOfLineCode(gen), result_(result) {} | 191 : OutOfLineCode(gen), result_(result) {} |
192 | 192 |
193 void Generate() final { __ xor_(result_, result_); } | 193 void Generate() final { __ xor_(result_, result_); } |
194 | 194 |
195 private: | 195 private: |
196 Register const result_; | 196 Register const result_; |
197 }; | 197 }; |
198 | 198 |
199 class OutOfLineLoadFloat32NaN final : public OutOfLineCode { | 199 class OutOfLineLoadFloat32NaN final : public OutOfLineCode { |
200 public: | 200 public: |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 Register const object_; | 278 Register const object_; |
279 Operand const operand_; | 279 Operand const operand_; |
280 Register const value_; | 280 Register const value_; |
281 Register const scratch0_; | 281 Register const scratch0_; |
282 Register const scratch1_; | 282 Register const scratch1_; |
283 RecordWriteMode const mode_; | 283 RecordWriteMode const mode_; |
284 }; | 284 }; |
285 | 285 |
286 } // namespace | 286 } // namespace |
287 | 287 |
288 #define ASSEMBLE_CHECKED_LOAD_FLOAT(asm_instr, OutOfLineLoadNaN, \ | 288 #define ASSEMBLE_CHECKED_LOAD_FLOAT(asm_instr, OutOfLineLoadNaN) \ |
289 SingleOrDouble) \ | 289 do { \ |
290 do { \ | 290 auto result = i.OutputDoubleRegister(); \ |
291 auto result = i.OutputDoubleRegister(); \ | 291 auto offset = i.InputRegister(0); \ |
292 auto index1 = i.InputRegister(1); \ | 292 if (instr->InputAt(1)->IsRegister()) { \ |
293 auto index2 = i.InputInt32(2); \ | 293 __ cmp(offset, i.InputRegister(1)); \ |
294 OutOfLineCode* ool; \ | 294 } else { \ |
295 if (index2 == 0) { \ | 295 __ cmp(offset, i.InputImmediate(1)); \ |
296 if (instr->InputAt(3)->IsRegister()) { \ | 296 } \ |
297 __ cmp(index1, i.InputRegister(3)); \ | 297 OutOfLineCode* ool = new (zone()) OutOfLineLoadNaN(this, result); \ |
298 } else { \ | 298 __ j(above_equal, ool->entry()); \ |
299 __ cmp(index1, i.InputImmediate(3)); \ | 299 __ asm_instr(result, i.MemoryOperand(2)); \ |
300 } \ | 300 __ bind(ool->exit()); \ |
301 ool = new (zone()) OutOfLineLoadNaN(this, result); \ | |
302 } else { \ | |
303 auto length = i.InputInt32(3); \ | |
304 RelocInfo::Mode rmode = i.ToConstant(instr->InputAt(3)).rmode(); \ | |
305 DCHECK_LE(index2, length); \ | |
306 __ cmp(index1, \ | |
307 Immediate(reinterpret_cast<Address>(length - index2), rmode)); \ | |
308 class OutOfLineLoadFloat final : public OutOfLineCode { \ | |
309 public: \ | |
310 OutOfLineLoadFloat(CodeGenerator* gen, XMMRegister result, \ | |
311 Register buffer, Register index1, int32_t index2, \ | |
312 int32_t length, RelocInfo::Mode rmode) \ | |
313 : OutOfLineCode(gen), \ | |
314 result_(result), \ | |
315 buffer_reg_(buffer), \ | |
316 buffer_int_(0), \ | |
317 index1_(index1), \ | |
318 index2_(index2), \ | |
319 length_(length), \ | |
320 rmode_(rmode) {} \ | |
321 \ | |
322 OutOfLineLoadFloat(CodeGenerator* gen, XMMRegister result, \ | |
323 int32_t buffer, Register index1, int32_t index2, \ | |
324 int32_t length, RelocInfo::Mode rmode) \ | |
325 : OutOfLineCode(gen), \ | |
326 result_(result), \ | |
327 buffer_reg_({-1}), \ | |
328 buffer_int_(buffer), \ | |
329 index1_(index1), \ | |
330 index2_(index2), \ | |
331 length_(length), \ | |
332 rmode_(rmode) {} \ | |
333 \ | |
334 void Generate() final { \ | |
335 Label oob; \ | |
336 __ push(index1_); \ | |
337 __ lea(index1_, Operand(index1_, index2_)); \ | |
338 __ cmp(index1_, \ | |
339 Immediate(reinterpret_cast<Address>(length_), rmode_)); \ | |
340 __ j(above_equal, &oob, Label::kNear); \ | |
341 if (buffer_reg_.is_valid()) { \ | |
342 __ asm_instr(result_, Operand(buffer_reg_, index1_, times_1, 0)); \ | |
343 } else { \ | |
344 __ asm_instr(result_, Operand(index1_, buffer_int_)); \ | |
345 } \ | |
346 __ pop(index1_); \ | |
347 __ jmp(exit()); \ | |
348 __ bind(&oob); \ | |
349 __ pop(index1_); \ | |
350 __ xorp##SingleOrDouble(result_, result_); \ | |
351 __ divs##SingleOrDouble(result_, result_); \ | |
352 } \ | |
353 \ | |
354 private: \ | |
355 XMMRegister const result_; \ | |
356 Register const buffer_reg_; \ | |
357 int32_t const buffer_int_; \ | |
358 Register const index1_; \ | |
359 int32_t const index2_; \ | |
360 int32_t const length_; \ | |
361 RelocInfo::Mode rmode_; \ | |
362 }; \ | |
363 if (instr->InputAt(0)->IsRegister()) { \ | |
364 ool = new (zone()) OutOfLineLoadFloat( \ | |
365 this, result, i.InputRegister(0), index1, index2, length, rmode); \ | |
366 } else { \ | |
367 ool = new (zone()) OutOfLineLoadFloat(this, result, i.InputInt32(0), \ | |
368 index1, index2, length, rmode); \ | |
369 } \ | |
370 } \ | |
371 __ j(above_equal, ool->entry()); \ | |
372 if (instr->InputAt(0)->IsRegister()) { \ | |
373 __ asm_instr(result, \ | |
374 Operand(i.InputRegister(0), index1, times_1, index2)); \ | |
375 } else { \ | |
376 __ asm_instr(result, Operand(index1, (i.InputInt32(0) + index2))); \ | |
377 } \ | |
378 __ bind(ool->exit()); \ | |
379 } while (false) | 301 } while (false) |
380 | 302 |
381 #define ASSEMBLE_CHECKED_LOAD_INTEGER(asm_instr) \ | 303 #define ASSEMBLE_CHECKED_LOAD_INTEGER(asm_instr) \ |
382 do { \ | 304 do { \ |
383 auto result = i.OutputRegister(); \ | 305 auto result = i.OutputRegister(); \ |
384 auto index1 = i.InputRegister(1); \ | 306 auto offset = i.InputRegister(0); \ |
385 auto index2 = i.InputInt32(2); \ | 307 if (instr->InputAt(1)->IsRegister()) { \ |
386 OutOfLineCode* ool; \ | 308 __ cmp(offset, i.InputRegister(1)); \ |
387 if (index2 == 0) { \ | 309 } else { \ |
388 if (instr->InputAt(3)->IsRegister()) { \ | 310 __ cmp(offset, i.InputImmediate(1)); \ |
389 __ cmp(index1, i.InputRegister(3)); \ | 311 } \ |
390 } else { \ | 312 OutOfLineCode* ool = new (zone()) OutOfLineLoadInteger(this, result); \ |
391 __ cmp(index1, i.InputImmediate(3)); \ | 313 __ j(above_equal, ool->entry()); \ |
392 } \ | 314 __ asm_instr(result, i.MemoryOperand(2)); \ |
393 ool = new (zone()) OutOfLineLoadZero(this, result); \ | 315 __ bind(ool->exit()); \ |
394 } else { \ | |
395 auto length = i.InputInt32(3); \ | |
396 RelocInfo::Mode rmode = i.ToConstant(instr->InputAt(3)).rmode(); \ | |
397 DCHECK_LE(index2, length); \ | |
398 __ cmp(index1, \ | |
399 Immediate(reinterpret_cast<Address>(length - index2), rmode)); \ | |
400 class OutOfLineLoadInteger final : public OutOfLineCode { \ | |
401 public: \ | |
402 OutOfLineLoadInteger(CodeGenerator* gen, Register result, \ | |
403 Register buffer, Register index1, int32_t index2, \ | |
404 int32_t length, RelocInfo::Mode rmode) \ | |
405 : OutOfLineCode(gen), \ | |
406 result_(result), \ | |
407 buffer_reg_(buffer), \ | |
408 buffer_int_(0), \ | |
409 index1_(index1), \ | |
410 index2_(index2), \ | |
411 length_(length), \ | |
412 rmode_(rmode) {} \ | |
413 \ | |
414 OutOfLineLoadInteger(CodeGenerator* gen, Register result, \ | |
415 int32_t buffer, Register index1, int32_t index2, \ | |
416 int32_t length, RelocInfo::Mode rmode) \ | |
417 : OutOfLineCode(gen), \ | |
418 result_(result), \ | |
419 buffer_reg_({-1}), \ | |
420 buffer_int_(buffer), \ | |
421 index1_(index1), \ | |
422 index2_(index2), \ | |
423 length_(length), \ | |
424 rmode_(rmode) {} \ | |
425 \ | |
426 void Generate() final { \ | |
427 Label oob; \ | |
428 bool need_cache = !result_.is(index1_); \ | |
429 if (need_cache) __ push(index1_); \ | |
430 __ lea(index1_, Operand(index1_, index2_)); \ | |
431 __ cmp(index1_, \ | |
432 Immediate(reinterpret_cast<Address>(length_), rmode_)); \ | |
433 __ j(above_equal, &oob, Label::kNear); \ | |
434 if (buffer_reg_.is_valid()) { \ | |
435 __ asm_instr(result_, Operand(buffer_reg_, index1_, times_1, 0)); \ | |
436 } else { \ | |
437 __ asm_instr(result_, Operand(index1_, buffer_int_)); \ | |
438 } \ | |
439 if (need_cache) __ pop(index1_); \ | |
440 __ jmp(exit()); \ | |
441 __ bind(&oob); \ | |
442 if (need_cache) __ pop(index1_); \ | |
443 __ xor_(result_, result_); \ | |
444 } \ | |
445 \ | |
446 private: \ | |
447 Register const result_; \ | |
448 Register const buffer_reg_; \ | |
449 int32_t const buffer_int_; \ | |
450 Register const index1_; \ | |
451 int32_t const index2_; \ | |
452 int32_t const length_; \ | |
453 RelocInfo::Mode const rmode_; \ | |
454 }; \ | |
455 if (instr->InputAt(0)->IsRegister()) { \ | |
456 ool = new (zone()) OutOfLineLoadInteger( \ | |
457 this, result, i.InputRegister(0), index1, index2, length, rmode); \ | |
458 } else { \ | |
459 ool = new (zone()) OutOfLineLoadInteger( \ | |
460 this, result, i.InputInt32(0), index1, index2, length, rmode); \ | |
461 } \ | |
462 } \ | |
463 __ j(above_equal, ool->entry()); \ | |
464 if (instr->InputAt(0)->IsRegister()) { \ | |
465 __ asm_instr(result, \ | |
466 Operand(i.InputRegister(0), index1, times_1, index2)); \ | |
467 } else { \ | |
468 __ asm_instr(result, Operand(index1, (i.InputInt32(0) + index2))); \ | |
469 } \ | |
470 __ bind(ool->exit()); \ | |
471 } while (false) | 316 } while (false) |
472 | 317 |
473 #define ASSEMBLE_CHECKED_STORE_FLOAT(asm_instr) \ | 318 #define ASSEMBLE_CHECKED_STORE_FLOAT(asm_instr) \ |
474 do { \ | 319 do { \ |
475 auto index1 = i.InputRegister(1); \ | 320 auto offset = i.InputRegister(0); \ |
476 auto index2 = i.InputInt32(2); \ | 321 if (instr->InputAt(1)->IsRegister()) { \ |
477 auto value = i.InputDoubleRegister(4); \ | 322 __ cmp(offset, i.InputRegister(1)); \ |
478 if (index2 == 0) { \ | 323 } else { \ |
479 if (instr->InputAt(3)->IsRegister()) { \ | 324 __ cmp(offset, i.InputImmediate(1)); \ |
480 __ cmp(index1, i.InputRegister(3)); \ | 325 } \ |
481 } else { \ | 326 Label done; \ |
482 __ cmp(index1, i.InputImmediate(3)); \ | 327 __ j(above_equal, &done, Label::kNear); \ |
483 } \ | 328 __ asm_instr(i.MemoryOperand(3), i.InputDoubleRegister(2)); \ |
484 Label done; \ | 329 __ bind(&done); \ |
485 __ j(above_equal, &done, Label::kNear); \ | |
486 if (instr->InputAt(0)->IsRegister()) { \ | |
487 __ asm_instr(Operand(i.InputRegister(0), index1, times_1, index2), \ | |
488 value); \ | |
489 } else { \ | |
490 __ asm_instr(Operand(index1, (i.InputInt32(0) + index2)), value); \ | |
491 } \ | |
492 __ bind(&done); \ | |
493 } else { \ | |
494 auto length = i.InputInt32(3); \ | |
495 RelocInfo::Mode rmode = i.ToConstant(instr->InputAt(3)).rmode(); \ | |
496 DCHECK_LE(index2, length); \ | |
497 __ cmp(index1, \ | |
498 Immediate(reinterpret_cast<Address>(length - index2), rmode)); \ | |
499 class OutOfLineStoreFloat final : public OutOfLineCode { \ | |
500 public: \ | |
501 OutOfLineStoreFloat(CodeGenerator* gen, Register buffer, \ | |
502 Register index1, int32_t index2, int32_t length, \ | |
503 XMMRegister value, RelocInfo::Mode rmode) \ | |
504 : OutOfLineCode(gen), \ | |
505 buffer_reg_(buffer), \ | |
506 buffer_int_(0), \ | |
507 index1_(index1), \ | |
508 index2_(index2), \ | |
509 length_(length), \ | |
510 value_(value), \ | |
511 rmode_(rmode) {} \ | |
512 \ | |
513 OutOfLineStoreFloat(CodeGenerator* gen, int32_t buffer, \ | |
514 Register index1, int32_t index2, int32_t length, \ | |
515 XMMRegister value, RelocInfo::Mode rmode) \ | |
516 : OutOfLineCode(gen), \ | |
517 buffer_reg_({-1}), \ | |
518 buffer_int_(buffer), \ | |
519 index1_(index1), \ | |
520 index2_(index2), \ | |
521 length_(length), \ | |
522 value_(value), \ | |
523 rmode_(rmode) {} \ | |
524 \ | |
525 void Generate() final { \ | |
526 Label oob; \ | |
527 __ push(index1_); \ | |
528 __ lea(index1_, Operand(index1_, index2_)); \ | |
529 __ cmp(index1_, \ | |
530 Immediate(reinterpret_cast<Address>(length_), rmode_)); \ | |
531 __ j(above_equal, &oob, Label::kNear); \ | |
532 if (buffer_reg_.is_valid()) { \ | |
533 __ asm_instr(Operand(buffer_reg_, index1_, times_1, 0), value_); \ | |
534 } else { \ | |
535 __ asm_instr(Operand(index1_, buffer_int_), value_); \ | |
536 } \ | |
537 __ bind(&oob); \ | |
538 __ pop(index1_); \ | |
539 } \ | |
540 \ | |
541 private: \ | |
542 Register const buffer_reg_; \ | |
543 int32_t const buffer_int_; \ | |
544 Register const index1_; \ | |
545 int32_t const index2_; \ | |
546 int32_t const length_; \ | |
547 XMMRegister const value_; \ | |
548 RelocInfo::Mode rmode_; \ | |
549 }; \ | |
550 OutOfLineCode* ool; \ | |
551 if (instr->InputAt(0)->IsRegister()) { \ | |
552 ool = new (zone()) OutOfLineStoreFloat( \ | |
553 this, i.InputRegister(0), index1, index2, length, value, rmode); \ | |
554 } else { \ | |
555 ool = new (zone()) OutOfLineStoreFloat(this, i.InputInt32(0), index1, \ | |
556 index2, length, value, rmode); \ | |
557 } \ | |
558 __ j(above_equal, ool->entry()); \ | |
559 if (instr->InputAt(0)->IsRegister()) { \ | |
560 __ asm_instr(Operand(i.InputRegister(0), index1, times_1, index2), \ | |
561 value); \ | |
562 } else { \ | |
563 __ asm_instr(Operand(index1, (i.InputInt32(0) + index2)), value); \ | |
564 } \ | |
565 __ bind(ool->exit()); \ | |
566 } \ | |
567 } while (false) | 330 } while (false) |
568 | 331 |
569 #define ASSEMBLE_CHECKED_STORE_INTEGER_IMPL(asm_instr, Value) \ | 332 #define ASSEMBLE_CHECKED_STORE_INTEGER(asm_instr) \ |
570 do { \ | 333 do { \ |
571 auto index1 = i.InputRegister(1); \ | 334 auto offset = i.InputRegister(0); \ |
572 auto index2 = i.InputInt32(2); \ | 335 if (instr->InputAt(1)->IsRegister()) { \ |
573 if (index2 == 0) { \ | 336 __ cmp(offset, i.InputRegister(1)); \ |
574 if (instr->InputAt(3)->IsRegister()) { \ | 337 } else { \ |
575 __ cmp(index1, i.InputRegister(3)); \ | 338 __ cmp(offset, i.InputImmediate(1)); \ |
576 } else { \ | 339 } \ |
577 __ cmp(index1, i.InputImmediate(3)); \ | 340 Label done; \ |
578 } \ | 341 __ j(above_equal, &done, Label::kNear); \ |
579 Label done; \ | 342 if (instr->InputAt(2)->IsRegister()) { \ |
580 __ j(above_equal, &done, Label::kNear); \ | 343 __ asm_instr(i.MemoryOperand(3), i.InputRegister(2)); \ |
581 if (instr->InputAt(0)->IsRegister()) { \ | 344 } else { \ |
582 __ asm_instr(Operand(i.InputRegister(0), index1, times_1, index2), \ | 345 __ asm_instr(i.MemoryOperand(3), i.InputImmediate(2)); \ |
583 value); \ | 346 } \ |
584 } else { \ | 347 __ bind(&done); \ |
585 __ asm_instr(Operand(index1, (i.InputInt32(0) + index2)), value); \ | |
586 } \ | |
587 __ bind(&done); \ | |
588 } else { \ | |
589 auto length = i.InputInt32(3); \ | |
590 RelocInfo::Mode rmode = i.ToConstant(instr->InputAt(3)).rmode(); \ | |
591 DCHECK_LE(index2, length); \ | |
592 __ cmp(index1, \ | |
593 Immediate(reinterpret_cast<Address>(length - index2), rmode)); \ | |
594 class OutOfLineStoreInteger final : public OutOfLineCode { \ | |
595 public: \ | |
596 OutOfLineStoreInteger(CodeGenerator* gen, Register buffer, \ | |
597 Register index1, int32_t index2, int32_t length, \ | |
598 Value value, RelocInfo::Mode rmode) \ | |
599 : OutOfLineCode(gen), \ | |
600 buffer_reg_(buffer), \ | |
601 buffer_int_(0), \ | |
602 index1_(index1), \ | |
603 index2_(index2), \ | |
604 length_(length), \ | |
605 value_(value), \ | |
606 rmode_(rmode) {} \ | |
607 \ | |
608 OutOfLineStoreInteger(CodeGenerator* gen, int32_t buffer, \ | |
609 Register index1, int32_t index2, int32_t length, \ | |
610 Value value, RelocInfo::Mode rmode) \ | |
611 : OutOfLineCode(gen), \ | |
612 buffer_reg_({-1}), \ | |
613 buffer_int_(buffer), \ | |
614 index1_(index1), \ | |
615 index2_(index2), \ | |
616 length_(length), \ | |
617 value_(value), \ | |
618 rmode_(rmode) {} \ | |
619 \ | |
620 void Generate() final { \ | |
621 Label oob; \ | |
622 __ push(index1_); \ | |
623 __ lea(index1_, Operand(index1_, index2_)); \ | |
624 __ cmp(index1_, \ | |
625 Immediate(reinterpret_cast<Address>(length_), rmode_)); \ | |
626 __ j(above_equal, &oob, Label::kNear); \ | |
627 if (buffer_reg_.is_valid()) { \ | |
628 __ asm_instr(Operand(buffer_reg_, index1_, times_1, 0), value_); \ | |
629 } else { \ | |
630 __ asm_instr(Operand(index1_, buffer_int_), value_); \ | |
631 } \ | |
632 __ bind(&oob); \ | |
633 __ pop(index1_); \ | |
634 } \ | |
635 \ | |
636 private: \ | |
637 Register const buffer_reg_; \ | |
638 int32_t const buffer_int_; \ | |
639 Register const index1_; \ | |
640 int32_t const index2_; \ | |
641 int32_t const length_; \ | |
642 Value const value_; \ | |
643 RelocInfo::Mode rmode_; \ | |
644 }; \ | |
645 OutOfLineCode* ool; \ | |
646 if (instr->InputAt(0)->IsRegister()) { \ | |
647 ool = new (zone()) OutOfLineStoreInteger( \ | |
648 this, i.InputRegister(0), index1, index2, length, value, rmode); \ | |
649 } else { \ | |
650 ool = new (zone()) OutOfLineStoreInteger( \ | |
651 this, i.InputInt32(0), index1, index2, length, value, rmode); \ | |
652 } \ | |
653 __ j(above_equal, ool->entry()); \ | |
654 if (instr->InputAt(0)->IsRegister()) { \ | |
655 __ asm_instr(Operand(i.InputRegister(0), index1, times_1, index2), \ | |
656 value); \ | |
657 } else { \ | |
658 __ asm_instr(Operand(index1, (i.InputInt32(0) + index2)), value); \ | |
659 } \ | |
660 __ bind(ool->exit()); \ | |
661 } \ | |
662 } while (false) | |
663 | |
664 #define ASSEMBLE_CHECKED_STORE_INTEGER(asm_instr) \ | |
665 do { \ | |
666 if (instr->InputAt(4)->IsRegister()) { \ | |
667 Register value = i.InputRegister(4); \ | |
668 ASSEMBLE_CHECKED_STORE_INTEGER_IMPL(asm_instr, Register); \ | |
669 } else { \ | |
670 Immediate value = i.InputImmediate(4); \ | |
671 ASSEMBLE_CHECKED_STORE_INTEGER_IMPL(asm_instr, Immediate); \ | |
672 } \ | |
673 } while (false) | 348 } while (false) |
674 | 349 |
675 #define ASSEMBLE_COMPARE(asm_instr) \ | 350 #define ASSEMBLE_COMPARE(asm_instr) \ |
676 do { \ | 351 do { \ |
677 if (AddressingModeField::decode(instr->opcode()) != kMode_None) { \ | 352 if (AddressingModeField::decode(instr->opcode()) != kMode_None) { \ |
678 size_t index = 0; \ | 353 size_t index = 0; \ |
679 Operand left = i.MemoryOperand(&index); \ | 354 Operand left = i.MemoryOperand(&index); \ |
680 if (HasImmediateInput(instr, index)) { \ | 355 if (HasImmediateInput(instr, index)) { \ |
681 __ asm_instr(left, i.InputImmediate(index)); \ | 356 __ asm_instr(left, i.InputImmediate(index)); \ |
682 } else { \ | 357 } else { \ |
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 case kCheckedLoadInt16: | 1557 case kCheckedLoadInt16: |
1883 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_w); | 1558 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_w); |
1884 break; | 1559 break; |
1885 case kCheckedLoadUint16: | 1560 case kCheckedLoadUint16: |
1886 ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_w); | 1561 ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_w); |
1887 break; | 1562 break; |
1888 case kCheckedLoadWord32: | 1563 case kCheckedLoadWord32: |
1889 ASSEMBLE_CHECKED_LOAD_INTEGER(mov); | 1564 ASSEMBLE_CHECKED_LOAD_INTEGER(mov); |
1890 break; | 1565 break; |
1891 case kCheckedLoadFloat32: | 1566 case kCheckedLoadFloat32: |
1892 ASSEMBLE_CHECKED_LOAD_FLOAT(movss, OutOfLineLoadFloat32NaN, s); | 1567 ASSEMBLE_CHECKED_LOAD_FLOAT(movss, OutOfLineLoadFloat32NaN); |
1893 break; | 1568 break; |
1894 case kCheckedLoadFloat64: | 1569 case kCheckedLoadFloat64: |
1895 ASSEMBLE_CHECKED_LOAD_FLOAT(movsd, OutOfLineLoadFloat64NaN, d); | 1570 ASSEMBLE_CHECKED_LOAD_FLOAT(movsd, OutOfLineLoadFloat64NaN); |
1896 break; | 1571 break; |
1897 case kCheckedStoreWord8: | 1572 case kCheckedStoreWord8: |
1898 ASSEMBLE_CHECKED_STORE_INTEGER(mov_b); | 1573 ASSEMBLE_CHECKED_STORE_INTEGER(mov_b); |
1899 break; | 1574 break; |
1900 case kCheckedStoreWord16: | 1575 case kCheckedStoreWord16: |
1901 ASSEMBLE_CHECKED_STORE_INTEGER(mov_w); | 1576 ASSEMBLE_CHECKED_STORE_INTEGER(mov_w); |
1902 break; | 1577 break; |
1903 case kCheckedStoreWord32: | 1578 case kCheckedStoreWord32: |
1904 ASSEMBLE_CHECKED_STORE_INTEGER(mov); | 1579 ASSEMBLE_CHECKED_STORE_INTEGER(mov); |
1905 break; | 1580 break; |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2599 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2274 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2600 __ Nop(padding_size); | 2275 __ Nop(padding_size); |
2601 } | 2276 } |
2602 } | 2277 } |
2603 | 2278 |
2604 #undef __ | 2279 #undef __ |
2605 | 2280 |
2606 } // namespace compiler | 2281 } // namespace compiler |
2607 } // namespace internal | 2282 } // namespace internal |
2608 } // namespace v8 | 2283 } // namespace v8 |
OLD | NEW |