Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Issue 508823007: Expose LLC's -force-align-stack flag to pnacl-translate (Closed)

Created:
6 years, 3 months ago by Derek Schuff
Modified:
6 years, 3 months ago
Reviewers:
Mark Seaborn, Nico
CC:
native-client-reviews_googlegroups.com
Project:
nacl
Visibility:
Public.

Description

Expose LLC's -force-align-stack flag to pnacl-translate x86-32 glibc's ld.so is built to maintain 4-byte stack alignment, instead of 16 bytes that we use everywhere else. This means the IRT must be built to tolerate 4-byte alignment when it is called. To build the IRT with pnacl-clang, we can use LLC's -force-align-stack flag which causes the stack to be realigned on function entry (it has always maintained 16 byte stack alignment calling out, but has assumed that the stack was aligned on entry). R=mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3910 Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=13672

Patch Set 1 #

Patch Set 2 : add test #

Total comments: 25

Patch Set 3 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -3 lines) Patch
M pnacl/driver/pnacl-translate.py View 1 1 chunk +1 line, -0 lines 0 comments Download
A tests/toolchain/call_with_misaligned_stack.S View 1 2 1 chunk +21 lines, -0 lines 0 comments Download
M tests/toolchain/nacl.scons View 1 2 2 chunks +19 lines, -2 lines 0 comments Download
A tests/toolchain/stackalign_test.c View 1 2 1 chunk +37 lines, -0 lines 0 comments Download
M toolchain_build/toolchain_build_pnacl.py View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Derek Schuff
6 years, 3 months ago (2014-08-27 20:04:03 UTC) #1
Derek Schuff
On 2014/08/27 20:04:03, Derek Schuff wrote: actually hold off, i'll also roll a test into ...
6 years, 3 months ago (2014-08-27 20:23:49 UTC) #2
Derek Schuff
added tests, ptal
6 years, 3 months ago (2014-08-28 00:31:36 UTC) #3
Mark Seaborn
LGTM https://codereview.chromium.org/508823007/diff/20001/tests/toolchain/call_with_misaligned_stack.S File tests/toolchain/call_with_misaligned_stack.S (right): https://codereview.chromium.org/508823007/diff/20001/tests/toolchain/call_with_misaligned_stack.S#newcode8 tests/toolchain/call_with_misaligned_stack.S:8: Call the argument with a stack pointer 4 ...
6 years, 3 months ago (2014-08-28 19:13:14 UTC) #4
Derek Schuff
https://codereview.chromium.org/508823007/diff/20001/tests/toolchain/call_with_misaligned_stack.S File tests/toolchain/call_with_misaligned_stack.S (right): https://codereview.chromium.org/508823007/diff/20001/tests/toolchain/call_with_misaligned_stack.S#newcode8 tests/toolchain/call_with_misaligned_stack.S:8: Call the argument with a stack pointer 4 bytes ...
6 years, 3 months ago (2014-08-28 22:07:25 UTC) #5
Derek Schuff
Committed patchset #3 (id:40001) manually as 13672 (presubmit successful).
6 years, 3 months ago (2014-08-28 22:30:47 UTC) #6
Nico
thakis@chromium.org changed reviewers: + thakis@chromium.org
6 years, 3 months ago (2014-08-29 04:34:09 UTC) #7
Nico
https://codereview.chromium.org/508823007/diff/20001/tests/toolchain/stackalign_test.c File tests/toolchain/stackalign_test.c (right): https://codereview.chromium.org/508823007/diff/20001/tests/toolchain/stackalign_test.c#newcode10 tests/toolchain/stackalign_test.c:10: void call_with_misaligned_stack(void (*func)()); On 2014/08/28 19:13:13, Mark Seaborn wrote: ...
6 years, 3 months ago (2014-08-29 04:34:09 UTC) #8
Mark Seaborn
6 years, 3 months ago (2014-08-29 04:50:24 UTC) #9
On 28 August 2014 21:34, <thakis@chromium.org> wrote:

>
> https://codereview.chromium.org/508823007/diff/20001/
> tests/toolchain/stackalign_test.c
> File tests/toolchain/stackalign_test.c (right):
>
> https://codereview.chromium.org/508823007/diff/20001/
> tests/toolchain/stackalign_test.c#newcode10
> tests/toolchain/stackalign_test.c:10: void
> call_with_misaligned_stack(void (*func)());
> On 2014/08/28 19:13:13, Mark Seaborn wrote:
>
>> "()" -> "(void)"
>>
>
>  This is supposed to be getting compiled with -Wstrict-prototypes.
>>
>
>  Apparently -Wstrict-prototypes is broken in Clang.
>>
>
> If you find warnings that don't work right in clang, please file a bug
> at http://llvm.org/bugs and send me a link to it. (Or just send me an
> email, if you don't want to create a llvm bugzilla account.) We might be
> able to fix things.


Sure:  http://llvm.org/bugs/show_bug.cgi?id=20796

Cheers,
Mark

-- 
You received this message because you are subscribed to the Google Groups
"Native-Client-Reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to native-client-reviews+unsubscribe@googlegroups.com.
To post to this group, send email to native-client-reviews@googlegroups.com.
Visit this group at http://groups.google.com/group/native-client-reviews.
For more options, visit https://groups.google.com/d/optout.

Powered by Google App Engine
This is Rietveld 408576698