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

Side by Side Diff: src/ia32/assembler-ia32-inl.h

Issue 1815213002: Extends testb and cmpb/cmpw instruction support in the ia32 assembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix a copy/pasted erroneous DCHECK. Created 4 years, 9 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
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/ia32/builtins-ia32.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 (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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 void Assembler::emit_code_relative_offset(Label* label) { 444 void Assembler::emit_code_relative_offset(Label* label) {
445 if (label->is_bound()) { 445 if (label->is_bound()) {
446 int32_t pos; 446 int32_t pos;
447 pos = label->pos() + Code::kHeaderSize - kHeapObjectTag; 447 pos = label->pos() + Code::kHeaderSize - kHeapObjectTag;
448 emit(pos); 448 emit(pos);
449 } else { 449 } else {
450 emit_disp(label, Displacement::CODE_RELATIVE); 450 emit_disp(label, Displacement::CODE_RELATIVE);
451 } 451 }
452 } 452 }
453 453
454 void Assembler::emit_b(Immediate x) {
455 DCHECK(x.is_int8() || x.is_uint8());
456 uint8_t value = static_cast<uint8_t>(x.x_);
457 *pc_++ = value;
458 }
454 459
455 void Assembler::emit_w(const Immediate& x) { 460 void Assembler::emit_w(const Immediate& x) {
456 DCHECK(RelocInfo::IsNone(x.rmode_)); 461 DCHECK(RelocInfo::IsNone(x.rmode_));
457 uint16_t value = static_cast<uint16_t>(x.x_); 462 uint16_t value = static_cast<uint16_t>(x.x_);
458 reinterpret_cast<uint16_t*>(pc_)[0] = value; 463 reinterpret_cast<uint16_t*>(pc_)[0] = value;
459 pc_ += sizeof(uint16_t); 464 pc_ += sizeof(uint16_t);
460 } 465 }
461 466
462 467
463 Address Assembler::target_address_at(Address pc, Address constant_pool) { 468 Address Assembler::target_address_at(Address pc, Address constant_pool) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 573
569 Operand::Operand(Immediate imm) { 574 Operand::Operand(Immediate imm) {
570 // [disp/r] 575 // [disp/r]
571 set_modrm(0, ebp); 576 set_modrm(0, ebp);
572 set_dispr(imm.x_, imm.rmode_); 577 set_dispr(imm.x_, imm.rmode_);
573 } 578 }
574 } // namespace internal 579 } // namespace internal
575 } // namespace v8 580 } // namespace v8
576 581
577 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ 582 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698