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

Side by Side Diff: src/ia32/assembler-ia32.cc

Issue 763963002: [turbofan] Add checked load/store operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reapply fix. Created 6 years 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
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | test/cctest/compiler/simplified-graph-builder.h » ('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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 451
452 void Assembler::mov_b(Register dst, const Operand& src) { 452 void Assembler::mov_b(Register dst, const Operand& src) {
453 CHECK(dst.is_byte_register()); 453 CHECK(dst.is_byte_register());
454 EnsureSpace ensure_space(this); 454 EnsureSpace ensure_space(this);
455 EMIT(0x8A); 455 EMIT(0x8A);
456 emit_operand(dst, src); 456 emit_operand(dst, src);
457 } 457 }
458 458
459 459
460 void Assembler::mov_b(const Operand& dst, int8_t imm8) { 460 void Assembler::mov_b(const Operand& dst, const Immediate& src) {
461 EnsureSpace ensure_space(this); 461 EnsureSpace ensure_space(this);
462 EMIT(0xC6); 462 EMIT(0xC6);
463 emit_operand(eax, dst); 463 emit_operand(eax, dst);
464 EMIT(imm8); 464 EMIT(static_cast<int8_t>(src.x_));
465 } 465 }
466 466
467 467
468 void Assembler::mov_b(const Operand& dst, Register src) { 468 void Assembler::mov_b(const Operand& dst, Register src) {
469 CHECK(src.is_byte_register()); 469 CHECK(src.is_byte_register());
470 EnsureSpace ensure_space(this); 470 EnsureSpace ensure_space(this);
471 EMIT(0x88); 471 EMIT(0x88);
472 emit_operand(src, dst); 472 emit_operand(src, dst);
473 } 473 }
474 474
475 475
476 void Assembler::mov_w(Register dst, const Operand& src) { 476 void Assembler::mov_w(Register dst, const Operand& src) {
477 EnsureSpace ensure_space(this); 477 EnsureSpace ensure_space(this);
478 EMIT(0x66); 478 EMIT(0x66);
479 EMIT(0x8B); 479 EMIT(0x8B);
480 emit_operand(dst, src); 480 emit_operand(dst, src);
481 } 481 }
482 482
483 483
484 void Assembler::mov_w(const Operand& dst, Register src) { 484 void Assembler::mov_w(const Operand& dst, Register src) {
485 EnsureSpace ensure_space(this); 485 EnsureSpace ensure_space(this);
486 EMIT(0x66); 486 EMIT(0x66);
487 EMIT(0x89); 487 EMIT(0x89);
488 emit_operand(src, dst); 488 emit_operand(src, dst);
489 } 489 }
490 490
491 491
492 void Assembler::mov_w(const Operand& dst, int16_t imm16) { 492 void Assembler::mov_w(const Operand& dst, const Immediate& src) {
493 EnsureSpace ensure_space(this); 493 EnsureSpace ensure_space(this);
494 EMIT(0x66); 494 EMIT(0x66);
495 EMIT(0xC7); 495 EMIT(0xC7);
496 emit_operand(eax, dst); 496 emit_operand(eax, dst);
497 EMIT(static_cast<int8_t>(imm16 & 0xff)); 497 EMIT(static_cast<int8_t>(src.x_ & 0xff));
498 EMIT(static_cast<int8_t>(imm16 >> 8)); 498 EMIT(static_cast<int8_t>(src.x_ >> 8));
499 } 499 }
500 500
501 501
502 void Assembler::mov(Register dst, int32_t imm32) { 502 void Assembler::mov(Register dst, int32_t imm32) {
503 EnsureSpace ensure_space(this); 503 EnsureSpace ensure_space(this);
504 EMIT(0xB8 | dst.code()); 504 EMIT(0xB8 | dst.code());
505 emit(imm32); 505 emit(imm32);
506 } 506 }
507 507
508 508
(...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2651 fprintf(coverage_log, "%s\n", file_line); 2651 fprintf(coverage_log, "%s\n", file_line);
2652 fflush(coverage_log); 2652 fflush(coverage_log);
2653 } 2653 }
2654 } 2654 }
2655 2655
2656 #endif 2656 #endif
2657 2657
2658 } } // namespace v8::internal 2658 } } // namespace v8::internal
2659 2659
2660 #endif // V8_TARGET_ARCH_IA32 2660 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | test/cctest/compiler/simplified-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698