| OLD | NEW |
| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 void movq(Register dst, Register src); | 433 void movq(Register dst, Register src); |
| 434 | 434 |
| 435 // Move 64 bit register value to 64-bit memory location. | 435 // Move 64 bit register value to 64-bit memory location. |
| 436 void movq(const Operand& dst, Register src); | 436 void movq(const Operand& dst, Register src); |
| 437 | 437 |
| 438 // New x64 instructions to load a 64-bit immediate into a register. | 438 // New x64 instructions to load a 64-bit immediate into a register. |
| 439 // All 64-bit immediates must have a relocation mode. | 439 // All 64-bit immediates must have a relocation mode. |
| 440 void movq(Register dst, void* ptr, RelocInfo::Mode rmode); | 440 void movq(Register dst, void* ptr, RelocInfo::Mode rmode); |
| 441 void movq(Register dst, int64_t value, RelocInfo::Mode rmode); | 441 void movq(Register dst, int64_t value, RelocInfo::Mode rmode); |
| 442 void movq(Register dst, const char* s, RelocInfo::Mode rmode); | 442 void movq(Register dst, const char* s, RelocInfo::Mode rmode); |
| 443 void movq(Register dst, const ExternalReference& ext, RelocInfo::Mode rmode); | 443 // Moves the address of the external reference into the register. |
| 444 void movq(Register dst, ExternalReference ext); |
| 444 void movq(Register dst, Handle<Object> handle, RelocInfo::Mode rmode); | 445 void movq(Register dst, Handle<Object> handle, RelocInfo::Mode rmode); |
| 445 | 446 |
| 446 | 447 |
| 447 // New x64 instruction to load from an immediate 64-bit pointer into RAX. | 448 // New x64 instruction to load from an immediate 64-bit pointer into RAX. |
| 448 void load_rax(void* ptr, RelocInfo::Mode rmode); | 449 void load_rax(void* ptr, RelocInfo::Mode rmode); |
| 450 void load_rax(ExternalReference ext); |
| 449 | 451 |
| 450 void movsx_b(Register dst, const Operand& src); | 452 void movsx_b(Register dst, const Operand& src); |
| 451 | 453 |
| 452 void movsx_w(Register dst, const Operand& src); | 454 void movsx_w(Register dst, const Operand& src); |
| 453 | 455 |
| 454 void movzx_b(Register dst, const Operand& src); | 456 void movzx_b(Register dst, const Operand& src); |
| 455 | 457 |
| 456 void movzx_w(Register dst, const Operand& src); | 458 void movzx_w(Register dst, const Operand& src); |
| 457 | 459 |
| 458 // Conditional moves | 460 // Conditional moves |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 } | 611 } |
| 610 | 612 |
| 611 void shr(Register dst, Immediate shift_amount) { | 613 void shr(Register dst, Immediate shift_amount) { |
| 612 shift(dst, shift_amount, 0x5); | 614 shift(dst, shift_amount, 0x5); |
| 613 } | 615 } |
| 614 | 616 |
| 615 void shr(Register dst) { | 617 void shr(Register dst) { |
| 616 shift(dst, 0x5); | 618 shift(dst, 0x5); |
| 617 } | 619 } |
| 618 | 620 |
| 621 void store_rax(void* dst, RelocInfo::Mode mode); |
| 622 void store_rax(ExternalReference ref); |
| 623 |
| 619 void sub(Register dst, Register src) { | 624 void sub(Register dst, Register src) { |
| 620 arithmetic_op(0x2B, dst, src); | 625 arithmetic_op(0x2B, dst, src); |
| 621 } | 626 } |
| 622 | 627 |
| 623 void sub(Register dst, const Operand& src) { | 628 void sub(Register dst, const Operand& src) { |
| 624 arithmetic_op(0x2B, dst, src); | 629 arithmetic_op(0x2B, dst, src); |
| 625 } | 630 } |
| 626 | 631 |
| 627 void sub(const Operand& dst, Register src) { | 632 void sub(const Operand& dst, Register src) { |
| 628 arithmetic_op(0x29, src, dst); | 633 arithmetic_op(0x29, src, dst); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 | 698 |
| 694 void bind(Label* L); // binds an unbound label L to the current code position | 699 void bind(Label* L); // binds an unbound label L to the current code position |
| 695 | 700 |
| 696 // Calls | 701 // Calls |
| 697 // Call near relative 32-bit displacement, relative to next instruction. | 702 // Call near relative 32-bit displacement, relative to next instruction. |
| 698 void call(Label* L); | 703 void call(Label* L); |
| 699 | 704 |
| 700 // Call near absolute indirect, address in register | 705 // Call near absolute indirect, address in register |
| 701 void call(Register adr); | 706 void call(Register adr); |
| 702 | 707 |
| 708 // Call near indirect |
| 709 void call(const Operand& operand); |
| 710 |
| 703 // Jumps | 711 // Jumps |
| 704 // Jump short or near relative. | 712 // Jump short or near relative. |
| 705 void jmp(Label* L); // unconditional jump to L | 713 void jmp(Label* L); // unconditional jump to L |
| 706 | 714 |
| 707 // Jump near absolute indirect (r64) | 715 // Jump near absolute indirect (r64) |
| 708 void jmp(Register adr); | 716 void jmp(Register adr); |
| 709 | 717 |
| 710 // Conditional jumps | 718 // Conditional jumps |
| 711 void j(Condition cc, Label* L); | 719 void j(Condition cc, Label* L); |
| 712 void j(Condition cc, byte* entry, RelocInfo::Mode rmode); | 720 void j(Condition cc, byte* entry, RelocInfo::Mode rmode); |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 private: | 1034 private: |
| 1027 Assembler* assembler_; | 1035 Assembler* assembler_; |
| 1028 #ifdef DEBUG | 1036 #ifdef DEBUG |
| 1029 int space_before_; | 1037 int space_before_; |
| 1030 #endif | 1038 #endif |
| 1031 }; | 1039 }; |
| 1032 | 1040 |
| 1033 } } // namespace v8::internal | 1041 } } // namespace v8::internal |
| 1034 | 1042 |
| 1035 #endif // V8_X64_ASSEMBLER_X64_H_ | 1043 #endif // V8_X64_ASSEMBLER_X64_H_ |
| OLD | NEW |