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

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

Issue 8337014: Increase ARM/MIPS simulators stack safety margin to 512 bytes (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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/arm/simulator-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 1352
1353 1353
1354 void Simulator::WriteB(int32_t addr, int8_t value) { 1354 void Simulator::WriteB(int32_t addr, int8_t value) {
1355 int8_t* ptr = reinterpret_cast<int8_t*>(addr); 1355 int8_t* ptr = reinterpret_cast<int8_t*>(addr);
1356 *ptr = value; 1356 *ptr = value;
1357 } 1357 }
1358 1358
1359 1359
1360 // Returns the limit of the stack area to enable checking for stack overflows. 1360 // Returns the limit of the stack area to enable checking for stack overflows.
1361 uintptr_t Simulator::StackLimit() const { 1361 uintptr_t Simulator::StackLimit() const {
1362 // Leave a safety margin of 256 bytes to prevent overrunning the stack when 1362 // Leave a safety margin of 512 bytes to prevent overrunning the stack when
1363 // pushing values. 1363 // pushing values.
1364 return reinterpret_cast<uintptr_t>(stack_) + 256; 1364 return reinterpret_cast<uintptr_t>(stack_) + 512;
1365 } 1365 }
1366 1366
1367 1367
1368 // Unsupported instructions use Format to print an error and stop execution. 1368 // Unsupported instructions use Format to print an error and stop execution.
1369 void Simulator::Format(Instruction* instr, const char* format) { 1369 void Simulator::Format(Instruction* instr, const char* format) {
1370 PrintF("Simulator found unsupported instruction:\n 0x%08x: %s\n", 1370 PrintF("Simulator found unsupported instruction:\n 0x%08x: %s\n",
1371 reinterpret_cast<intptr_t>(instr), format); 1371 reinterpret_cast<intptr_t>(instr), format);
1372 UNIMPLEMENTED_MIPS(); 1372 UNIMPLEMENTED_MIPS();
1373 } 1373 }
1374 1374
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 } 2817 }
2818 2818
2819 2819
2820 #undef UNSUPPORTED 2820 #undef UNSUPPORTED
2821 2821
2822 } } // namespace v8::internal 2822 } } // namespace v8::internal
2823 2823
2824 #endif // USE_SIMULATOR 2824 #endif // USE_SIMULATOR
2825 2825
2826 #endif // V8_TARGET_ARCH_MIPS 2826 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698