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

Issue 320008: Add assembly constraints to disable some overly aggressive GCC optimizations (Closed)

Created:
11 years, 2 months ago by Markus (顧孟勤)
Modified:
9 years, 7 months ago
Reviewers:
agl
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

GCC's optimizer is getting more aggressive. It is no longer good enough to just pass the address of a structure as an input parameter to assembly code. The assembly code must also mark "memory" as getting clobbered, even if it only wants to read from the structure. This seems to be a result of strict aliasing and the lack of an ability for the assembly code to clearly say which pointers it dereferences. Furthermore, if the assembly code touches the stack (e.g. uses "push"), it must now mark the stack pointer as getting clobbered. Otherwise, GCC assumes that the red zone won't be clobbered, and that it is possible to use the stack pointer as an input register. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29829

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -7 lines) Patch
M sandbox/linux/seccomp/linux_syscall_support.h View 5 chunks +5 lines, -5 lines 0 comments Download
M sandbox/linux/seccomp/sandbox.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp/trusted_thread.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Markus (顧孟勤)
11 years, 2 months ago (2009-10-22 21:37:53 UTC) #1
agl
11 years, 2 months ago (2009-10-22 21:44:31 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698