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

Issue 11027060: Faster 64-bit right-shift for the ia32 compiler. (Closed)

Created:
8 years, 2 months ago by Florian Schneider
Modified:
8 years, 2 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Faster 64-bit right-shift for the ia32 compiler. Committed: https://code.google.com/p/dart/source/detail?r=13295

Patch Set 1 #

Total comments: 10

Patch Set 2 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -66 lines) Patch
M runtime/vm/assembler_ia32.h View 1 2 chunks +4 lines, -1 line 0 comments Download
M runtime/vm/assembler_ia32.cc View 1 5 chunks +25 lines, -4 lines 0 comments Download
M runtime/vm/assembler_ia32_test.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M runtime/vm/code_generator.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/disassembler_ia32.cc View 2 chunks +26 lines, -44 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 10 chunks +35 lines, -12 lines 0 comments Download
M runtime/vm/il_printer.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.h View 3 chunks +61 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 chunks +52 lines, -2 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M tests/language/bit_operations_test.dart View 1 2 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Florian Schneider
8 years, 2 months ago (2012-10-05 12:09:48 UTC) #1
Kevin Millikin (Google)
LGTM with the teeny bug fixed. https://codereview.chromium.org/11027060/diff/1/runtime/vm/code_generator.h File runtime/vm/code_generator.h (right): https://codereview.chromium.org/11027060/diff/1/runtime/vm/code_generator.h#newcode66 runtime/vm/code_generator.h:66: V(ShiftMintOp) \ This ...
8 years, 2 months ago (2012-10-05 12:52:58 UTC) #2
srdjan
DBC https://codereview.chromium.org/11027060/diff/1/runtime/vm/assembler_ia32.h File runtime/vm/assembler_ia32.h (right): https://codereview.chromium.org/11027060/diff/1/runtime/vm/assembler_ia32.h#newcode663 runtime/vm/assembler_ia32.h:663: void EmitGenericShift(int rm, Operand operand, Register shifter); const ...
8 years, 2 months ago (2012-10-05 14:25:18 UTC) #3
Florian Schneider
8 years, 2 months ago (2012-10-05 14:40:31 UTC) #4
https://codereview.chromium.org/11027060/diff/1/runtime/vm/assembler_ia32.h
File runtime/vm/assembler_ia32.h (right):

https://codereview.chromium.org/11027060/diff/1/runtime/vm/assembler_ia32.h#n...
runtime/vm/assembler_ia32.h:663: void EmitGenericShift(int rm, Operand operand,
Register shifter);
On 2012/10/05 14:25:18, srdjan wrote:
> const Operand&

Done.

https://codereview.chromium.org/11027060/diff/1/runtime/vm/code_generator.h
File runtime/vm/code_generator.h (right):

https://codereview.chromium.org/11027060/diff/1/runtime/vm/code_generator.h#n...
runtime/vm/code_generator.h:66: V(ShiftMintOp)                                  
                            \
On 2012/10/05 12:52:58, kmillikin wrote:
> This is also an binary op.  Maybe BinaryMintOp should be renamed to
> ArithmeticMintOp or something.
> 
> It also sounds better if it's MintShiftOp (MintBinaryOp, SmiBinaryOp,
> DoubleBinaryOp, etc.).

The names are not ideal. I plan to rename them eventually.

https://codereview.chromium.org/11027060/diff/1/runtime/vm/flow_graph_optimiz...
File runtime/vm/flow_graph_optimizer.cc (right):

https://codereview.chromium.org/11027060/diff/1/runtime/vm/flow_graph_optimiz...
runtime/vm/flow_graph_optimizer.cc:525: if (HasOnlyTwoSmi(ic_data)) {
On 2012/10/05 12:52:58, kmillikin wrote:
> Should really be ...TwoSmis.

Done.

https://codereview.chromium.org/11027060/diff/1/runtime/vm/intermediate_langu...
File runtime/vm/intermediate_language_ia32.cc (right):

https://codereview.chromium.org/11027060/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language_ia32.cc:2426: const Immediate kCountLimit =
Immediate(0x1F);
On 2012/10/05 12:52:58, kmillikin wrote:
> I'd rather read decimal 31 than 0x1f.  It's a count not a mask or address.

Done.

https://codereview.chromium.org/11027060/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language_ia32.cc:2430: __ movl(temp, Address(ESP, 1 *
kWordSize));
On 2012/10/05 12:52:58, kmillikin wrote:
> Swap this instruction and the previous :)

Done. Thanks for the catch.

I added a test case as well.

Powered by Google App Engine
This is Rietveld 408576698