[PATCH] D14639: LLDB JIT needs android vector passing rules.

Stephen Hines via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 1 18:04:53 PST 2015


srhines added a comment.

In http://reviews.llvm.org/D14639#300077, @rnk wrote:

> Were these changes made to AOSP Clang to match upstream GCC, or some custom Android version of GCC? Where would one go to find ground truth on how these types should be passed?


These changes are reverting to an existing behavior before it was changed in r166043. This has nothing to do with GCC, and is purely related to Clang/LLVM as used on Android starting with the Honeycomb release in 2011. Android had already shipped APIs that used ARM's original ext-vector calling conventions (which treated them more like homogeneous aggregates). Later on, the ARM ABI was amended to reflect what Apple shipped in this change:

  commit 97f81573636068fb9536436188caadf030584e58
  Author: Manman Ren <mren at apple.com>
  Date:   Tue Oct 16 19:18:39 2012 +0000
  
      ARM ABI: passing illegal vector types as varargs.
      
      We expand varargs in clang and the call site is handled in the back end, it 
  is
      hard to match exactly how illegal vectors are handled in the backend. Theref
  ore,
      we legalize the illegal vector types in clang:
      if (Size <= 32), legalize to i32.
      if (Size == 64), legalize to v2i32.
      if (Size == 128), legalize to v4i32.
      if (Size > 128), use indirect.
      
      rdar://12439123
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166043 91177308-0d34-0410-b5e6-96231b3b80d8

This basically removes the need for a local patch that Android's platform toolchain/NDK has (and will continue to have), while other upstream users of Clang continue to generate potentially broken ext-vector code if they try to build using their own compiler.


http://reviews.llvm.org/D14639





More information about the cfe-commits mailing list