Chromium Code Reviews| 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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 638 sll(zero_reg, nop_rt_reg, type, true); | 638 sll(zero_reg, nop_rt_reg, type, true); |
| 639 } | 639 } |
| 640 | 640 |
| 641 | 641 |
| 642 // --------Branch-and-jump-instructions---------- | 642 // --------Branch-and-jump-instructions---------- |
| 643 // We don't use likely variant of instructions. | 643 // We don't use likely variant of instructions. |
| 644 void b(int16_t offset); | 644 void b(int16_t offset); |
| 645 void b(Label* L) { b(branch_offset(L, false)>>2); } | 645 void b(Label* L) { b(branch_offset(L, false)>>2); } |
| 646 void bal(int16_t offset); | 646 void bal(int16_t offset); |
| 647 void bal(Label* L) { bal(branch_offset(L, false)>>2); } | 647 void bal(Label* L) { bal(branch_offset(L, false)>>2); } |
| 648 void bc(int32_t offset); | |
| 649 void bc(Label* L) { bc(branch_offset(L, false) >> 2); } | |
| 650 void balc(int32_t offset); | |
| 651 void balc(Label* L) { balc(branch_offset(L, false) >> 2); } | |
| 648 | 652 |
| 649 void beq(Register rs, Register rt, int16_t offset); | 653 void beq(Register rs, Register rt, int16_t offset); |
| 650 void beq(Register rs, Register rt, Label* L) { | 654 void beq(Register rs, Register rt, Label* L) { |
| 651 beq(rs, rt, branch_offset(L, false) >> 2); | 655 beq(rs, rt, branch_offset(L, false) >> 2); |
| 652 } | 656 } |
| 653 void bgez(Register rs, int16_t offset); | 657 void bgez(Register rs, int16_t offset); |
| 654 void bgezc(Register rt, int16_t offset); | 658 void bgezc(Register rt, int16_t offset); |
| 655 void bgezc(Register rt, Label* L) { | 659 void bgezc(Register rt, Label* L) { |
| 656 bgezc(rt, branch_offset_compact(L, false)>>2); | 660 bgezc(rt, branch_offset_compact(L, false)>>2); |
| 657 } | 661 } |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 741 bovc(rs, rt, branch_offset_compact(L, false)>>2); | 745 bovc(rs, rt, branch_offset_compact(L, false)>>2); |
| 742 } | 746 } |
| 743 void bnvc(Register rs, Register rt, int16_t offset); | 747 void bnvc(Register rs, Register rt, int16_t offset); |
| 744 void bnvc(Register rs, Register rt, Label* L) { | 748 void bnvc(Register rs, Register rt, Label* L) { |
| 745 bnvc(rs, rt, branch_offset_compact(L, false)>>2); | 749 bnvc(rs, rt, branch_offset_compact(L, false)>>2); |
| 746 } | 750 } |
| 747 | 751 |
| 748 // Never use the int16_t b(l)cond version with a branch offset | 752 // Never use the int16_t b(l)cond version with a branch offset |
| 749 // instead of using the Label* version. | 753 // instead of using the Label* version. |
| 750 | 754 |
| 751 // Jump targets must be in the current 256 MB-aligned region. i.e. 28 bits. | 755 // Jump targets must be in the current 256 MB-aligned region. i.e. 28 bits. |
|
paul.l...
2015/06/10 03:49:25
This comment goes only with the first 2 instructio
| |
| 752 void j(int32_t target); | 756 void j(int32_t target); |
| 753 void jal(int32_t target); | 757 void jal(int32_t target); |
| 754 void jalr(Register rs, Register rd = ra); | 758 void jalr(Register rs, Register rd = ra); |
| 755 void jr(Register target); | 759 void jr(Register target); |
| 756 void j_or_jr(int32_t target, Register rs); | 760 void j_or_jr(int32_t target, Register rs); |
| 757 void jal_or_jalr(int32_t target, Register rs); | 761 void jal_or_jalr(int32_t target, Register rs); |
|
paul.l...
2015/06/10 03:49:25
These 2 j_or_jr/jal_or_jalr do not appear to be us
ilija.pavlovic
2015/06/12 09:51:32
These two functions are removed.
ilija.pavlovic
2015/06/12 09:51:32
Done.
| |
| 762 void jic(Register rt, int16_t offset); | |
| 763 void jialc(Register rt, int16_t offset); | |
| 758 | 764 |
| 759 | 765 |
| 760 // -------Data-processing-instructions--------- | 766 // -------Data-processing-instructions--------- |
| 761 | 767 |
| 762 // Arithmetic. | 768 // Arithmetic. |
| 763 void addu(Register rd, Register rs, Register rt); | 769 void addu(Register rd, Register rs, Register rt); |
| 764 void subu(Register rd, Register rs, Register rt); | 770 void subu(Register rd, Register rs, Register rt); |
| 765 void mult(Register rs, Register rt); | 771 void mult(Register rs, Register rt); |
| 766 void multu(Register rs, Register rt); | 772 void multu(Register rs, Register rt); |
| 767 void div(Register rs, Register rt); | 773 void div(Register rs, Register rt); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 812 void lw(Register rd, const MemOperand& rs); | 818 void lw(Register rd, const MemOperand& rs); |
| 813 void lwl(Register rd, const MemOperand& rs); | 819 void lwl(Register rd, const MemOperand& rs); |
| 814 void lwr(Register rd, const MemOperand& rs); | 820 void lwr(Register rd, const MemOperand& rs); |
| 815 void sb(Register rd, const MemOperand& rs); | 821 void sb(Register rd, const MemOperand& rs); |
| 816 void sh(Register rd, const MemOperand& rs); | 822 void sh(Register rd, const MemOperand& rs); |
| 817 void sw(Register rd, const MemOperand& rs); | 823 void sw(Register rd, const MemOperand& rs); |
| 818 void swl(Register rd, const MemOperand& rs); | 824 void swl(Register rd, const MemOperand& rs); |
| 819 void swr(Register rd, const MemOperand& rs); | 825 void swr(Register rd, const MemOperand& rs); |
| 820 | 826 |
| 821 | 827 |
| 828 // ---------PC-Relative-instructions----------- | |
| 829 | |
| 830 void addiupc(Register rs, int32_t imm19); | |
| 831 void lwpc(Register rs, int32_t offset19); | |
| 832 void auipc(Register rs, int16_t imm16); | |
| 833 void aluipc(Register rs, int16_t imm16); | |
| 834 | |
| 835 | |
| 822 // ----------------Prefetch-------------------- | 836 // ----------------Prefetch-------------------- |
| 823 | 837 |
| 824 void pref(int32_t hint, const MemOperand& rs); | 838 void pref(int32_t hint, const MemOperand& rs); |
| 825 | 839 |
| 826 | 840 |
| 827 // -------------Misc-instructions-------------- | 841 // -------------Misc-instructions-------------- |
| 828 | 842 |
| 829 // Break / Trap instructions. | 843 // Break / Trap instructions. |
| 830 void break_(uint32_t code, bool break_as_stop = false); | 844 void break_(uint32_t code, bool break_as_stop = false); |
| 831 void stop(const char* msg, uint32_t code = kMaxStopCode); | 845 void stop(const char* msg, uint32_t code = kMaxStopCode); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 872 void movt_d(FPURegister fd, FPURegister fs, uint16_t cc); | 886 void movt_d(FPURegister fd, FPURegister fs, uint16_t cc); |
| 873 void movf_s(FPURegister fd, FPURegister fs, uint16_t cc); | 887 void movf_s(FPURegister fd, FPURegister fs, uint16_t cc); |
| 874 void movf_d(FPURegister fd, FPURegister fs, uint16_t cc); | 888 void movf_d(FPURegister fd, FPURegister fs, uint16_t cc); |
| 875 void movn_s(FPURegister fd, FPURegister fs, Register rt); | 889 void movn_s(FPURegister fd, FPURegister fs, Register rt); |
| 876 void movn_d(FPURegister fd, FPURegister fs, Register rt); | 890 void movn_d(FPURegister fd, FPURegister fs, Register rt); |
| 877 // Bit twiddling. | 891 // Bit twiddling. |
| 878 void clz(Register rd, Register rs); | 892 void clz(Register rd, Register rs); |
| 879 void ins_(Register rt, Register rs, uint16_t pos, uint16_t size); | 893 void ins_(Register rt, Register rs, uint16_t pos, uint16_t size); |
| 880 void ext_(Register rt, Register rs, uint16_t pos, uint16_t size); | 894 void ext_(Register rt, Register rs, uint16_t pos, uint16_t size); |
| 881 void bitswap(Register rd, Register rt); | 895 void bitswap(Register rd, Register rt); |
| 896 void align(Register rd, Register rs, Register rt, uint8_t bp); | |
| 882 | 897 |
| 883 // --------Coprocessor-instructions---------------- | 898 // --------Coprocessor-instructions---------------- |
| 884 | 899 |
| 885 // Load, store, and move. | 900 // Load, store, and move. |
| 886 void lwc1(FPURegister fd, const MemOperand& src); | 901 void lwc1(FPURegister fd, const MemOperand& src); |
| 887 void ldc1(FPURegister fd, const MemOperand& src); | 902 void ldc1(FPURegister fd, const MemOperand& src); |
| 888 | 903 |
| 889 void swc1(FPURegister fs, const MemOperand& dst); | 904 void swc1(FPURegister fs, const MemOperand& dst); |
| 890 void sdc1(FPURegister fs, const MemOperand& dst); | 905 void sdc1(FPURegister fs, const MemOperand& dst); |
| 891 | 906 |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1337 Register rt, | 1352 Register rt, |
| 1338 int32_t j); | 1353 int32_t j); |
| 1339 void GenInstrImmediate(Opcode opcode, | 1354 void GenInstrImmediate(Opcode opcode, |
| 1340 Register rs, | 1355 Register rs, |
| 1341 SecondaryField SF, | 1356 SecondaryField SF, |
| 1342 int32_t j); | 1357 int32_t j); |
| 1343 void GenInstrImmediate(Opcode opcode, | 1358 void GenInstrImmediate(Opcode opcode, |
| 1344 Register r1, | 1359 Register r1, |
| 1345 FPURegister r2, | 1360 FPURegister r2, |
| 1346 int32_t j); | 1361 int32_t j); |
| 1362 void GenInstrImmediate(Opcode opcode, Register rs, int32_t j); | |
| 1363 void GenInstrImmediate(Opcode opcode, int32_t offset26); | |
| 1347 | 1364 |
| 1348 | 1365 |
| 1349 void GenInstrJump(Opcode opcode, | 1366 void GenInstrJump(Opcode opcode, |
| 1350 uint32_t address); | 1367 uint32_t address); |
| 1351 | 1368 |
| 1352 // Helpers. | 1369 // Helpers. |
| 1353 void LoadRegPlusOffsetToAt(const MemOperand& src); | 1370 void LoadRegPlusOffsetToAt(const MemOperand& src); |
| 1354 | 1371 |
| 1355 // Labels. | 1372 // Labels. |
| 1356 void print(Label* L); | 1373 void print(Label* L); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1441 class EnsureSpace BASE_EMBEDDED { | 1458 class EnsureSpace BASE_EMBEDDED { |
| 1442 public: | 1459 public: |
| 1443 explicit EnsureSpace(Assembler* assembler) { | 1460 explicit EnsureSpace(Assembler* assembler) { |
| 1444 assembler->CheckBuffer(); | 1461 assembler->CheckBuffer(); |
| 1445 } | 1462 } |
| 1446 }; | 1463 }; |
| 1447 | 1464 |
| 1448 } } // namespace v8::internal | 1465 } } // namespace v8::internal |
| 1449 | 1466 |
| 1450 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 1467 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
| OLD | NEW |