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

Side by Side Diff: runtime/vm/simulator_arm.h

Issue 12459005: Adds muls, sdiv, udiv instructions to ARM simulator, assembler, disassembler (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Declares a Simulator for ARM instructions if we are not generating a native 5 // Declares a Simulator for ARM instructions if we are not generating a native
6 // ARM binary. This Simulator allows us to run and debug ARM code generation on 6 // ARM binary. This Simulator allows us to run and debug ARM code generation on
7 // regular desktop machines. 7 // regular desktop machines.
8 // Dart calls into generated code by "calling" the InvokeDartCode stub, 8 // Dart calls into generated code by "calling" the InvokeDartCode stub,
9 // which will start execution in the Simulator or forwards to the real entry 9 // which will start execution in the Simulator or forwards to the real entry
10 // on a ARM HW platform. 10 // on a ARM HW platform.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 // Helper functions to decode common "addressing" modes. 149 // Helper functions to decode common "addressing" modes.
150 int32_t GetShiftRm(Instr* instr, bool* carry_out); 150 int32_t GetShiftRm(Instr* instr, bool* carry_out);
151 int32_t GetImm(Instr* instr, bool* carry_out); 151 int32_t GetImm(Instr* instr, bool* carry_out);
152 void HandleRList(Instr* instr, bool load); 152 void HandleRList(Instr* instr, bool load);
153 void SupervisorCall(Instr* instr); 153 void SupervisorCall(Instr* instr);
154 154
155 // Read and write memory. 155 // Read and write memory.
156 void UnalignedAccess(const char* msg, uword addr, Instr* instr); 156 void UnalignedAccess(const char* msg, uword addr, Instr* instr);
157 157
158 // Perform a division.
159 void DoDivision(Instr* instr);
160
158 inline uint8_t ReadBU(uword addr); 161 inline uint8_t ReadBU(uword addr);
159 inline int8_t ReadB(uword addr); 162 inline int8_t ReadB(uword addr);
160 inline void WriteB(uword addr, uint8_t value); 163 inline void WriteB(uword addr, uint8_t value);
161 164
162 inline uint16_t ReadHU(uword addr, Instr* instr); 165 inline uint16_t ReadHU(uword addr, Instr* instr);
163 inline int16_t ReadH(uword addr, Instr* instr); 166 inline int16_t ReadH(uword addr, Instr* instr);
164 inline void WriteH(uword addr, uint16_t value, Instr* instr); 167 inline void WriteH(uword addr, uint16_t value, Instr* instr);
165 168
166 inline int ReadW(uword addr, Instr* instr); 169 inline int ReadW(uword addr, Instr* instr);
167 inline void WriteW(uword addr, int value, Instr* instr); 170 inline void WriteW(uword addr, int value, Instr* instr);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 223 }
221 224
222 friend class SimulatorDebugger; 225 friend class SimulatorDebugger;
223 friend class SimulatorSetjmpBuffer; 226 friend class SimulatorSetjmpBuffer;
224 DISALLOW_COPY_AND_ASSIGN(Simulator); 227 DISALLOW_COPY_AND_ASSIGN(Simulator);
225 }; 228 };
226 229
227 } // namespace dart 230 } // namespace dart
228 231
229 #endif // VM_SIMULATOR_ARM_H_ 232 #endif // VM_SIMULATOR_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698