commit | 79aa423fce400db3f551a3874e69e7cc4fb4f68f | [log] [tgz] |
---|---|---|
author | Alexei Zavjalov <alexei.zavjalov@intel.com> | Thu Feb 13 13:55:50 2014 +0700 |
committer | buzbee <buzbee@google.com> | Thu Feb 13 15:31:02 2014 -0800 |
tree | 54b53ac63d73e0e6614770b383c89a3a6b3169d3 | |
parent | 68bb649b128cd8760732524bd7ba58b49780d9d3 [diff] |
x86 compiler should handle the "div/rem by 1" case The current implementation of the (div/rem)/imm algorithm in ART's x86 compiler (X86Mir2Lir::GenDivRemLit) handles the only case when imm == -1, imm >= 2 and imm <= -2, but in the case when imm == 1, the result of calculation is incorrect. This patch adds handler of the "div/rem by 1" case. Change-Id: I4bcdcd9c17f5ccb6c60e7c359c00e04cd07f5bee Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>