Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: src/x64/assembler-x64-inl.h

Issue 19752004: Add the emitp function for X64 assembler (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/x64/assembler-x64.h ('K') | « src/x64/assembler-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
38 namespace internal { 38 namespace internal {
39 39
40 40
41 // ----------------------------------------------------------------------------- 41 // -----------------------------------------------------------------------------
42 // Implementation of Assembler 42 // Implementation of Assembler
43 43
44 44
45 static const byte kCallOpcode = 0xE8; 45 static const byte kCallOpcode = 0xE8;
46 46
47 47
48 void Assembler::emit(uintptr_t x, RelocInfo::Mode rmode) {
49 Memory::uintptr_at(pc_) = x;
50 if (!RelocInfo::IsNone(rmode)) {
51 RecordRelocInfo(rmode, x);
52 }
53 pc_ += sizeof(uintptr_t);
54 }
55
56
48 void Assembler::emitl(uint32_t x) { 57 void Assembler::emitl(uint32_t x) {
49 Memory::uint32_at(pc_) = x; 58 Memory::uint32_at(pc_) = x;
50 pc_ += sizeof(uint32_t); 59 pc_ += sizeof(uint32_t);
51 } 60 }
52 61
53 62
54 void Assembler::emitq(uint64_t x, RelocInfo::Mode rmode) {
55 Memory::uint64_at(pc_) = x;
56 if (!RelocInfo::IsNone(rmode)) {
57 RecordRelocInfo(rmode, x);
58 }
59 pc_ += sizeof(uint64_t);
60 }
61
62
63 void Assembler::emitw(uint16_t x) { 63 void Assembler::emitw(uint16_t x) {
64 Memory::uint16_at(pc_) = x; 64 Memory::uint16_at(pc_) = x;
65 pc_ += sizeof(uint16_t); 65 pc_ += sizeof(uint16_t);
66 } 66 }
67 67
68 68
69 void Assembler::emit_code_target(Handle<Code> target, 69 void Assembler::emit_code_target(Handle<Code> target,
70 RelocInfo::Mode rmode, 70 RelocInfo::Mode rmode,
71 TypeFeedbackId ast_id) { 71 TypeFeedbackId ast_id) {
72 ASSERT(RelocInfo::IsCodeTarget(rmode)); 72 ASSERT(RelocInfo::IsCodeTarget(rmode));
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 ASSERT(len_ == 1 || len_ == 2); 529 ASSERT(len_ == 1 || len_ == 2);
530 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); 530 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]);
531 *p = disp; 531 *p = disp;
532 len_ += sizeof(int32_t); 532 len_ += sizeof(int32_t);
533 } 533 }
534 534
535 535
536 } } // namespace v8::internal 536 } } // namespace v8::internal
537 537
538 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 538 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« src/x64/assembler-x64.h ('K') | « src/x64/assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698