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

Issue 10860010: Fix uint8_t/unit32_t mix, always use wordsize access (Closed)

Created:
8 years, 4 months ago by khim
Modified:
8 years, 4 months ago
Reviewers:
halyavin
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Fix uint8_t/unit32_t mix, always use wordsize access BUG=http://code.google.com/p/nativeclient/issues/detail?id=2597 TEST=trybots (no change in functionality) Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=9501

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -30 lines) Patch
M src/trusted/validator_ragel/gen/validator_x86_32.c View 1 chunk +2 lines, -2 lines 0 comments Download
M src/trusted/validator_ragel/gen/validator_x86_64.c View 1 chunk +2 lines, -2 lines 0 comments Download
M src/trusted/validator_ragel/unreviewed/validator_internal.h View 1 6 chunks +32 lines, -22 lines 0 comments Download
M src/trusted/validator_ragel/unreviewed/validator_x86_32.rl View 1 chunk +2 lines, -2 lines 0 comments Download
M src/trusted/validator_ragel/unreviewed/validator_x86_64.rl View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
khim
8 years, 4 months ago (2012-08-17 15:09:21 UTC) #1
halyavin
8 years, 4 months ago (2012-08-17 15:22:37 UTC) #2
lgtm

https://chromiumcodereview.appspot.com/10860010/diff/1/src/trusted/validator_...
File src/trusted/validator_ragel/unreviewed/validator_internal.h (right):

https://chromiumcodereview.appspot.com/10860010/diff/1/src/trusted/validator_...
src/trusted/validator_ragel/unreviewed/validator_internal.h:147: size_t
byte_count = (indexes + NACL_HOST_WORDSIZE - 1) / NACL_HOST_WORDSIZE;
byte_count->word_count

https://chromiumcodereview.appspot.com/10860010/diff/1/src/trusted/validator_...
src/trusted/validator_ragel/unreviewed/validator_internal.h:148: bitmap_word
*bitmap = malloc(byte_count/(NACL_HOST_WORDSIZE/8));
*sizeof(bitmap_word)

https://chromiumcodereview.appspot.com/10860010/diff/1/src/trusted/validator_...
src/trusted/validator_ragel/unreviewed/validator_internal.h:157: (1 << (index %
NACL_HOST_WORDSIZE))) != 0;
((bitmap_word)1)

https://chromiumcodereview.appspot.com/10860010/diff/1/src/trusted/validator_...
src/trusted/validator_ragel/unreviewed/validator_internal.h:161: bitmap[index /
NACL_HOST_WORDSIZE] |= 1 << (index % NACL_HOST_WORDSIZE);
same

https://chromiumcodereview.appspot.com/10860010/diff/1/src/trusted/validator_...
src/trusted/validator_ragel/unreviewed/validator_internal.h:165: bitmap[index /
NACL_HOST_WORDSIZE] &= ~(1 << (index % NACL_HOST_WORDSIZE));
same

Powered by Google App Engine
This is Rietveld 408576698