In general, SDIV support seems like a reasonable thing to add, but it needs to
be modeled like other optional processor instructions, like VFP3.


http://codereview.chromium.org/10977051/diff/1/build/common.gypi
File build/common.gypi (right):

http://codereview.chromium.org/10977051/diff/1/build/common.gypi#newcode49
build/common.gypi:49: 'v8_can_use_integer_division%': 'true',
I think this flag is mis-named. can_use_sdiv_instructions or something
similar is better, since flags expressing similar functionality (VFP)
clearly reference something that is ARM-specific.

also, I we can't land this in the current form as a compile-time flag,
since there is only one binary that gets distributed on ARM

http://codereview.chromium.org/10977051/diff/1/src/arm/disasm-arm.cc
File src/arm/disasm-arm.cc (right):

http://codereview.chromium.org/10977051/diff/1/src/arm/disasm-arm.cc#newcode985
src/arm/disasm-arm.cc:985: #if CAN_USE_INTEGER_DIVISION
Need to be a runtime check rather than a compile-time check, introduced
in the same way as VFP3 support works.

http://codereview.chromium.org/10977051/diff/1/src/arm/lithium-codegen-arm.cc
File src/arm/lithium-codegen-arm.cc (right):

http://codereview.chromium.org/10977051/diff/1/src/arm/lithium-codegen-arm.cc#newcode982
src/arm/lithium-codegen-arm.cc:982: #if CAN_USE_INTEGER_DIVISION
Need to be a runtime check rather than a compile-time check, introduced
in the same way as VFP3 support works.

http://codereview.chromium.org/10977051/diff/1/src/arm/lithium-codegen-arm.cc#newcode1110
src/arm/lithium-codegen-arm.cc:1110: void
LCodeGen::EmitSignedIntegerDivisionByConstant(
Are there not cases in here that might also benefit from sdiv?

http://codereview.chromium.org/10977051/diff/1/src/arm/lithium-codegen-arm.cc#newcode1288
src/arm/lithium-codegen-arm.cc:1288: void
LCodeGen::DoMathFloorOfDiv(LMathFloorOfDiv* instr) {
This could definitely benefit from sdiv, too.

http://codereview.chromium.org/10977051/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to