Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Side by Side Diff: src/mips64/assembler-mips64.h

Issue 1144373003: MIPS: Implemented PC-relative instructions for R6. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Implementation BC and BALC. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 j_or_jr(int64_t target, Register rs);
747 void jal_or_jalr(int64_t target, Register rs); 751 void jal_or_jalr(int64_t target, Register rs);
752 void jic(Register rt, int16_t offset);
753 void jialc(Register rt, int16_t offset);
748 754
749 755
750 // -------Data-processing-instructions--------- 756 // -------Data-processing-instructions---------
751 757
752 // Arithmetic. 758 // Arithmetic.
753 void addu(Register rd, Register rs, Register rt); 759 void addu(Register rd, Register rs, Register rt);
754 void subu(Register rd, Register rs, Register rt); 760 void subu(Register rd, Register rs, Register rt);
755 761
756 void div(Register rs, Register rt); 762 void div(Register rs, Register rt);
757 void divu(Register rs, Register rt); 763 void divu(Register rs, Register rt);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 void swl(Register rd, const MemOperand& rs); 846 void swl(Register rd, const MemOperand& rs);
841 void swr(Register rd, const MemOperand& rs); 847 void swr(Register rd, const MemOperand& rs);
842 void ldl(Register rd, const MemOperand& rs); 848 void ldl(Register rd, const MemOperand& rs);
843 void ldr(Register rd, const MemOperand& rs); 849 void ldr(Register rd, const MemOperand& rs);
844 void sdl(Register rd, const MemOperand& rs); 850 void sdl(Register rd, const MemOperand& rs);
845 void sdr(Register rd, const MemOperand& rs); 851 void sdr(Register rd, const MemOperand& rs);
846 void ld(Register rd, const MemOperand& rs); 852 void ld(Register rd, const MemOperand& rs);
847 void sd(Register rd, const MemOperand& rs); 853 void sd(Register rd, const MemOperand& rs);
848 854
849 855
856 // ---------PC-Relative-instructions-----------
857
858 void addiupc(Register rs, int32_t imm19);
859 void lwpc(Register rs, int32_t offset19);
860 void lwupc(Register rs, int32_t offset19);
861 void ldpc(Register rs, int32_t offset18);
862 void auipc(Register rs, int16_t imm16);
863 void aluipc(Register rs, int16_t imm16);
864
865
850 // ----------------Prefetch-------------------- 866 // ----------------Prefetch--------------------
851 867
852 void pref(int32_t hint, const MemOperand& rs); 868 void pref(int32_t hint, const MemOperand& rs);
853 869
854 870
855 // -------------Misc-instructions-------------- 871 // -------------Misc-instructions--------------
856 872
857 // Break / Trap instructions. 873 // Break / Trap instructions.
858 void break_(uint32_t code, bool break_as_stop = false); 874 void break_(uint32_t code, bool break_as_stop = false);
859 void stop(const char* msg, uint32_t code = kMaxStopCode); 875 void stop(const char* msg, uint32_t code = kMaxStopCode);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 void movf_d(FPURegister fd, FPURegister fs, uint16_t cc); 918 void movf_d(FPURegister fd, FPURegister fs, uint16_t cc);
903 void movn_s(FPURegister fd, FPURegister fs, Register rt); 919 void movn_s(FPURegister fd, FPURegister fs, Register rt);
904 void movn_d(FPURegister fd, FPURegister fs, Register rt); 920 void movn_d(FPURegister fd, FPURegister fs, Register rt);
905 // Bit twiddling. 921 // Bit twiddling.
906 void clz(Register rd, Register rs); 922 void clz(Register rd, Register rs);
907 void ins_(Register rt, Register rs, uint16_t pos, uint16_t size); 923 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); 924 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); 925 void dext_(Register rt, Register rs, uint16_t pos, uint16_t size);
910 void bitswap(Register rd, Register rt); 926 void bitswap(Register rd, Register rt);
911 void dbitswap(Register rd, Register rt); 927 void dbitswap(Register rd, Register rt);
928 void align(Register rd, Register rs, Register rt, uint8_t bp);
929 void dalign(Register rd, Register rs, Register rt, uint8_t bp);
912 930
913 // --------Coprocessor-instructions---------------- 931 // --------Coprocessor-instructions----------------
914 932
915 // Load, store, and move. 933 // Load, store, and move.
916 void lwc1(FPURegister fd, const MemOperand& src); 934 void lwc1(FPURegister fd, const MemOperand& src);
917 void ldc1(FPURegister fd, const MemOperand& src); 935 void ldc1(FPURegister fd, const MemOperand& src);
918 936
919 void swc1(FPURegister fs, const MemOperand& dst); 937 void swc1(FPURegister fs, const MemOperand& dst);
920 void sdc1(FPURegister fs, const MemOperand& dst); 938 void sdc1(FPURegister fs, const MemOperand& dst);
921 939
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 Register rt, 1392 Register rt,
1375 int32_t j); 1393 int32_t j);
1376 void GenInstrImmediate(Opcode opcode, 1394 void GenInstrImmediate(Opcode opcode,
1377 Register rs, 1395 Register rs,
1378 SecondaryField SF, 1396 SecondaryField SF,
1379 int32_t j); 1397 int32_t j);
1380 void GenInstrImmediate(Opcode opcode, 1398 void GenInstrImmediate(Opcode opcode,
1381 Register r1, 1399 Register r1,
1382 FPURegister r2, 1400 FPURegister r2,
1383 int32_t j); 1401 int32_t j);
1402 void GenInstrImmediate(Opcode opcode, Register rs, int32_t j);
1403 void GenInstrImmediate(Opcode opcode, int32_t offset26);
1384 1404
1385 1405
1386 void GenInstrJump(Opcode opcode, 1406 void GenInstrJump(Opcode opcode,
1387 uint32_t address); 1407 uint32_t address);
1388 1408
1389 // Helpers. 1409 // Helpers.
1390 void LoadRegPlusOffsetToAt(const MemOperand& src); 1410 void LoadRegPlusOffsetToAt(const MemOperand& src);
1391 1411
1392 // Labels. 1412 // Labels.
1393 void print(Label* L); 1413 void print(Label* L);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 class EnsureSpace BASE_EMBEDDED { 1498 class EnsureSpace BASE_EMBEDDED {
1479 public: 1499 public:
1480 explicit EnsureSpace(Assembler* assembler) { 1500 explicit EnsureSpace(Assembler* assembler) {
1481 assembler->CheckBuffer(); 1501 assembler->CheckBuffer();
1482 } 1502 }
1483 }; 1503 };
1484 1504
1485 } } // namespace v8::internal 1505 } } // namespace v8::internal
1486 1506
1487 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1507 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698