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 | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are 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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 } | 835 } |
836 void b(Condition cond, Label* L) { b(branch_offset(L, cond == al), cond); } | 836 void b(Condition cond, Label* L) { b(branch_offset(L, cond == al), cond); } |
837 void bl(Label* L, Condition cond = al) { bl(branch_offset(L, false), cond); } | 837 void bl(Label* L, Condition cond = al) { bl(branch_offset(L, false), cond); } |
838 void bl(Condition cond, Label* L) { bl(branch_offset(L, false), cond); } | 838 void bl(Condition cond, Label* L) { bl(branch_offset(L, false), cond); } |
839 void blx(Label* L) { blx(branch_offset(L, false)); } // v5 and above | 839 void blx(Label* L) { blx(branch_offset(L, false)); } // v5 and above |
840 | 840 |
841 // Data-processing instructions | 841 // Data-processing instructions |
842 | 842 |
843 void and_(Register dst, Register src1, const Operand& src2, | 843 void and_(Register dst, Register src1, const Operand& src2, |
844 SBit s = LeaveCC, Condition cond = al); | 844 SBit s = LeaveCC, Condition cond = al); |
| 845 void and_imm_t1(Register dst, Register src1, SBit s, Condition cond, |
| 846 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 847 void and_reg_t2(Register dst, Register src1, const Operand& src2, |
| 848 SBit s, Condition cond); |
845 | 849 |
846 void eor(Register dst, Register src1, const Operand& src2, | 850 void eor(Register dst, Register src1, const Operand& src2, |
847 SBit s = LeaveCC, Condition cond = al); | 851 SBit s = LeaveCC, Condition cond = al); |
| 852 void eor_imm_t1(Register dst, Register src1, SBit s, Condition cond, |
| 853 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 854 void eor_reg_t2(Register dst, Register src1, const Operand& src2, |
| 855 SBit s, Condition cond); |
848 | 856 |
849 void sub(Register dst, Register src1, const Operand& src2, | 857 void sub(Register dst, Register src1, const Operand& src2, |
850 SBit s = LeaveCC, Condition cond = al); | 858 SBit s = LeaveCC, Condition cond = al); |
851 void sub(Register dst, Register src1, Register src2, | 859 void sub(Register dst, Register src1, Register src2, |
852 SBit s = LeaveCC, Condition cond = al) { | 860 SBit s = LeaveCC, Condition cond = al) { |
853 sub(dst, src1, Operand(src2), s, cond); | 861 sub(dst, src1, Operand(src2), s, cond); |
854 } | 862 } |
| 863 void sub_imm_t3(Register dst, Register src1, SBit s, Condition cond, |
| 864 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 865 void sub_imm_t4(Register dst, Register src1, const Operand& src2, |
| 866 SBit s, Condition cond); |
| 867 void sub_reg_t3(Register dst, Register src1, const Operand& src2, |
| 868 SBit s, Condition cond); |
855 | 869 |
856 void rsb(Register dst, Register src1, const Operand& src2, | 870 void rsb(Register dst, Register src1, const Operand& src2, |
857 SBit s = LeaveCC, Condition cond = al); | 871 SBit s = LeaveCC, Condition cond = al); |
| 872 void rsb_imm_t2(Register dst, Register src1, SBit s, Condition cond, |
| 873 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 874 void rsb_reg_t1(Register dst, Register src1, const Operand& src2, |
| 875 SBit s, Condition cond); |
858 | 876 |
859 void add(Register dst, Register src1, const Operand& src2, | 877 void add(Register dst, Register src1, const Operand& src2, |
860 SBit s = LeaveCC, Condition cond = al); | 878 SBit s = LeaveCC, Condition cond = al); |
861 void add(Register dst, Register src1, Register src2, | 879 void add(Register dst, Register src1, Register src2, |
862 SBit s = LeaveCC, Condition cond = al) { | 880 SBit s = LeaveCC, Condition cond = al) { |
863 add(dst, src1, Operand(src2), s, cond); | 881 add(dst, src1, Operand(src2), s, cond); |
864 } | 882 } |
| 883 void add_imm_t3(Register dst, Register src1, SBit s, Condition cond, |
| 884 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 885 void add_imm_t4(Register dst, Register src1, const Operand& src2, |
| 886 SBit s, Condition cond); |
| 887 void add_reg_t3(Register dst, Register src1, const Operand& src2, |
| 888 SBit s, Condition cond); |
865 | 889 |
866 void adc(Register dst, Register src1, const Operand& src2, | 890 void adc(Register dst, Register src1, const Operand& src2, |
867 SBit s = LeaveCC, Condition cond = al); | 891 SBit s = LeaveCC, Condition cond = al); |
| 892 void adc_imm_t1(Register dst, Register src1, SBit s, Condition cond, |
| 893 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 894 void adc_reg_t2(Register dst, Register src1, const Operand& src2, |
| 895 SBit s, Condition cond); |
868 | 896 |
869 void sbc(Register dst, Register src1, const Operand& src2, | 897 void sbc(Register dst, Register src1, const Operand& src2, |
870 SBit s = LeaveCC, Condition cond = al); | 898 SBit s = LeaveCC, Condition cond = al); |
| 899 void sbc_imm_t1(Register dst, Register src1, SBit s, Condition cond, |
| 900 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 901 void sbc_reg_t2(Register dst, Register src1, const Operand& src2, |
| 902 SBit s, Condition cond); |
871 | 903 |
872 void rsc(Register dst, Register src1, const Operand& src2, | 904 void rsc(Register dst, Register src1, const Operand& src2, |
873 SBit s = LeaveCC, Condition cond = al); | 905 SBit s = LeaveCC, Condition cond = al); |
874 | 906 |
875 void tst(Register src1, const Operand& src2, Condition cond = al); | 907 void tst(Register src1, const Operand& src2, Condition cond = al); |
876 void tst(Register src1, Register src2, Condition cond = al) { | 908 void tst(Register src1, Register src2, Condition cond = al) { |
877 tst(src1, Operand(src2), cond); | 909 tst(src1, Operand(src2), cond); |
878 } | 910 } |
| 911 void tst_imm_t1(Register src1, Condition cond, |
| 912 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 913 void tst_reg_t2(Register src1, const Operand& src2, Condition cond); |
879 | 914 |
880 void teq(Register src1, const Operand& src2, Condition cond = al); | 915 void teq(Register src1, const Operand& src2, Condition cond = al); |
| 916 void teq_imm_t1(Register src1, Condition cond, |
| 917 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 918 void teq_reg_t1(Register src1, const Operand& src2, Condition cond); |
881 | 919 |
882 void cmp(Register src1, const Operand& src2, Condition cond = al); | 920 void cmp(Register src1, const Operand& src2, Condition cond = al); |
883 void cmp(Register src1, Register src2, Condition cond = al) { | 921 void cmp(Register src1, Register src2, Condition cond = al) { |
884 cmp(src1, Operand(src2), cond); | 922 cmp(src1, Operand(src2), cond); |
885 } | 923 } |
| 924 void cmp_imm_t2(Register src1, Condition cond, |
| 925 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 926 void cmp_reg_t3(Register src1, const Operand& src2, Condition cond); |
886 void cmp_raw_immediate(Register src1, int raw_immediate, Condition cond = al); | 927 void cmp_raw_immediate(Register src1, int raw_immediate, Condition cond = al); |
887 | 928 |
888 void cmn(Register src1, const Operand& src2, Condition cond = al); | 929 void cmn(Register src1, const Operand& src2, Condition cond = al); |
| 930 void cmn_imm_t1(Register src1, Condition cond, |
| 931 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 932 void cmn_reg_t2(Register src1, const Operand& src2, Condition cond); |
889 | 933 |
890 void orr(Register dst, Register src1, const Operand& src2, | 934 void orr(Register dst, Register src1, const Operand& src2, |
891 SBit s = LeaveCC, Condition cond = al); | 935 SBit s = LeaveCC, Condition cond = al); |
892 void orr(Register dst, Register src1, Register src2, | 936 void orr(Register dst, Register src1, Register src2, |
893 SBit s = LeaveCC, Condition cond = al) { | 937 SBit s = LeaveCC, Condition cond = al) { |
894 orr(dst, src1, Operand(src2), s, cond); | 938 orr(dst, src1, Operand(src2), s, cond); |
895 } | 939 } |
| 940 void orr_imm_t1(Register dst, Register src1, SBit s, Condition cond, |
| 941 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 942 void orr_reg_t2(Register dst, Register src1, const Operand& src2, |
| 943 SBit s, Condition cond); |
896 | 944 |
897 void mov(Register dst, const Operand& src, | 945 void mov(Register dst, const Operand& src, |
898 SBit s = LeaveCC, Condition cond = al); | 946 SBit s = LeaveCC, Condition cond = al); |
899 void mov(Register dst, Register src, SBit s = LeaveCC, Condition cond = al) { | 947 void mov(Register dst, Register src, SBit s = LeaveCC, Condition cond = al) { |
900 mov(dst, Operand(src), s, cond); | 948 mov(dst, Operand(src), s, cond); |
901 } | 949 } |
| 950 void mov_imm_t2(Register dst, SBit s, Condition cond, |
| 951 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 952 void mov_imm_t3(Register dst, const Operand& src, |
| 953 SBit s, Condition cond); |
| 954 void mov_reg_t3(Register dst, const Operand& src, |
| 955 SBit s, Condition cond); |
| 956 |
| 957 void lsl_imm_t2(Register dst, const Operand& src, SBit s, Condition cond); |
| 958 void lsl_reg_t2(Register dst, const Operand& src, SBit s, Condition cond); |
| 959 void lsr_imm_t2(Register dst, const Operand& src, SBit s, Condition cond); |
| 960 void lsr_reg_t2(Register dst, const Operand& src, SBit s, Condition cond); |
| 961 void asr_imm_t2(Register dst, const Operand& src, SBit s, Condition cond); |
| 962 void asr_reg_t2(Register dst, const Operand& src, SBit s, Condition cond); |
| 963 void ror_imm_t2(Register dst, const Operand& src, SBit s, Condition cond); |
| 964 void ror_reg_t2(Register dst, const Operand& src, SBit s, Condition cond); |
902 | 965 |
903 // Load the position of the label relative to the generated code object | 966 // Load the position of the label relative to the generated code object |
904 // pointer in a register. | 967 // pointer in a register. |
905 void mov_label_offset(Register dst, Label* label); | 968 void mov_label_offset(Register dst, Label* label); |
906 | 969 |
907 // ARMv7 instructions for loading a 32 bit immediate in two instructions. | 970 // ARMv7 instructions for loading a 32 bit immediate in two instructions. |
908 // This may actually emit a different mov instruction, but on an ARMv7 it | 971 // This may actually emit a different mov instruction, but on an ARMv7 it |
909 // is guaranteed to only emit one instruction. | 972 // is guaranteed to only emit one instruction. |
910 void movw(Register reg, uint32_t immediate, Condition cond = al); | 973 void movw(Register reg, uint32_t immediate, Condition cond = al); |
911 // The constant for movt should be in the range 0-0xffff. | 974 // The constant for movt should be in the range 0-0xffff. |
912 void movt(Register reg, uint32_t immediate, Condition cond = al); | 975 void movt(Register reg, uint32_t immediate, Condition cond = al); |
913 | 976 |
914 void bic(Register dst, Register src1, const Operand& src2, | 977 void bic(Register dst, Register src1, const Operand& src2, |
915 SBit s = LeaveCC, Condition cond = al); | 978 SBit s = LeaveCC, Condition cond = al); |
| 979 void bic_imm_t1(Register dst, Register src1, SBit s, Condition cond, |
| 980 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 981 void bic_reg_t2(Register dst, Register src1, const Operand& src2, |
| 982 SBit s, Condition cond); |
916 | 983 |
917 void mvn(Register dst, const Operand& src, | 984 void mvn(Register dst, const Operand& src, |
918 SBit s = LeaveCC, Condition cond = al); | 985 SBit s = LeaveCC, Condition cond = al); |
| 986 void mvn_imm_t1(Register dst, SBit s, Condition cond, |
| 987 uint32_t i, uint32_t imm3, uint32_t imm8); |
| 988 void mvn_reg_t2(Register dst, const Operand& src, |
| 989 SBit s, Condition cond); |
919 | 990 |
920 // Multiply instructions | 991 // Multiply instructions |
921 | 992 |
922 void mla(Register dst, Register src1, Register src2, Register srcA, | 993 void mla(Register dst, Register src1, Register src2, Register srcA, |
923 SBit s = LeaveCC, Condition cond = al); | 994 SBit s = LeaveCC, Condition cond = al); |
924 | 995 |
925 void mls(Register dst, Register src1, Register src2, Register srcA, | 996 void mls(Register dst, Register src1, Register src2, Register srcA, |
926 Condition cond = al); | 997 Condition cond = al); |
927 | 998 |
928 void sdiv(Register dst, Register src1, Register src2, | 999 void sdiv(Register dst, Register src1, Register src2, |
929 Condition cond = al); | 1000 Condition cond = al); |
930 | 1001 |
931 void mul(Register dst, Register src1, Register src2, | 1002 void mul(Register dst, Register src1, Register src2, |
932 SBit s = LeaveCC, Condition cond = al); | 1003 SBit s = LeaveCC, Condition cond = al); |
| 1004 void mul_t2(Register dst, Register src1, Register src2, |
| 1005 SBit s, Condition cond); |
933 | 1006 |
934 void smlal(Register dstL, Register dstH, Register src1, Register src2, | 1007 void smlal(Register dstL, Register dstH, Register src1, Register src2, |
935 SBit s = LeaveCC, Condition cond = al); | 1008 SBit s = LeaveCC, Condition cond = al); |
936 | 1009 |
937 void smull(Register dstL, Register dstH, Register src1, Register src2, | 1010 void smull(Register dstL, Register dstH, Register src1, Register src2, |
938 SBit s = LeaveCC, Condition cond = al); | 1011 SBit s = LeaveCC, Condition cond = al); |
939 | 1012 |
940 void umlal(Register dstL, Register dstH, Register src1, Register src2, | 1013 void umlal(Register dstL, Register dstH, Register src1, Register src2, |
941 SBit s = LeaveCC, Condition cond = al); | 1014 SBit s = LeaveCC, Condition cond = al); |
942 | 1015 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 void str(Register src, const MemOperand& dst, Condition cond = al); | 1075 void str(Register src, const MemOperand& dst, Condition cond = al); |
1003 void ldrb(Register dst, const MemOperand& src, Condition cond = al); | 1076 void ldrb(Register dst, const MemOperand& src, Condition cond = al); |
1004 void strb(Register src, const MemOperand& dst, Condition cond = al); | 1077 void strb(Register src, const MemOperand& dst, Condition cond = al); |
1005 void ldrh(Register dst, const MemOperand& src, Condition cond = al); | 1078 void ldrh(Register dst, const MemOperand& src, Condition cond = al); |
1006 void strh(Register src, const MemOperand& dst, Condition cond = al); | 1079 void strh(Register src, const MemOperand& dst, Condition cond = al); |
1007 void ldrsb(Register dst, const MemOperand& src, Condition cond = al); | 1080 void ldrsb(Register dst, const MemOperand& src, Condition cond = al); |
1008 void ldrsh(Register dst, const MemOperand& src, Condition cond = al); | 1081 void ldrsh(Register dst, const MemOperand& src, Condition cond = al); |
1009 void ldrd(Register dst1, | 1082 void ldrd(Register dst1, |
1010 Register dst2, | 1083 Register dst2, |
1011 const MemOperand& src, Condition cond = al); | 1084 const MemOperand& src, Condition cond = al); |
| 1085 void ldrd_imm_t1(Register dst1, |
| 1086 Register dst2, |
| 1087 const MemOperand& src); |
1012 void strd(Register src1, | 1088 void strd(Register src1, |
1013 Register src2, | 1089 Register src2, |
1014 const MemOperand& dst, Condition cond = al); | 1090 const MemOperand& dst, Condition cond = al); |
| 1091 void strd_imm_t1(Register src1, |
| 1092 Register src2, |
| 1093 const MemOperand& dst); |
1015 | 1094 |
1016 // Preload instructions | 1095 // Preload instructions |
1017 void pld(const MemOperand& address); | 1096 void pld(const MemOperand& address); |
1018 | 1097 |
1019 // Load/Store multiple instructions | 1098 // Load/Store multiple instructions |
1020 void ldm(BlockAddrMode am, Register base, RegList dst, Condition cond = al); | 1099 void ldm(BlockAddrMode am, Register base, RegList dst, Condition cond = al); |
1021 void stm(BlockAddrMode am, Register base, RegList src, Condition cond = al); | 1100 void stm(BlockAddrMode am, Register base, RegList src, Condition cond = al); |
1022 | 1101 |
1023 // Exception-generating instructions and debugging support | 1102 // Exception-generating instructions and debugging support |
1024 void stop(const char* msg, | 1103 void stop(const char* msg, |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 public: | 1766 public: |
1688 explicit EnsureSpace(Assembler* assembler) { | 1767 explicit EnsureSpace(Assembler* assembler) { |
1689 assembler->CheckBuffer(); | 1768 assembler->CheckBuffer(); |
1690 } | 1769 } |
1691 }; | 1770 }; |
1692 | 1771 |
1693 | 1772 |
1694 } } // namespace v8::internal | 1773 } } // namespace v8::internal |
1695 | 1774 |
1696 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1775 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |