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

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
Index: runtime/vm/simulator_arm64.h
===================================================================
--- runtime/vm/simulator_arm64.h (revision 35155)
+++ runtime/vm/simulator_arm64.h (working copy)
@@ -22,6 +22,7 @@
namespace dart {
class Isolate;
+class SimulatorSetjmpBuffer;
class Simulator {
public:
@@ -41,6 +42,7 @@
int32_t get_wregister(Register reg, R31Type r31t = R31IsUndef) 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 +67,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 +105,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 +178,8 @@
bool ConditionallyExecute(Instr* instr);
+ void DoRedirectedCall(Instr* instr);
+
// Decode instructions.
void InstructionDecode(Instr* instr);
#define DECODE_OP(op) \
@@ -172,7 +190,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);
};

Powered by Google App Engine
This is Rietveld 408576698