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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 last_pc_ = pc_; | 497 last_pc_ = pc_; |
498 // Opcode FF/4 r64 | 498 // Opcode FF/4 r64 |
499 if (!is_uint3(target.code())) { | 499 if (!is_uint3(target.code())) { |
500 emit_rex_64(target); | 500 emit_rex_64(target); |
501 } | 501 } |
502 emit(0xFF); | 502 emit(0xFF); |
503 emit(0xE0 | target.code() & 0x07); | 503 emit(0xE0 | target.code() & 0x07); |
504 } | 504 } |
505 | 505 |
506 | 506 |
| 507 void Assembler::movl(Register dst, Immediate value) { |
| 508 EnsureSpace ensure_space(this); |
| 509 last_pc_ = pc_; |
| 510 emit_optional_rex_32(dst); |
| 511 emit(0xC7); |
| 512 emit(0xC0 | (dst.code() & 0x7)); |
| 513 emit(value); // Only 32-bit immediates are possible, not 8-bit immediates. |
| 514 } |
| 515 |
| 516 |
507 void Assembler::movq(Register dst, const Operand& src) { | 517 void Assembler::movq(Register dst, const Operand& src) { |
508 EnsureSpace ensure_space(this); | 518 EnsureSpace ensure_space(this); |
509 last_pc_ = pc_; | 519 last_pc_ = pc_; |
510 emit_rex_64(dst, src); | 520 emit_rex_64(dst, src); |
511 emit(0x8B); | 521 emit(0x8B); |
512 emit_operand(dst, src); | 522 emit_operand(dst, src); |
513 } | 523 } |
514 | 524 |
515 | 525 |
516 void Assembler::movq(Register dst, Register src) { | 526 void Assembler::movq(Register dst, Register src) { |
(...skipping 17 matching lines...) Expand all Loading... |
534 | 544 |
535 void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) { | 545 void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) { |
536 EnsureSpace ensure_space(this); | 546 EnsureSpace ensure_space(this); |
537 last_pc_ = pc_; | 547 last_pc_ = pc_; |
538 emit_rex_64(dst); | 548 emit_rex_64(dst); |
539 emit(0xB8 | (dst.code() & 0x7)); | 549 emit(0xB8 | (dst.code() & 0x7)); |
540 emitq(value, rmode); | 550 emitq(value, rmode); |
541 } | 551 } |
542 | 552 |
543 | 553 |
| 554 void Assembler::movq(const Operand& dst, Register src) { |
| 555 EnsureSpace ensure_space(this); |
| 556 last_pc_ = pc_; |
| 557 emit_rex_64(src, dst); |
| 558 emit(0x89); |
| 559 emit_operand(src, dst); |
| 560 } |
| 561 |
| 562 |
544 void Assembler::neg(Register dst) { | 563 void Assembler::neg(Register dst) { |
545 EnsureSpace ensure_space(this); | 564 EnsureSpace ensure_space(this); |
546 last_pc_ = pc_; | 565 last_pc_ = pc_; |
547 emit_rex_64(dst); | 566 emit_rex_64(dst); |
548 emit(0xF7); | 567 emit(0xF7); |
549 emit(0xC0 | (0x3 << 3) | (dst.code() & 0x7)); | 568 emit(0xC0 | (0x3 << 3) | (dst.code() & 0x7)); |
550 } | 569 } |
551 | 570 |
552 | 571 |
553 void Assembler::neg(const Operand& dst) { | 572 void Assembler::neg(const Operand& dst) { |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1115 UNIMPLEMENTED(); | 1134 UNIMPLEMENTED(); |
1116 return NULL; | 1135 return NULL; |
1117 } | 1136 } |
1118 | 1137 |
1119 byte* JavaScriptFrame::GetCallerStackPointer() const { | 1138 byte* JavaScriptFrame::GetCallerStackPointer() const { |
1120 UNIMPLEMENTED(); | 1139 UNIMPLEMENTED(); |
1121 return NULL; | 1140 return NULL; |
1122 } | 1141 } |
1123 | 1142 |
1124 } } // namespace v8::internal | 1143 } } // namespace v8::internal |
OLD | NEW |