| OLD | NEW |
| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 call_address >= prev_call_address + patch_size()); | 76 call_address >= prev_call_address + patch_size()); |
| 77 ASSERT(call_address + patch_size() <= code->instruction_end()); | 77 ASSERT(call_address + patch_size() <= code->instruction_end()); |
| 78 #ifdef DEBUG | 78 #ifdef DEBUG |
| 79 prev_call_address = call_address; | 79 prev_call_address = call_address; |
| 80 #endif | 80 #endif |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 | 84 |
| 85 static const byte kJnsInstruction = 0x79; | 85 static const byte kJnsInstruction = 0x79; |
| 86 #if V8_USE_31_BIT_SMI_VALUE |
| 87 // The Smi::FromInt(reset_value) could be embedded as 4-byte in the generated |
| 88 // instruction stream from FullCodeGenerator::EmitProfilingCounterReset. |
| 89 static const byte kJnsOffset = 0x19; |
| 90 #else |
| 86 static const byte kJnsOffset = 0x1d; | 91 static const byte kJnsOffset = 0x1d; |
| 92 #endif |
| 87 static const byte kCallInstruction = 0xe8; | 93 static const byte kCallInstruction = 0xe8; |
| 88 static const byte kNopByteOne = 0x66; | 94 static const byte kNopByteOne = 0x66; |
| 89 static const byte kNopByteTwo = 0x90; | 95 static const byte kNopByteTwo = 0x90; |
| 90 | 96 |
| 91 // The back edge bookkeeping code matches the pattern: | 97 // The back edge bookkeeping code matches the pattern: |
| 92 // | 98 // |
| 93 // add <profiling_counter>, <-delta> | 99 // add <profiling_counter>, <-delta> |
| 94 // jns ok | 100 // jns ok |
| 95 // call <stack guard> | 101 // call <stack guard> |
| 96 // ok: | 102 // ok: |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 SetFrameSlot(offset, value); | 593 SetFrameSlot(offset, value); |
| 588 } | 594 } |
| 589 | 595 |
| 590 | 596 |
| 591 #undef __ | 597 #undef __ |
| 592 | 598 |
| 593 | 599 |
| 594 } } // namespace v8::internal | 600 } } // namespace v8::internal |
| 595 | 601 |
| 596 #endif // V8_TARGET_ARCH_X64 | 602 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |