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

Unified Diff: runtime/vm/simulator_arm64.h

Issue 243773002: Adds Runtime call stub and Dart entry stub to ARM64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/runtime_entry_test.cc ('k') | runtime/vm/simulator_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm64.h
===================================================================
--- runtime/vm/simulator_arm64.h (revision 35189)
+++ runtime/vm/simulator_arm64.h (working copy)
@@ -22,6 +22,7 @@
namespace dart {
class Isolate;
+class SimulatorSetjmpBuffer;
class Simulator {
public:
@@ -35,12 +36,18 @@
static Simulator* Current();
// Accessors for register state.
- void set_register(Register reg, int64_t value, R31Type r31t = R31IsUndef);
- int64_t get_register(Register reg, R31Type r31t = R31IsUndef) const;
- void set_wregister(Register reg, int32_t value, R31Type r31t = R31IsUndef);
- int32_t get_wregister(Register reg, R31Type r31t = R31IsUndef) const;
+ // The default value for R31Type has to be R31IsSP because get_register is
+ // accessed from architecture independent code through SPREG without
+ // specifying the type. We also can't translate a dummy value for SPREG into
+ // a real value because the architecture independent code expects SPREG to
+ // be a real register value.
+ void set_register(Register reg, int64_t value, R31Type r31t = R31IsSP);
+ int64_t get_register(Register reg, R31Type r31t = R31IsSP) const;
+ void set_wregister(Register reg, int32_t value, R31Type r31t = R31IsSP);
+ int32_t get_wregister(Register reg, R31Type r31t = R31IsSP) const;
int64_t get_pc() const;
+ int64_t get_last_pc() const;
void set_pc(int64_t pc);
// Accessor to the internal simulator stack top.
@@ -65,6 +72,18 @@
int64_t parameter2,
int64_t parameter3);
+ // Runtime and native call support.
+ enum CallKind {
+ kRuntimeCall,
+ kLeafRuntimeCall,
+ kLeafFloatRuntimeCall,
+ kBootstrapNativeCall,
+ kNativeCall
+ };
+ static uword RedirectExternalReference(uword function,
+ CallKind call_kind,
+ int argument_count);
+
void Longjmp(uword pc,
uword sp,
uword fp,
@@ -91,11 +110,13 @@
bool v_flag_;
// Simulator support.
+ int64_t last_pc_;
int64_t pc_;
char* stack_;
bool pc_modified_;
intptr_t icount_;
static int64_t flag_stop_sim_at_;
+ SimulatorSetjmpBuffer* last_setjmp_buffer_;
uword top_exit_frame_info_;
// Registered breakpoints.
@@ -162,6 +183,8 @@
bool ConditionallyExecute(Instr* instr);
+ void DoRedirectedCall(Instr* instr);
+
// Decode instructions.
void InstructionDecode(Instr* instr);
#define DECODE_OP(op) \
@@ -172,7 +195,16 @@
// Executes ARM64 instructions until the PC reaches kEndSimulatingPC.
void Execute();
+ // Longjmp support for exceptions.
+ SimulatorSetjmpBuffer* last_setjmp_buffer() {
+ return last_setjmp_buffer_;
+ }
+ void set_last_setjmp_buffer(SimulatorSetjmpBuffer* buffer) {
+ last_setjmp_buffer_ = buffer;
+ }
+
friend class SimulatorDebugger;
+ friend class SimulatorSetjmpBuffer;
DISALLOW_COPY_AND_ASSIGN(Simulator);
};
« no previous file with comments | « runtime/vm/runtime_entry_test.cc ('k') | runtime/vm/simulator_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698