Improve integer division on IA32 and X64
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 10 Dec 2012 11:02:22 +0000 (11:02 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 10 Dec 2012 11:02:22 +0000 (11:02 +0000)
commitc70a0f9334137b317be70509dd18f21c2b233744
tree3e883a60b7ff96bf673b8e91317f054c9fc146e2
parent9a0623f2968ae0d521377cf99b56ebc5f851c15e
Improve integer division on IA32 and X64
If the divisor is a Power-of-2 constant, we could use shifts instead of the
expensive idiv instructions, which also loose the register constraints.

Review URL: https://chromiumcodereview.appspot.com/11478043
Patch from Yuqiang Xian <yuqiang.xian@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/hydrogen-instructions.h
src/ia32/lithium-codegen-ia32.cc
src/ia32/lithium-ia32.cc
src/x64/lithium-codegen-x64.cc
src/x64/lithium-x64.cc
test/mjsunit/shift-for-integer-div.js [new file with mode: 0644]