]> granicus.if.org Git - clang/commit
[x32/NaCl] Check if method pointers straddle an eightbyte to classify Hi
authorJan Wen Voung <jvoung@google.com>
Thu, 2 Oct 2014 16:56:57 +0000 (16:56 +0000)
committerJan Wen Voung <jvoung@google.com>
Thu, 2 Oct 2014 16:56:57 +0000 (16:56 +0000)
commit247809b2fa49d6109ca85c04b9f6b247771baa93
tree556bdc75a5344ded048e54b897fd73e10c59af26
parent96a2387e6c0fea873c7fc99ae6622e7e18a8dad5
[x32/NaCl] Check if method pointers straddle an eightbyte to classify Hi

Summary:
Currently, with struct my_struct { int x; method_ptr y; };
a call to foo(my_struct s) may end up dropping the last 4 bytes
of the method pointer for x86_64 NaCl and x32.

When checking Has64BitPointers, also check if the method pointer
straddles an eightbyte boundary and classify Hi as well as Lo if needed.

Test Plan: test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp

Reviewers: dschuff, pavel.v.chupin

Subscribers: jfb

Differential Revision: http://reviews.llvm.org/D5555

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218889 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetInfo.cpp
test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp [new file with mode: 0644]
test/CodeGenCXX/x86_64-arguments.cpp