| 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 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1583 } else { | 1583 } else { |
| 1584 ASSERT(src->is_unused()); | 1584 ASSERT(src->is_unused()); |
| 1585 int32_t current = pc_offset(); | 1585 int32_t current = pc_offset(); |
| 1586 emitl(current); | 1586 emitl(current); |
| 1587 src->link_to(current); | 1587 src->link_to(current); |
| 1588 } | 1588 } |
| 1589 } | 1589 } |
| 1590 | 1590 |
| 1591 | 1591 |
| 1592 void Assembler::movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) { | 1592 void Assembler::movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) { |
| 1593 ALLOW_HANDLE_DEREF(isolate(), "using and embedding raw address"); |
| 1593 // If there is no relocation info, emit the value of the handle efficiently | 1594 // If there is no relocation info, emit the value of the handle efficiently |
| 1594 // (possibly using less that 8 bytes for the value). | 1595 // (possibly using less that 8 bytes for the value). |
| 1595 if (RelocInfo::IsNone(mode)) { | 1596 if (RelocInfo::IsNone(mode)) { |
| 1596 // There is no possible reason to store a heap pointer without relocation | 1597 // There is no possible reason to store a heap pointer without relocation |
| 1597 // info, so it must be a smi. | 1598 // info, so it must be a smi. |
| 1598 ASSERT(value->IsSmi()); | 1599 ASSERT(value->IsSmi()); |
| 1599 movq(dst, reinterpret_cast<int64_t>(*value), RelocInfo::NONE64); | 1600 movq(dst, reinterpret_cast<int64_t>(*value), RelocInfo::NONE64); |
| 1600 } else { | 1601 } else { |
| 1601 EnsureSpace ensure_space(this); | 1602 EnsureSpace ensure_space(this); |
| 1602 ASSERT(value->IsHeapObject()); | 1603 ASSERT(value->IsHeapObject()); |
| (...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3105 bool RelocInfo::IsCodedSpecially() { | 3106 bool RelocInfo::IsCodedSpecially() { |
| 3106 // The deserializer needs to know whether a pointer is specially coded. Being | 3107 // The deserializer needs to know whether a pointer is specially coded. Being |
| 3107 // specially coded on x64 means that it is a relative 32 bit address, as used | 3108 // specially coded on x64 means that it is a relative 32 bit address, as used |
| 3108 // by branch instructions. | 3109 // by branch instructions. |
| 3109 return (1 << rmode_) & kApplyMask; | 3110 return (1 << rmode_) & kApplyMask; |
| 3110 } | 3111 } |
| 3111 | 3112 |
| 3112 } } // namespace v8::internal | 3113 } } // namespace v8::internal |
| 3113 | 3114 |
| 3114 #endif // V8_TARGET_ARCH_X64 | 3115 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |