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

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

Issue 5140002: Generate inline code for contextual loads on ARM.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 1 month 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 | Annotate | Revision Log
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 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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 const Condition cond = al); 1072 const Condition cond = al);
1073 void vmrs(const Register dst, 1073 void vmrs(const Register dst,
1074 const Condition cond = al); 1074 const Condition cond = al);
1075 void vmsr(const Register dst, 1075 void vmsr(const Register dst,
1076 const Condition cond = al); 1076 const Condition cond = al);
1077 void vsqrt(const DwVfpRegister dst, 1077 void vsqrt(const DwVfpRegister dst,
1078 const DwVfpRegister src, 1078 const DwVfpRegister src,
1079 const Condition cond = al); 1079 const Condition cond = al);
1080 1080
1081 // Pseudo instructions 1081 // Pseudo instructions
1082 void nop(int type = 0); 1082
1083 // Different nop operations are used by the code generator to detect certain
1084 // states of the generated code.
1085 enum NopMarkerTypes {
1086 NON_MARKING_NOP = 0,
1087 DEBUG_BREAK_NOP,
1088 // IC markers.
1089 PROPERTY_ACCESS_INLINED,
1090 PROPERTY_ACCESS_INLINED_CONTEXT,
1091 PROPERTY_ACCESS_INLINED_CONTEXT_DONT_DELETE,
1092 // Helper values.
1093 LAST_CODE_MARKER,
1094 FIRST_IC_MARKER = PROPERTY_ACCESS_INLINED
1095 };
1096
1097 void nop(int type = 0); // 0 is the default non-marking type.
1083 1098
1084 void push(Register src, Condition cond = al) { 1099 void push(Register src, Condition cond = al) {
1085 str(src, MemOperand(sp, 4, NegPreIndex), cond); 1100 str(src, MemOperand(sp, 4, NegPreIndex), cond);
1086 } 1101 }
1087 1102
1088 void pop(Register dst, Condition cond = al) { 1103 void pop(Register dst, Condition cond = al) {
1089 ldr(dst, MemOperand(sp, 4, PostIndex), cond); 1104 ldr(dst, MemOperand(sp, 4, PostIndex), cond);
1090 } 1105 }
1091 1106
1092 void pop() { 1107 void pop() {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 if (!FLAG_peephole_optimization) return false; 1159 if (!FLAG_peephole_optimization) return false;
1145 if (last_bound_pos_ > pc_offset() - instructions * kInstrSize) return false; 1160 if (last_bound_pos_ > pc_offset() - instructions * kInstrSize) return false;
1146 return reloc_info_writer.last_pc() <= pc_ - instructions * kInstrSize; 1161 return reloc_info_writer.last_pc() <= pc_ - instructions * kInstrSize;
1147 } 1162 }
1148 1163
1149 // Read/patch instructions 1164 // Read/patch instructions
1150 static Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); } 1165 static Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); }
1151 static void instr_at_put(byte* pc, Instr instr) { 1166 static void instr_at_put(byte* pc, Instr instr) {
1152 *reinterpret_cast<Instr*>(pc) = instr; 1167 *reinterpret_cast<Instr*>(pc) = instr;
1153 } 1168 }
1154 static bool IsNop(Instr instr, int type = 0);
1155 static bool IsBranch(Instr instr); 1169 static bool IsBranch(Instr instr);
1156 static int GetBranchOffset(Instr instr); 1170 static int GetBranchOffset(Instr instr);
1157 static bool IsLdrRegisterImmediate(Instr instr); 1171 static bool IsLdrRegisterImmediate(Instr instr);
1158 static int GetLdrRegisterImmediateOffset(Instr instr); 1172 static int GetLdrRegisterImmediateOffset(Instr instr);
1159 static Instr SetLdrRegisterImmediateOffset(Instr instr, int offset); 1173 static Instr SetLdrRegisterImmediateOffset(Instr instr, int offset);
1160 static bool IsStrRegisterImmediate(Instr instr); 1174 static bool IsStrRegisterImmediate(Instr instr);
1161 static Instr SetStrRegisterImmediateOffset(Instr instr, int offset); 1175 static Instr SetStrRegisterImmediateOffset(Instr instr, int offset);
1162 static bool IsAddRegisterImmediate(Instr instr); 1176 static bool IsAddRegisterImmediate(Instr instr);
1163 static Instr SetAddRegisterImmediateOffset(Instr instr, int offset); 1177 static Instr SetAddRegisterImmediateOffset(Instr instr, int offset);
1164 static Register GetRd(Instr instr); 1178 static Register GetRd(Instr instr);
1165 static bool IsPush(Instr instr); 1179 static bool IsPush(Instr instr);
1166 static bool IsPop(Instr instr); 1180 static bool IsPop(Instr instr);
1167 static bool IsStrRegFpOffset(Instr instr); 1181 static bool IsStrRegFpOffset(Instr instr);
1168 static bool IsLdrRegFpOffset(Instr instr); 1182 static bool IsLdrRegFpOffset(Instr instr);
1169 static bool IsStrRegFpNegOffset(Instr instr); 1183 static bool IsStrRegFpNegOffset(Instr instr);
1170 static bool IsLdrRegFpNegOffset(Instr instr); 1184 static bool IsLdrRegFpNegOffset(Instr instr);
1185 static bool IsLdrPcImmediateOffset(Instr instr);
1186 static bool IsNop(Instr instr, int = NON_MARKING_NOP);
Søren Thygesen Gjesse 2010/11/23 14:00:37 Missing argument name.
Alexandre 2010/11/23 17:32:59 Done.
1171 1187
1172 1188
1173 protected: 1189 protected:
1174 int buffer_space() const { return reloc_info_writer.pos() - pc_; } 1190 int buffer_space() const { return reloc_info_writer.pos() - pc_; }
1175 1191
1176 // Read/patch instructions 1192 // Read/patch instructions
1177 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } 1193 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); }
1178 void instr_at_put(int pos, Instr instr) { 1194 void instr_at_put(int pos, Instr instr) {
1179 *reinterpret_cast<Instr*>(buffer_ + pos) = instr; 1195 *reinterpret_cast<Instr*>(buffer_ + pos) = instr;
1180 } 1196 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 public: 1326 public:
1311 explicit EnsureSpace(Assembler* assembler) { 1327 explicit EnsureSpace(Assembler* assembler) {
1312 assembler->CheckBuffer(); 1328 assembler->CheckBuffer();
1313 } 1329 }
1314 }; 1330 };
1315 1331
1316 1332
1317 } } // namespace v8::internal 1333 } } // namespace v8::internal
1318 1334
1319 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1335 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | src/arm/assembler-arm.cc » ('j') | src/arm/macro-assembler-arm.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698