| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 EnsureSpace ensure_space(this); | 567 EnsureSpace ensure_space(this); |
| 568 last_pc_ = pc_; | 568 last_pc_ = pc_; |
| 569 emit(0x66); // Operand size override prefix. | 569 emit(0x66); // Operand size override prefix. |
| 570 emit_optional_rex_32(dst); | 570 emit_optional_rex_32(dst); |
| 571 if (is_int8(src.value_)) { | 571 if (is_int8(src.value_)) { |
| 572 emit(0x83); | 572 emit(0x83); |
| 573 emit_modrm(subcode, dst); | 573 emit_modrm(subcode, dst); |
| 574 emit(src.value_); | 574 emit(src.value_); |
| 575 } else if (dst.is(rax)) { | 575 } else if (dst.is(rax)) { |
| 576 emit(0x05 | (subcode << 3)); | 576 emit(0x05 | (subcode << 3)); |
| 577 emitl(src.value_); | 577 emitw(src.value_); |
| 578 } else { | 578 } else { |
| 579 emit(0x81); | 579 emit(0x81); |
| 580 emit_modrm(subcode, dst); | 580 emit_modrm(subcode, dst); |
| 581 emitl(src.value_); | 581 emitw(src.value_); |
| 582 } | 582 } |
| 583 } | 583 } |
| 584 | 584 |
| 585 | 585 |
| 586 void Assembler::immediate_arithmetic_op_16(byte subcode, | 586 void Assembler::immediate_arithmetic_op_16(byte subcode, |
| 587 const Operand& dst, | 587 const Operand& dst, |
| 588 Immediate src) { | 588 Immediate src) { |
| 589 EnsureSpace ensure_space(this); | 589 EnsureSpace ensure_space(this); |
| 590 last_pc_ = pc_; | 590 last_pc_ = pc_; |
| 591 emit(0x66); // Operand size override prefix. | 591 emit(0x66); // Operand size override prefix. |
| 592 emit_optional_rex_32(dst); | 592 emit_optional_rex_32(dst); |
| 593 if (is_int8(src.value_)) { | 593 if (is_int8(src.value_)) { |
| 594 emit(0x83); | 594 emit(0x83); |
| 595 emit_operand(subcode, dst); | 595 emit_operand(subcode, dst); |
| 596 emit(src.value_); | 596 emit(src.value_); |
| 597 } else { | 597 } else { |
| 598 emit(0x81); | 598 emit(0x81); |
| 599 emit_operand(subcode, dst); | 599 emit_operand(subcode, dst); |
| 600 emitl(src.value_); | 600 emitw(src.value_); |
| 601 } | 601 } |
| 602 } | 602 } |
| 603 | 603 |
| 604 | 604 |
| 605 void Assembler::immediate_arithmetic_op_32(byte subcode, | 605 void Assembler::immediate_arithmetic_op_32(byte subcode, |
| 606 Register dst, | 606 Register dst, |
| 607 Immediate src) { | 607 Immediate src) { |
| 608 EnsureSpace ensure_space(this); | 608 EnsureSpace ensure_space(this); |
| 609 last_pc_ = pc_; | 609 last_pc_ = pc_; |
| 610 emit_optional_rex_32(dst); | 610 emit_optional_rex_32(dst); |
| (...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2222 | 2222 |
| 2223 | 2223 |
| 2224 void Assembler::fucompp() { | 2224 void Assembler::fucompp() { |
| 2225 EnsureSpace ensure_space(this); | 2225 EnsureSpace ensure_space(this); |
| 2226 last_pc_ = pc_; | 2226 last_pc_ = pc_; |
| 2227 emit(0xDA); | 2227 emit(0xDA); |
| 2228 emit(0xE9); | 2228 emit(0xE9); |
| 2229 } | 2229 } |
| 2230 | 2230 |
| 2231 | 2231 |
| 2232 void Assembler::fucomi(int i) { |
| 2233 EnsureSpace ensure_space(this); |
| 2234 last_pc_ = pc_; |
| 2235 emit(0xDB); |
| 2236 emit(0xE8 + i); |
| 2237 } |
| 2238 |
| 2239 |
| 2232 void Assembler::fucomip() { | 2240 void Assembler::fucomip() { |
| 2233 EnsureSpace ensure_space(this); | 2241 EnsureSpace ensure_space(this); |
| 2234 last_pc_ = pc_; | 2242 last_pc_ = pc_; |
| 2235 emit(0xDF); | 2243 emit(0xDF); |
| 2236 emit(0xE9); | 2244 emit(0xE9); |
| 2237 } | 2245 } |
| 2238 | 2246 |
| 2239 | 2247 |
| 2240 void Assembler::fcompp() { | 2248 void Assembler::fcompp() { |
| 2241 EnsureSpace ensure_space(this); | 2249 EnsureSpace ensure_space(this); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2514 written_position_ = current_position_; | 2522 written_position_ = current_position_; |
| 2515 } | 2523 } |
| 2516 } | 2524 } |
| 2517 | 2525 |
| 2518 | 2526 |
| 2519 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | | 2527 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | |
| 2520 1 << RelocInfo::INTERNAL_REFERENCE | | 2528 1 << RelocInfo::INTERNAL_REFERENCE | |
| 2521 1 << RelocInfo::JS_RETURN; | 2529 1 << RelocInfo::JS_RETURN; |
| 2522 | 2530 |
| 2523 } } // namespace v8::internal | 2531 } } // namespace v8::internal |
| OLD | NEW |