diff options
author | Mark Mentovai <mark@chromium.org> | 2011-09-22 06:00:00 +0400 |
---|---|---|
committer | Mark Mentovai <mark@chromium.org> | 2011-09-22 06:00:00 +0400 |
commit | c0a35913578078ea3212eab46c5b544a98c3e83d (patch) | |
tree | 31a0a75f8642ad8f5901046dae9a050e06907dda | |
parent | 87f491f8acef924d2ba90dd55fc23ad64f9d5bbd (diff) |
Go back to pre-51ae3d199463fa84548f466d649f0821d579fdaf branch islands for PowerPC. Because PowerPC uses ba (branch absolute) to jump to branch islands, the islands must be somewhere in the lowest or highest 32MB of address space.
-rw-r--r-- | mach_override/mach_override.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mach_override/mach_override.c b/mach_override/mach_override.c index 8a4cf95..a4464fd 100644 --- a/mach_override/mach_override.c +++ b/mach_override/mach_override.c @@ -370,7 +370,10 @@ allocateBranchIsland( err = host_page_size( mach_host_self(), &pageSize ); if( !err ) { assert( sizeof( BranchIsland ) <= pageSize ); -#if defined(__x86_64__) +#if defined(__ppc__) || defined(__POWERPC__) + vm_address_t first = 0xfeffffff; + vm_address_t last = 0xfe000000 + pageSize; +#elif defined(__x86_64__) vm_address_t first = (uint64_t)originalFunctionAddress & ~(uint64_t)(((uint64_t)1 << 31) - 1) | ((uint64_t)1 << 31); // start in the middle of the page? vm_address_t last = 0x0; #else |