This is an archive of the discontinued LLVM Phabricator instance.

[x32/NaCl] Check if method pointers straddle an eightbyte to classify Hi
ClosedPublic

Authored by jvoung on Sep 30 2014, 6:02 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

jvoung updated this revision to Diff 14259.Sep 30 2014, 6:02 PM
jvoung retitled this revision from to [x32/NaCl] Check if method pointers straddle an eightbyte to classify Hi.
jvoung updated this object.
jvoung edited the test plan for this revision. (Show Details)
jvoung added reviewers: dschuff, pavel.v.chupin.
jvoung updated this revision to Diff 14260.Sep 30 2014, 6:03 PM

Lo instead of Current.

jvoung added a subscriber: Unknown Object (MLST).Sep 30 2014, 6:10 PM
jvoung updated this revision to Diff 14261.Sep 30 2014, 6:46 PM

Give test struct a better name.

pavel.v.chupin edited edge metadata.Oct 1 2014, 9:34 AM

LGTM, but I'd recommend to wait for other reviewers reply and/or add more reviewers who changed this code in the past.

dschuff accepted this revision.Oct 1 2014, 9:45 AM
dschuff edited edge metadata.
This revision is now accepted and ready to land.Oct 1 2014, 9:45 AM

LGTM, for the email record.

jvoung closed this revision.Oct 2 2014, 10:07 AM
jvoung updated this revision to Diff 14331.

Closed by commit rL218889 (authored by @jvoung).