Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2669)

Issue 6811072: Add alignment to code blocks with jump tables. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by chrisha
Modified:
11 years, 6 months ago
Reviewers:
Roger McFarlane, Siggi
CC:
sawbuck-changes_googlegroups.com
Base URL:
http://sawbuck.googlecode.com/svn/trunk
Visibility:
Public.

Description

Add alignment to code blocks with jump tables. This will reduce our misaligned memory accesses. BUG= Committed: https://code.google.com/p/sawbuck/source/detail?r=1217

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -1 line) Patch
M syzygy/pe/decomposer.cc View 1 2 chunks +54 lines, -1 line 0 comments Download
M syzygy/pe/decomposer_unittest.cc View 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 5
chrisha
PTAL.
11 years, 6 months ago (2012-11-02 17:39:17 UTC) #1
Siggi
nice - lgtm! https://codereview.appspot.com/6811072/diff/1/syzygy/pe/decomposer.cc File syzygy/pe/decomposer.cc (right): https://codereview.appspot.com/6811072/diff/1/syzygy/pe/decomposer.cc#newcode762 syzygy/pe/decomposer.cc:762: DCHECK(block != NULL); nit: DCHECK block ...
11 years, 6 months ago (2012-11-02 17:47:05 UTC) #2
Roger McFarlane
Sweet! https://codereview.appspot.com/6811072/diff/1/syzygy/pe/decomposer.cc File syzygy/pe/decomposer.cc (right): https://codereview.appspot.com/6811072/diff/1/syzygy/pe/decomposer.cc#newcode774 syzygy/pe/decomposer.cc:774: // If the jump table is misaligned we ...
11 years, 6 months ago (2012-11-02 17:47:26 UTC) #3
Roger McFarlane
Otherwise, LGTM On Fri, Nov 2, 2012 at 1:47 PM, <rogerm@chromium.org> wrote: > Sweet! > ...
11 years, 6 months ago (2012-11-02 17:50:00 UTC) #4
chrisha
11 years, 6 months ago (2012-11-02 17:51:00 UTC) #5
Thanks, committing.

https://codereview.appspot.com/6811072/diff/1/syzygy/pe/decomposer.cc
File syzygy/pe/decomposer.cc (right):

https://codereview.appspot.com/6811072/diff/1/syzygy/pe/decomposer.cc#newcode762
syzygy/pe/decomposer.cc:762: DCHECK(block != NULL);
On 2012/11/02 17:47:05, Siggi wrote:
> nit: DCHECK block type for good measure?

Done.

https://codereview.appspot.com/6811072/diff/1/syzygy/pe/decomposer.cc#newcode774
syzygy/pe/decomposer.cc:774: // If the jump table is misaligned we can return
false immediately.
On 2012/11/02 17:47:26, Roger McFarlane wrote:
> if _a_ jump table

Done.

> If there a multiple jump tables with differing alignment, do we want to
preserve
> their original alignnment.
> 
> Similarly, I would think we would want to preserve case table alighment as
well.
> For example, if I'm indexing into 32-bit case table data, I would presumably
> want that to remain aligned as well.

If they have differing alignment, there's something weird going on and I simply
pass. As to case tables, we don't know anything about the size of their contents
and you never see a case table without a jump table, so their alignments will be
preserved as a side effect.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b