<div dir="ltr">thanks again!<div>r226639.<br></div><div>Unfortunately, I don't have access to a aarch64 box, so no aarch64 testing is done for these patches on my side. <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 10:08 AM, Jakub Jelinek <span dir="ltr"><<a href="mailto:jakub@redhat.com" target="_blank">jakub@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<br>
aarch64-linux kernel has configurable 39, 42 or 47 bit virtual address<br>
space.  Most distros AFAIK use 42-bit VA right now, but there are also<br>
39-bit VA users too.  The ppc64 handling can be used for this just fine<br>
and support all the 3 sizes.<br>
<br>
There are other issues, like allocator32 not really being able to support<br>
the larger addres spaces, and hardcoded 39-bit address space size in other<br>
macros.<br>
<br>
--- compiler-rt/lib/sanitizer_common/sanitizer_posix.cc.jj      2014-12-15 19:50:53.618624013 +0100<br>
+++ compiler-rt/lib/sanitizer_common/sanitizer_posix.cc 2015-01-20 18:53:21.012780056 +0100<br>
@@ -78,16 +78,15 @@ static uptr GetKernelAreaSize() {<br>
<br>
 uptr GetMaxVirtualAddress() {<br>
 #if SANITIZER_WORDSIZE == 64<br>
-# if defined(__powerpc64__)<br>
+# if defined(__powerpc64__) || defined(__aarch64__)<br>
   // On PowerPC64 we have two different address space layouts: 44- and 46-bit.<br>
   // We somehow need to figure out which one we are using now and choose<br>
   // one of 0x00000fffffffffffUL and 0x00003fffffffffffUL.<br>
   // Note that with 'ulimit -s unlimited' the stack is moved away from the top<br>
   // of the address space, so simply checking the stack address is not enough.<br>
   // This should (does) work for both PowerPC64 Endian modes.<br>
+  // Similarly, aarch64 has multiple address space layouts: 39, 42 and 47-bit.<br>
   return (1ULL << (MostSignificantSetBitIndex(GET_CURRENT_FRAME()) + 1)) - 1;<br>
-# elif defined(__aarch64__)<br>
-  return (1ULL << 39) - 1;<br>
 # elif defined(__mips64)<br>
   return (1ULL << 40) - 1;  // 0x000000ffffffffffUL;<br>
 # else<br>
<br>
        Jakub<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>