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

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

Issue 201843003: Robustified address calculations on A64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Feedback. Rebased. 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/macro-assembler-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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 template <typename T> 322 template <typename T>
323 void set_pc(T new_pc) { 323 void set_pc(T new_pc) {
324 ASSERT(sizeof(T) == sizeof(pc_)); 324 ASSERT(sizeof(T) == sizeof(pc_));
325 memcpy(&pc_, &new_pc, sizeof(T)); 325 memcpy(&pc_, &new_pc, sizeof(T));
326 pc_modified_ = true; 326 pc_modified_ = true;
327 } 327 }
328 Instruction* pc() { return pc_; } 328 Instruction* pc() { return pc_; }
329 329
330 void increment_pc() { 330 void increment_pc() {
331 if (!pc_modified_) { 331 if (!pc_modified_) {
332 pc_ = pc_->NextInstruction(); 332 pc_ = pc_->following();
333 } 333 }
334 334
335 pc_modified_ = false; 335 pc_modified_ = false;
336 } 336 }
337 337
338 virtual void Decode(Instruction* instr) { 338 virtual void Decode(Instruction* instr) {
339 decoder_->Decode(instr); 339 decoder_->Decode(instr);
340 } 340 }
341 341
342 void ExecuteInstruction() { 342 void ExecuteInstruction() {
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 static void UnregisterCTryCatch() { 907 static void UnregisterCTryCatch() {
908 Simulator::current(Isolate::Current())->PopAddress(); 908 Simulator::current(Isolate::Current())->PopAddress();
909 } 909 }
910 }; 910 };
911 911
912 #endif // !defined(USE_SIMULATOR) 912 #endif // !defined(USE_SIMULATOR)
913 913
914 } } // namespace v8::internal 914 } } // namespace v8::internal
915 915
916 #endif // V8_A64_SIMULATOR_A64_H_ 916 #endif // V8_A64_SIMULATOR_A64_H_
OLDNEW
« no previous file with comments | « src/a64/macro-assembler-a64.cc ('k') | src/a64/simulator-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698