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

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

Issue 11037023: Use movw/movt instead of constant pool on ARMv7 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits Created 8 years, 2 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
« no previous file with comments | « src/x64/assembler-x64.h ('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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 Address Assembler::target_address_at(Address pc) { 188 Address Assembler::target_address_at(Address pc) {
189 return Memory::int32_at(pc) + pc + 4; 189 return Memory::int32_at(pc) + pc + 4;
190 } 190 }
191 191
192 192
193 void Assembler::set_target_address_at(Address pc, Address target) { 193 void Assembler::set_target_address_at(Address pc, Address target) {
194 Memory::int32_at(pc) = static_cast<int32_t>(target - pc - 4); 194 Memory::int32_at(pc) = static_cast<int32_t>(target - pc - 4);
195 CPU::FlushICache(pc, sizeof(int32_t)); 195 CPU::FlushICache(pc, sizeof(int32_t));
196 } 196 }
197 197
198
199 Address Assembler::target_address_from_return_address(Address pc) {
200 return pc - kCallTargetAddressOffset;
201 }
202
203
198 Handle<Object> Assembler::code_target_object_handle_at(Address pc) { 204 Handle<Object> Assembler::code_target_object_handle_at(Address pc) {
199 return code_targets_[Memory::int32_at(pc)]; 205 return code_targets_[Memory::int32_at(pc)];
200 } 206 }
201 207
202 // ----------------------------------------------------------------------------- 208 // -----------------------------------------------------------------------------
203 // Implementation of RelocInfo 209 // Implementation of RelocInfo
204 210
205 // The modes possibly affected by apply must be in kApplyMask. 211 // The modes possibly affected by apply must be in kApplyMask.
206 void RelocInfo::apply(intptr_t delta) { 212 void RelocInfo::apply(intptr_t delta) {
207 if (IsInternalReference(rmode_)) { 213 if (IsInternalReference(rmode_)) {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 ASSERT(len_ == 1 || len_ == 2); 484 ASSERT(len_ == 1 || len_ == 2);
479 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); 485 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]);
480 *p = disp; 486 *p = disp;
481 len_ += sizeof(int32_t); 487 len_ += sizeof(int32_t);
482 } 488 }
483 489
484 490
485 } } // namespace v8::internal 491 } } // namespace v8::internal
486 492
487 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 493 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698