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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 static Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); } | 980 static Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); } |
981 static void instr_at_put(byte* pc, Instr instr) { | 981 static void instr_at_put(byte* pc, Instr instr) { |
982 *reinterpret_cast<Instr*>(pc) = instr; | 982 *reinterpret_cast<Instr*>(pc) = instr; |
983 } | 983 } |
984 static bool IsNop(Instr instr, int type = 0); | 984 static bool IsNop(Instr instr, int type = 0); |
985 static bool IsBranch(Instr instr); | 985 static bool IsBranch(Instr instr); |
986 static int GetBranchOffset(Instr instr); | 986 static int GetBranchOffset(Instr instr); |
987 static bool IsLdrRegisterImmediate(Instr instr); | 987 static bool IsLdrRegisterImmediate(Instr instr); |
988 static int GetLdrRegisterImmediateOffset(Instr instr); | 988 static int GetLdrRegisterImmediateOffset(Instr instr); |
989 static Instr SetLdrRegisterImmediateOffset(Instr instr, int offset); | 989 static Instr SetLdrRegisterImmediateOffset(Instr instr, int offset); |
| 990 static Register GetRd(Instr instr); |
| 991 static bool IsPush(Instr instr); |
| 992 static bool IsPop(Instr instr); |
| 993 static bool IsStrRegFpOffset(Instr instr); |
| 994 static bool IsLdrRegFpOffset(Instr instr); |
| 995 static bool IsStrRegFpNegOffset(Instr instr); |
| 996 static bool IsLdrRegFpNegOffset(Instr instr); |
990 | 997 |
991 | 998 |
992 protected: | 999 protected: |
993 int buffer_space() const { return reloc_info_writer.pos() - pc_; } | 1000 int buffer_space() const { return reloc_info_writer.pos() - pc_; } |
994 | 1001 |
995 // Read/patch instructions | 1002 // Read/patch instructions |
996 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } | 1003 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } |
997 void instr_at_put(int pos, Instr instr) { | 1004 void instr_at_put(int pos, Instr instr) { |
998 *reinterpret_cast<Instr*>(buffer_ + pos) = instr; | 1005 *reinterpret_cast<Instr*>(buffer_ + pos) = instr; |
999 } | 1006 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 | 1128 |
1122 friend class RegExpMacroAssemblerARM; | 1129 friend class RegExpMacroAssemblerARM; |
1123 friend class RelocInfo; | 1130 friend class RelocInfo; |
1124 friend class CodePatcher; | 1131 friend class CodePatcher; |
1125 friend class BlockConstPoolScope; | 1132 friend class BlockConstPoolScope; |
1126 }; | 1133 }; |
1127 | 1134 |
1128 } } // namespace v8::internal | 1135 } } // namespace v8::internal |
1129 | 1136 |
1130 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1137 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |