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

Side by Side Diff: src/platform-linux.cc

Issue 9315032: ARM: Use ubfx and movw instructions to avoid a PC-relative load on Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 10 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/platform.h ('k') | src/spaces.h » ('j') | 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 static const int kMmapFdOffset = 0; 589 static const int kMmapFdOffset = 0;
590 590
591 VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { } 591 VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { }
592 592
593 VirtualMemory::VirtualMemory(size_t size) { 593 VirtualMemory::VirtualMemory(size_t size) {
594 address_ = ReserveRegion(size); 594 address_ = ReserveRegion(size);
595 size_ = size; 595 size_ = size;
596 } 596 }
597 597
598 598
599 VirtualMemory::VirtualMemory(size_t size, size_t alignment) 599 VirtualMemory::VirtualMemory(size_t size, size_t alignment, intptr_t preferred)
600 : address_(NULL), size_(0) { 600 : address_(NULL), size_(0) {
601 ASSERT(IsAligned(alignment, static_cast<intptr_t>(OS::AllocateAlignment()))); 601 ASSERT(IsAligned(alignment, static_cast<intptr_t>(OS::AllocateAlignment())));
602 size_t request_size = RoundUp(size + alignment, 602 size_t request_size = RoundUp(size + alignment,
603 static_cast<intptr_t>(OS::AllocateAlignment())); 603 static_cast<intptr_t>(OS::AllocateAlignment()));
604 void* reservation = mmap(OS::GetRandomMmapAddr(), 604 void* reservation = mmap(preferred == 0 ?
605 OS::GetRandomMmapAddr() :
606 reinterpret_cast<void*>(preferred),
605 request_size, 607 request_size,
606 PROT_NONE, 608 PROT_NONE,
607 MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, 609 MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE,
608 kMmapFd, 610 kMmapFd,
609 kMmapFdOffset); 611 kMmapFdOffset);
610 if (reservation == MAP_FAILED) return; 612 if (reservation == MAP_FAILED) return;
611 613
612 Address base = static_cast<Address>(reservation); 614 Address base = static_cast<Address>(reservation);
613 Address aligned_base = RoundUp(base, alignment); 615 Address aligned_base = RoundUp(base, alignment);
614 ASSERT_LE(base, aligned_base); 616 ASSERT_LE(base, aligned_base);
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 1242
1241 1243
1242 void Sampler::Stop() { 1244 void Sampler::Stop() {
1243 ASSERT(IsActive()); 1245 ASSERT(IsActive());
1244 SignalSender::RemoveActiveSampler(this); 1246 SignalSender::RemoveActiveSampler(this);
1245 SetActive(false); 1247 SetActive(false);
1246 } 1248 }
1247 1249
1248 1250
1249 } } // namespace v8::internal 1251 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698