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

Issue 13290: Fixed bug in large switch tables on arm. (Closed)

Created:
12 years ago by Lasse Reichstein
Modified:
9 years, 6 months ago
Reviewers:
iposva
CC:
v8-dev
Visibility:
Public.

Description

Arm codegen could emit const pool in the middle of jump table.

Patch Set 1 #

Total comments: 5

Patch Set 2 : Addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -18 lines) Patch
M src/assembler-arm.h View 2 chunks +8 lines, -8 lines 0 comments Download
M src/codegen-arm.cc View 1 chunk +1 line, -9 lines 0 comments Download
M src/constants-arm.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/macro-assembler-arm.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/macro-assembler-arm.cc View 1 1 chunk +14 lines, -0 lines 0 comments Download
M test/mjsunit/switch.js View 1 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein
A smallish code review, plasee. http://codereview.chromium.org/13290/diff/1/6 File src/utils.h (right): http://codereview.chromium.org/13290/diff/1/6#newcode544 Line 544: ptr[0] = static_cast<byte>(value ...
12 years ago (2008-12-09 15:29:47 UTC) #1
Lasse Reichstein
http://codereview.chromium.org/13290/diff/1/6 File src/utils.h (right): http://codereview.chromium.org/13290/diff/1/6#newcode544 Line 544: ptr[0] = static_cast<byte>(value >> 8); Ignore this, was ...
12 years ago (2008-12-09 15:46:04 UTC) #2
iposva
Please fix the comments, otherwise LGTM. Nice catch, -Ivan http://codereview.chromium.org/13290/diff/1/4 File src/macro-assembler-arm.cc (right): http://codereview.chromium.org/13290/diff/1/4#newcode179 Line ...
12 years ago (2008-12-09 16:13:17 UTC) #3
iposva
12 years ago (2008-12-09 16:16:11 UTC) #4
One more thing. Can you please also add a testcase that triggered the bad
behaviour so that we do not regress in the future.

Thanks,
-Ivan


On 2008/12/09 16:13:17, iposva wrote:
> Please fix the comments, otherwise LGTM.
> 
> Nice catch,
> -Ivan
> 
> http://codereview.chromium.org/13290/diff/1/4
> File src/macro-assembler-arm.cc (right):
> 
> http://codereview.chromium.org/13290/diff/1/4#newcode179
> Line 179: void MacroAssembler::SmiJumpTable(Register index, Vector<Label*>
> targets) {
> The parameter index is not used within this function. Also it seems that r0 is
> used directly.
> 
> http://codereview.chromium.org/13290/diff/1/4#newcode182
> Line 182: add(pc, pc, Operand(r0, LSL, 2 - kSmiTagSize));
> Can you document the constant 2 here? Or even better use something like
> kInstrSizeLog2 which you should define in constants-arm.h next to kInstrSize.
> 
> http://codereview.chromium.org/13290/diff/1/4#newcode184
> Line 184: stop("Unreachable: jump table alignment");
> Please use a nop() instruction here. The stop macro is not guaranteed to be
> encoded in one instruction.

Powered by Google App Engine
This is Rietveld 408576698