| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void Assembler::emitp(void* x, RelocInfo::Mode rmode) { | 54 void Assembler::emitp(void* x, RelocInfo::Mode rmode) { |
| 55 uintptr_t value = reinterpret_cast<uintptr_t>(x); | 55 uintptr_t value = reinterpret_cast<uintptr_t>(x); |
| 56 Memory::uintptr_at(pc_) = value; | 56 Memory::uintptr_at(pc_) = value; |
| 57 if (!RelocInfo::IsNone(rmode)) { | 57 if (!RelocInfo::IsNone(rmode)) { |
| 58 RecordRelocInfo(rmode, value); | 58 RecordRelocInfo(rmode, value); |
| 59 } | 59 } |
| 60 pc_ += sizeof(uintptr_t); | 60 pc_ += sizeof(uintptr_t); |
| 61 } | 61 } |
| 62 | 62 |
| 63 | 63 |
| 64 void Assembler::emitq(uint64_t x, RelocInfo::Mode rmode) { | 64 void Assembler::emitq(uint64_t x) { |
| 65 Memory::uint64_at(pc_) = x; | 65 Memory::uint64_at(pc_) = x; |
| 66 if (!RelocInfo::IsNone(rmode)) { | |
| 67 RecordRelocInfo(rmode, x); | |
| 68 } | |
| 69 pc_ += sizeof(uint64_t); | 66 pc_ += sizeof(uint64_t); |
| 70 } | 67 } |
| 71 | 68 |
| 72 | 69 |
| 73 void Assembler::emitw(uint16_t x) { | 70 void Assembler::emitw(uint16_t x) { |
| 74 Memory::uint16_at(pc_) = x; | 71 Memory::uint16_at(pc_) = x; |
| 75 pc_ += sizeof(uint16_t); | 72 pc_ += sizeof(uint16_t); |
| 76 } | 73 } |
| 77 | 74 |
| 78 | 75 |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 ASSERT(len_ == 1 || len_ == 2); | 536 ASSERT(len_ == 1 || len_ == 2); |
| 540 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 537 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
| 541 *p = disp; | 538 *p = disp; |
| 542 len_ += sizeof(int32_t); | 539 len_ += sizeof(int32_t); |
| 543 } | 540 } |
| 544 | 541 |
| 545 | 542 |
| 546 } } // namespace v8::internal | 543 } } // namespace v8::internal |
| 547 | 544 |
| 548 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 545 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
| OLD | NEW |