| OLD | NEW |
| 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 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 | 1362 |
| 1363 | 1363 |
| 1364 void Simulator::WriteB(int32_t addr, int8_t value) { | 1364 void Simulator::WriteB(int32_t addr, int8_t value) { |
| 1365 int8_t* ptr = reinterpret_cast<int8_t*>(addr); | 1365 int8_t* ptr = reinterpret_cast<int8_t*>(addr); |
| 1366 *ptr = value; | 1366 *ptr = value; |
| 1367 } | 1367 } |
| 1368 | 1368 |
| 1369 | 1369 |
| 1370 // Returns the limit of the stack area to enable checking for stack overflows. | 1370 // Returns the limit of the stack area to enable checking for stack overflows. |
| 1371 uintptr_t Simulator::StackLimit() const { | 1371 uintptr_t Simulator::StackLimit() const { |
| 1372 // Leave a safety margin of 512 bytes to prevent overrunning the stack when | 1372 // Leave a safety margin of 1024 bytes to prevent overrunning the stack when |
| 1373 // pushing values. | 1373 // pushing values. |
| 1374 return reinterpret_cast<uintptr_t>(stack_) + 512; | 1374 return reinterpret_cast<uintptr_t>(stack_) + 1024; |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 | 1377 |
| 1378 // Unsupported instructions use Format to print an error and stop execution. | 1378 // Unsupported instructions use Format to print an error and stop execution. |
| 1379 void Simulator::Format(Instruction* instr, const char* format) { | 1379 void Simulator::Format(Instruction* instr, const char* format) { |
| 1380 PrintF("Simulator found unsupported instruction:\n 0x%08x: %s\n", | 1380 PrintF("Simulator found unsupported instruction:\n 0x%08x: %s\n", |
| 1381 reinterpret_cast<intptr_t>(instr), format); | 1381 reinterpret_cast<intptr_t>(instr), format); |
| 1382 UNIMPLEMENTED_MIPS(); | 1382 UNIMPLEMENTED_MIPS(); |
| 1383 } | 1383 } |
| 1384 | 1384 |
| (...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2827 } | 2827 } |
| 2828 | 2828 |
| 2829 | 2829 |
| 2830 #undef UNSUPPORTED | 2830 #undef UNSUPPORTED |
| 2831 | 2831 |
| 2832 } } // namespace v8::internal | 2832 } } // namespace v8::internal |
| 2833 | 2833 |
| 2834 #endif // USE_SIMULATOR | 2834 #endif // USE_SIMULATOR |
| 2835 | 2835 |
| 2836 #endif // V8_TARGET_ARCH_MIPS | 2836 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |