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

Unified Diff: src/a64/simulator-a64.h

Issue 177533023: A64: Hardwire the decoder and the simulator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « src/a64/decoder-a64.h ('k') | src/a64/simulator-a64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/simulator-a64.h
diff --git a/src/a64/simulator-a64.h b/src/a64/simulator-a64.h
index 73d7a85e240fe35b255ddea5e038855781af2ab5..c4f1472bab231bc0b7ab4545a7d40ba45925c476 100644
--- a/src/a64/simulator-a64.h
+++ b/src/a64/simulator-a64.h
@@ -195,6 +195,7 @@ class Simulator : public DecoderVisitor {
explicit Simulator(Decoder<DispatchingDecoderVisitor>* decoder,
Isolate* isolate = NULL,
FILE* stream = stderr);
+ Simulator();
~Simulator();
// System functions.
@@ -334,10 +335,14 @@ class Simulator : public DecoderVisitor {
pc_modified_ = false;
}
+ virtual void Decode(Instruction* instr) {
+ decoder_->Decode(instr);
+ }
+
void ExecuteInstruction() {
ASSERT(IsAligned(reinterpret_cast<uintptr_t>(pc_), kInstructionSize));
CheckBreakNext();
- decoder_->Decode(pc_);
+ Decode(pc_);
LogProcessorState();
increment_pc();
CheckBreakpoints();
@@ -582,12 +587,18 @@ class Simulator : public DecoderVisitor {
int log_parameters() { return log_parameters_; }
void set_log_parameters(int new_parameters) {
+ log_parameters_ = new_parameters;
+ if (!decoder_) {
+ if (new_parameters & LOG_DISASM) {
+ PrintF("Run --debug-sim to dynamically turn on disassembler\n");
+ }
+ return;
+ }
if (new_parameters & LOG_DISASM) {
decoder_->InsertVisitorBefore(print_disasm_, this);
} else {
decoder_->RemoveVisitor(print_disasm_);
}
- log_parameters_ = new_parameters;
}
static inline const char* WRegNameForCode(unsigned code,
@@ -819,6 +830,8 @@ class Simulator : public DecoderVisitor {
char* last_debugger_input_;
private:
+ void Init(FILE* stream);
+
int log_parameters_;
Isolate* isolate_;
};
« no previous file with comments | « src/a64/decoder-a64.h ('k') | src/a64/simulator-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698