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

Side by Side Diff: src/arm/simulator-arm.cc

Issue 180243010: Delete the simulator when we don't need it anymore (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates 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 | « no previous file | src/isolate.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 // The lr and pc are initialized to a known bad value that will cause an 789 // The lr and pc are initialized to a known bad value that will cause an
790 // access violation if the simulator ever tries to execute it. 790 // access violation if the simulator ever tries to execute it.
791 registers_[pc] = bad_lr; 791 registers_[pc] = bad_lr;
792 registers_[lr] = bad_lr; 792 registers_[lr] = bad_lr;
793 InitializeCoverage(); 793 InitializeCoverage();
794 794
795 last_debugger_input_ = NULL; 795 last_debugger_input_ = NULL;
796 } 796 }
797 797
798 798
799 Simulator::~Simulator() {
800 }
801
802
799 // When the generated code calls an external reference we need to catch that in 803 // When the generated code calls an external reference we need to catch that in
800 // the simulator. The external reference will be a function compiled for the 804 // the simulator. The external reference will be a function compiled for the
801 // host architecture. We need to call that function instead of trying to 805 // host architecture. We need to call that function instead of trying to
802 // execute it with the simulator. We do that by redirecting the external 806 // execute it with the simulator. We do that by redirecting the external
803 // reference to a svc (Supervisor Call) instruction that is handled by 807 // reference to a svc (Supervisor Call) instruction that is handled by
804 // the simulator. We write the original destination of the jump just at a known 808 // the simulator. We write the original destination of the jump just at a known
805 // offset from the svc instruction so the simulator knows what to call. 809 // offset from the svc instruction so the simulator knows what to call.
806 class Redirection { 810 class Redirection {
807 public: 811 public:
808 Redirection(void* external_function, ExternalReference::Type type) 812 Redirection(void* external_function, ExternalReference::Type type)
(...skipping 3037 matching lines...) Expand 10 before | Expand all | Expand 10 after
3846 uintptr_t address = *stack_slot; 3850 uintptr_t address = *stack_slot;
3847 set_register(sp, current_sp + sizeof(uintptr_t)); 3851 set_register(sp, current_sp + sizeof(uintptr_t));
3848 return address; 3852 return address;
3849 } 3853 }
3850 3854
3851 } } // namespace v8::internal 3855 } } // namespace v8::internal
3852 3856
3853 #endif // USE_SIMULATOR 3857 #endif // USE_SIMULATOR
3854 3858
3855 #endif // V8_TARGET_ARCH_ARM 3859 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698