| 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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 sll(zero_reg, nop_rt_reg, type, true); | 627 sll(zero_reg, nop_rt_reg, type, true); |
| 628 } | 628 } |
| 629 | 629 |
| 630 | 630 |
| 631 // --------Branch-and-jump-instructions---------- | 631 // --------Branch-and-jump-instructions---------- |
| 632 // We don't use likely variant of instructions. | 632 // We don't use likely variant of instructions. |
| 633 void b(int16_t offset); | 633 void b(int16_t offset); |
| 634 void b(Label* L) { b(branch_offset(L, false)>>2); } | 634 void b(Label* L) { b(branch_offset(L, false)>>2); } |
| 635 void bal(int16_t offset); | 635 void bal(int16_t offset); |
| 636 void bal(Label* L) { bal(branch_offset(L, false)>>2); } | 636 void bal(Label* L) { bal(branch_offset(L, false)>>2); } |
| 637 void bc(int32_t offset); |
| 638 void bc(Label* L) { bc(branch_offset(L, false) >> 2); } |
| 639 void balc(int32_t offset); |
| 640 void balc(Label* L) { balc(branch_offset(L, false) >> 2); } |
| 637 | 641 |
| 638 void beq(Register rs, Register rt, int16_t offset); | 642 void beq(Register rs, Register rt, int16_t offset); |
| 639 void beq(Register rs, Register rt, Label* L) { | 643 void beq(Register rs, Register rt, Label* L) { |
| 640 beq(rs, rt, branch_offset(L, false) >> 2); | 644 beq(rs, rt, branch_offset(L, false) >> 2); |
| 641 } | 645 } |
| 642 void bgez(Register rs, int16_t offset); | 646 void bgez(Register rs, int16_t offset); |
| 643 void bgezc(Register rt, int16_t offset); | 647 void bgezc(Register rt, int16_t offset); |
| 644 void bgezc(Register rt, Label* L) { | 648 void bgezc(Register rt, Label* L) { |
| 645 bgezc(rt, branch_offset_compact(L, false)>>2); | 649 bgezc(rt, branch_offset_compact(L, false)>>2); |
| 646 } | 650 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 } | 740 } |
| 737 | 741 |
| 738 // Never use the int16_t b(l)cond version with a branch offset | 742 // Never use the int16_t b(l)cond version with a branch offset |
| 739 // instead of using the Label* version. | 743 // instead of using the Label* version. |
| 740 | 744 |
| 741 // Jump targets must be in the current 256 MB-aligned region. i.e. 28 bits. | 745 // Jump targets must be in the current 256 MB-aligned region. i.e. 28 bits. |
| 742 void j(int64_t target); | 746 void j(int64_t target); |
| 743 void jal(int64_t target); | 747 void jal(int64_t target); |
| 744 void jalr(Register rs, Register rd = ra); | 748 void jalr(Register rs, Register rd = ra); |
| 745 void jr(Register target); | 749 void jr(Register target); |
| 746 void j_or_jr(int64_t target, Register rs); | 750 void jic(Register rt, int16_t offset); |
| 747 void jal_or_jalr(int64_t target, Register rs); | 751 void jialc(Register rt, int16_t offset); |
| 748 | 752 |
| 749 | 753 |
| 750 // -------Data-processing-instructions--------- | 754 // -------Data-processing-instructions--------- |
| 751 | 755 |
| 752 // Arithmetic. | 756 // Arithmetic. |
| 753 void addu(Register rd, Register rs, Register rt); | 757 void addu(Register rd, Register rs, Register rt); |
| 754 void subu(Register rd, Register rs, Register rt); | 758 void subu(Register rd, Register rs, Register rt); |
| 755 | 759 |
| 756 void div(Register rs, Register rt); | 760 void div(Register rs, Register rt); |
| 757 void divu(Register rs, Register rt); | 761 void divu(Register rs, Register rt); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 void swl(Register rd, const MemOperand& rs); | 844 void swl(Register rd, const MemOperand& rs); |
| 841 void swr(Register rd, const MemOperand& rs); | 845 void swr(Register rd, const MemOperand& rs); |
| 842 void ldl(Register rd, const MemOperand& rs); | 846 void ldl(Register rd, const MemOperand& rs); |
| 843 void ldr(Register rd, const MemOperand& rs); | 847 void ldr(Register rd, const MemOperand& rs); |
| 844 void sdl(Register rd, const MemOperand& rs); | 848 void sdl(Register rd, const MemOperand& rs); |
| 845 void sdr(Register rd, const MemOperand& rs); | 849 void sdr(Register rd, const MemOperand& rs); |
| 846 void ld(Register rd, const MemOperand& rs); | 850 void ld(Register rd, const MemOperand& rs); |
| 847 void sd(Register rd, const MemOperand& rs); | 851 void sd(Register rd, const MemOperand& rs); |
| 848 | 852 |
| 849 | 853 |
| 854 // ---------PC-Relative-instructions----------- |
| 855 |
| 856 void addiupc(Register rs, int32_t imm19); |
| 857 void lwpc(Register rs, int32_t offset19); |
| 858 void lwupc(Register rs, int32_t offset19); |
| 859 void ldpc(Register rs, int32_t offset18); |
| 860 void auipc(Register rs, int16_t imm16); |
| 861 void aluipc(Register rs, int16_t imm16); |
| 862 |
| 863 |
| 850 // ----------------Prefetch-------------------- | 864 // ----------------Prefetch-------------------- |
| 851 | 865 |
| 852 void pref(int32_t hint, const MemOperand& rs); | 866 void pref(int32_t hint, const MemOperand& rs); |
| 853 | 867 |
| 854 | 868 |
| 855 // -------------Misc-instructions-------------- | 869 // -------------Misc-instructions-------------- |
| 856 | 870 |
| 857 // Break / Trap instructions. | 871 // Break / Trap instructions. |
| 858 void break_(uint32_t code, bool break_as_stop = false); | 872 void break_(uint32_t code, bool break_as_stop = false); |
| 859 void stop(const char* msg, uint32_t code = kMaxStopCode); | 873 void stop(const char* msg, uint32_t code = kMaxStopCode); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 void movf_d(FPURegister fd, FPURegister fs, uint16_t cc); | 916 void movf_d(FPURegister fd, FPURegister fs, uint16_t cc); |
| 903 void movn_s(FPURegister fd, FPURegister fs, Register rt); | 917 void movn_s(FPURegister fd, FPURegister fs, Register rt); |
| 904 void movn_d(FPURegister fd, FPURegister fs, Register rt); | 918 void movn_d(FPURegister fd, FPURegister fs, Register rt); |
| 905 // Bit twiddling. | 919 // Bit twiddling. |
| 906 void clz(Register rd, Register rs); | 920 void clz(Register rd, Register rs); |
| 907 void ins_(Register rt, Register rs, uint16_t pos, uint16_t size); | 921 void ins_(Register rt, Register rs, uint16_t pos, uint16_t size); |
| 908 void ext_(Register rt, Register rs, uint16_t pos, uint16_t size); | 922 void ext_(Register rt, Register rs, uint16_t pos, uint16_t size); |
| 909 void dext_(Register rt, Register rs, uint16_t pos, uint16_t size); | 923 void dext_(Register rt, Register rs, uint16_t pos, uint16_t size); |
| 910 void bitswap(Register rd, Register rt); | 924 void bitswap(Register rd, Register rt); |
| 911 void dbitswap(Register rd, Register rt); | 925 void dbitswap(Register rd, Register rt); |
| 926 void align(Register rd, Register rs, Register rt, uint8_t bp); |
| 927 void dalign(Register rd, Register rs, Register rt, uint8_t bp); |
| 912 | 928 |
| 913 // --------Coprocessor-instructions---------------- | 929 // --------Coprocessor-instructions---------------- |
| 914 | 930 |
| 915 // Load, store, and move. | 931 // Load, store, and move. |
| 916 void lwc1(FPURegister fd, const MemOperand& src); | 932 void lwc1(FPURegister fd, const MemOperand& src); |
| 917 void ldc1(FPURegister fd, const MemOperand& src); | 933 void ldc1(FPURegister fd, const MemOperand& src); |
| 918 | 934 |
| 919 void swc1(FPURegister fs, const MemOperand& dst); | 935 void swc1(FPURegister fs, const MemOperand& dst); |
| 920 void sdc1(FPURegister fs, const MemOperand& dst); | 936 void sdc1(FPURegister fs, const MemOperand& dst); |
| 921 | 937 |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 Register rt, | 1390 Register rt, |
| 1375 int32_t j); | 1391 int32_t j); |
| 1376 void GenInstrImmediate(Opcode opcode, | 1392 void GenInstrImmediate(Opcode opcode, |
| 1377 Register rs, | 1393 Register rs, |
| 1378 SecondaryField SF, | 1394 SecondaryField SF, |
| 1379 int32_t j); | 1395 int32_t j); |
| 1380 void GenInstrImmediate(Opcode opcode, | 1396 void GenInstrImmediate(Opcode opcode, |
| 1381 Register r1, | 1397 Register r1, |
| 1382 FPURegister r2, | 1398 FPURegister r2, |
| 1383 int32_t j); | 1399 int32_t j); |
| 1400 void GenInstrImmediate(Opcode opcode, Register rs, int32_t j); |
| 1401 void GenInstrImmediate(Opcode opcode, int32_t offset26); |
| 1384 | 1402 |
| 1385 | 1403 |
| 1386 void GenInstrJump(Opcode opcode, | 1404 void GenInstrJump(Opcode opcode, |
| 1387 uint32_t address); | 1405 uint32_t address); |
| 1388 | 1406 |
| 1389 // Helpers. | 1407 // Helpers. |
| 1390 void LoadRegPlusOffsetToAt(const MemOperand& src); | 1408 void LoadRegPlusOffsetToAt(const MemOperand& src); |
| 1391 | 1409 |
| 1392 // Labels. | 1410 // Labels. |
| 1393 void print(Label* L); | 1411 void print(Label* L); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1478 class EnsureSpace BASE_EMBEDDED { | 1496 class EnsureSpace BASE_EMBEDDED { |
| 1479 public: | 1497 public: |
| 1480 explicit EnsureSpace(Assembler* assembler) { | 1498 explicit EnsureSpace(Assembler* assembler) { |
| 1481 assembler->CheckBuffer(); | 1499 assembler->CheckBuffer(); |
| 1482 } | 1500 } |
| 1483 }; | 1501 }; |
| 1484 | 1502 |
| 1485 } } // namespace v8::internal | 1503 } } // namespace v8::internal |
| 1486 | 1504 |
| 1487 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 1505 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
| OLD | NEW |