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

Side by Side Diff: src/a64/simulator-a64.h

Issue 181253002: A64: Make the Decoder a template (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« no previous file with comments | « src/a64/disasm-a64.cc ('k') | src/a64/simulator-a64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 protected: 186 protected:
187 uint8_t value_[kSizeInBytes]; 187 uint8_t value_[kSizeInBytes];
188 }; 188 };
189 typedef SimRegisterBase<kXRegSizeInBytes> SimRegister; // r0-r31 189 typedef SimRegisterBase<kXRegSizeInBytes> SimRegister; // r0-r31
190 typedef SimRegisterBase<kDRegSizeInBytes> SimFPRegister; // v0-v31 190 typedef SimRegisterBase<kDRegSizeInBytes> SimFPRegister; // v0-v31
191 191
192 192
193 class Simulator : public DecoderVisitor { 193 class Simulator : public DecoderVisitor {
194 public: 194 public:
195 explicit Simulator(Decoder* decoder, 195 explicit Simulator(Decoder<DispatchingDecoderVisitor>* decoder,
196 Isolate* isolate = NULL, 196 Isolate* isolate = NULL,
197 FILE* stream = stderr); 197 FILE* stream = stderr);
198 ~Simulator(); 198 ~Simulator();
199 199
200 // System functions. 200 // System functions.
201 201
202 static void Initialize(Isolate* isolate); 202 static void Initialize(Isolate* isolate);
203 203
204 static Simulator* current(v8::internal::Isolate* isolate); 204 static Simulator* current(v8::internal::Isolate* isolate);
205 205
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 789
790 static const uint32_t kConditionFlagsMask = 0xf0000000; 790 static const uint32_t kConditionFlagsMask = 0xf0000000;
791 791
792 // Stack 792 // Stack
793 byte* stack_; 793 byte* stack_;
794 static const intptr_t stack_protection_size_ = KB; 794 static const intptr_t stack_protection_size_ = KB;
795 intptr_t stack_size_; 795 intptr_t stack_size_;
796 byte* stack_limit_; 796 byte* stack_limit_;
797 // TODO(aleram): protect the stack. 797 // TODO(aleram): protect the stack.
798 798
799 Decoder* decoder_; 799 Decoder<DispatchingDecoderVisitor>* decoder_;
800 Decoder* disassembler_decoder_; 800 Decoder<DispatchingDecoderVisitor>* disassembler_decoder_;
801 801
802 // Indicates if the pc has been modified by the instruction and should not be 802 // Indicates if the pc has been modified by the instruction and should not be
803 // automatically incremented. 803 // automatically incremented.
804 bool pc_modified_; 804 bool pc_modified_;
805 Instruction* pc_; 805 Instruction* pc_;
806 806
807 static const char* xreg_names[]; 807 static const char* xreg_names[];
808 static const char* wreg_names[]; 808 static const char* wreg_names[];
809 static const char* sreg_names[]; 809 static const char* sreg_names[];
810 static const char* dreg_names[]; 810 static const char* dreg_names[];
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 static void UnregisterCTryCatch() { 859 static void UnregisterCTryCatch() {
860 Simulator::current(Isolate::Current())->PopAddress(); 860 Simulator::current(Isolate::Current())->PopAddress();
861 } 861 }
862 }; 862 };
863 863
864 #endif // !defined(USE_SIMULATOR) 864 #endif // !defined(USE_SIMULATOR)
865 865
866 } } // namespace v8::internal 866 } } // namespace v8::internal
867 867
868 #endif // V8_A64_SIMULATOR_A64_H_ 868 #endif // V8_A64_SIMULATOR_A64_H_
OLDNEW
« no previous file with comments | « src/a64/disasm-a64.cc ('k') | src/a64/simulator-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698