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

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

Issue 1195793002: MIPS: Implemented PC-relative instructions for R6. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/mips/simulator-mips.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 sll(zero_reg, nop_rt_reg, type, true); 629 sll(zero_reg, nop_rt_reg, type, true);
630 } 630 }
631 631
632 632
633 // --------Branch-and-jump-instructions---------- 633 // --------Branch-and-jump-instructions----------
634 // We don't use likely variant of instructions. 634 // We don't use likely variant of instructions.
635 void b(int16_t offset); 635 void b(int16_t offset);
636 void b(Label* L) { b(branch_offset(L, false)>>2); } 636 void b(Label* L) { b(branch_offset(L, false)>>2); }
637 void bal(int16_t offset); 637 void bal(int16_t offset);
638 void bal(Label* L) { bal(branch_offset(L, false)>>2); } 638 void bal(Label* L) { bal(branch_offset(L, false)>>2); }
639 void bc(int32_t offset);
640 void bc(Label* L) { bc(branch_offset(L, false) >> 2); }
641 void balc(int32_t offset);
642 void balc(Label* L) { balc(branch_offset(L, false) >> 2); }
639 643
640 void beq(Register rs, Register rt, int16_t offset); 644 void beq(Register rs, Register rt, int16_t offset);
641 void beq(Register rs, Register rt, Label* L) { 645 void beq(Register rs, Register rt, Label* L) {
642 beq(rs, rt, branch_offset(L, false) >> 2); 646 beq(rs, rt, branch_offset(L, false) >> 2);
643 } 647 }
644 void bgez(Register rs, int16_t offset); 648 void bgez(Register rs, int16_t offset);
645 void bgezc(Register rt, int16_t offset); 649 void bgezc(Register rt, int16_t offset);
646 void bgezc(Register rt, Label* L) { 650 void bgezc(Register rt, Label* L) {
647 bgezc(rt, branch_offset_compact(L, false)>>2); 651 bgezc(rt, branch_offset_compact(L, false)>>2);
648 } 652 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 } 742 }
739 743
740 // Never use the int16_t b(l)cond version with a branch offset 744 // Never use the int16_t b(l)cond version with a branch offset
741 // instead of using the Label* version. 745 // instead of using the Label* version.
742 746
743 // Jump targets must be in the current 256 MB-aligned region. i.e. 28 bits. 747 // Jump targets must be in the current 256 MB-aligned region. i.e. 28 bits.
744 void j(int64_t target); 748 void j(int64_t target);
745 void jal(int64_t target); 749 void jal(int64_t target);
746 void jalr(Register rs, Register rd = ra); 750 void jalr(Register rs, Register rd = ra);
747 void jr(Register target); 751 void jr(Register target);
748 void j_or_jr(int64_t target, Register rs); 752 void jic(Register rt, int16_t offset);
749 void jal_or_jalr(int64_t target, Register rs); 753 void jialc(Register rt, int16_t offset);
750 754
751 755
752 // -------Data-processing-instructions--------- 756 // -------Data-processing-instructions---------
753 757
754 // Arithmetic. 758 // Arithmetic.
755 void addu(Register rd, Register rs, Register rt); 759 void addu(Register rd, Register rs, Register rt);
756 void subu(Register rd, Register rs, Register rt); 760 void subu(Register rd, Register rs, Register rt);
757 761
758 void div(Register rs, Register rt); 762 void div(Register rs, Register rt);
759 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
842 void swl(Register rd, const MemOperand& rs); 846 void swl(Register rd, const MemOperand& rs);
843 void swr(Register rd, const MemOperand& rs); 847 void swr(Register rd, const MemOperand& rs);
844 void ldl(Register rd, const MemOperand& rs); 848 void ldl(Register rd, const MemOperand& rs);
845 void ldr(Register rd, const MemOperand& rs); 849 void ldr(Register rd, const MemOperand& rs);
846 void sdl(Register rd, const MemOperand& rs); 850 void sdl(Register rd, const MemOperand& rs);
847 void sdr(Register rd, const MemOperand& rs); 851 void sdr(Register rd, const MemOperand& rs);
848 void ld(Register rd, const MemOperand& rs); 852 void ld(Register rd, const MemOperand& rs);
849 void sd(Register rd, const MemOperand& rs); 853 void sd(Register rd, const MemOperand& rs);
850 854
851 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
852 // ----------------Prefetch-------------------- 866 // ----------------Prefetch--------------------
853 867
854 void pref(int32_t hint, const MemOperand& rs); 868 void pref(int32_t hint, const MemOperand& rs);
855 869
856 870
857 // -------------Misc-instructions-------------- 871 // -------------Misc-instructions--------------
858 872
859 // Break / Trap instructions. 873 // Break / Trap instructions.
860 void break_(uint32_t code, bool break_as_stop = false); 874 void break_(uint32_t code, bool break_as_stop = false);
861 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
904 void movf_d(FPURegister fd, FPURegister fs, uint16_t cc); 918 void movf_d(FPURegister fd, FPURegister fs, uint16_t cc);
905 void movn_s(FPURegister fd, FPURegister fs, Register rt); 919 void movn_s(FPURegister fd, FPURegister fs, Register rt);
906 void movn_d(FPURegister fd, FPURegister fs, Register rt); 920 void movn_d(FPURegister fd, FPURegister fs, Register rt);
907 // Bit twiddling. 921 // Bit twiddling.
908 void clz(Register rd, Register rs); 922 void clz(Register rd, Register rs);
909 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);
910 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);
911 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);
912 void bitswap(Register rd, Register rt); 926 void bitswap(Register rd, Register rt);
913 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);
914 930
915 // --------Coprocessor-instructions---------------- 931 // --------Coprocessor-instructions----------------
916 932
917 // Load, store, and move. 933 // Load, store, and move.
918 void lwc1(FPURegister fd, const MemOperand& src); 934 void lwc1(FPURegister fd, const MemOperand& src);
919 void ldc1(FPURegister fd, const MemOperand& src); 935 void ldc1(FPURegister fd, const MemOperand& src);
920 936
921 void swc1(FPURegister fs, const MemOperand& dst); 937 void swc1(FPURegister fs, const MemOperand& dst);
922 void sdc1(FPURegister fs, const MemOperand& dst); 938 void sdc1(FPURegister fs, const MemOperand& dst);
923 939
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 Register rt, 1397 Register rt,
1382 int32_t j); 1398 int32_t j);
1383 void GenInstrImmediate(Opcode opcode, 1399 void GenInstrImmediate(Opcode opcode,
1384 Register rs, 1400 Register rs,
1385 SecondaryField SF, 1401 SecondaryField SF,
1386 int32_t j); 1402 int32_t j);
1387 void GenInstrImmediate(Opcode opcode, 1403 void GenInstrImmediate(Opcode opcode,
1388 Register r1, 1404 Register r1,
1389 FPURegister r2, 1405 FPURegister r2,
1390 int32_t j); 1406 int32_t j);
1407 void GenInstrImmediate(Opcode opcode, Register rs, int32_t j);
1408 void GenInstrImmediate(Opcode opcode, int32_t offset26);
1391 1409
1392 1410
1393 void GenInstrJump(Opcode opcode, 1411 void GenInstrJump(Opcode opcode,
1394 uint32_t address); 1412 uint32_t address);
1395 1413
1396 // Helpers. 1414 // Helpers.
1397 void LoadRegPlusOffsetToAt(const MemOperand& src); 1415 void LoadRegPlusOffsetToAt(const MemOperand& src);
1398 1416
1399 // Labels. 1417 // Labels.
1400 void print(Label* L); 1418 void print(Label* L);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 class EnsureSpace BASE_EMBEDDED { 1503 class EnsureSpace BASE_EMBEDDED {
1486 public: 1504 public:
1487 explicit EnsureSpace(Assembler* assembler) { 1505 explicit EnsureSpace(Assembler* assembler) {
1488 assembler->CheckBuffer(); 1506 assembler->CheckBuffer();
1489 } 1507 }
1490 }; 1508 };
1491 1509
1492 } } // namespace v8::internal 1510 } } // namespace v8::internal
1493 1511
1494 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1512 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/simulator-mips.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698