| 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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |