diff options
author | Yevgeny Rouban <yevgeny.y.rouban@intel.com> | 2014-11-26 18:11:54 +0600 |
---|---|---|
committer | Yevgeny Rouban <yevgeny.y.rouban@intel.com> | 2014-11-27 09:27:31 +0600 |
commit | 6af820639c74e769ffc1f54930f6ebc11364f894 (patch) | |
tree | decf73589911becfd31d9fcf4f50eb4ef9d30de0 /compiler/optimizing/graph_visualizer.cc | |
parent | 220526b05d4365a1820a694c98527eda2d3dc980 (diff) |
ART: x86 specific clearing higher bits when converting long to int
The following problem description is taken from
https://android-review.googlesource.com/107261
If destination and source of long-to-int is the same physical
register on 64-bit then we do not emit any instructions but
consider that destination is a 32-bit view of source register.
As a result high part contains garbage. If the destination is
used later as index to array access then this garbage is used
in computation of address because address is 64-bit. For all
other cases garbage is just ignored.
A generic solution (113023) for all hw platforms was suggested
but rejected later for the sake of HW specific solution:
https://android-review.googlesource.com/113023
https://android-review.googlesource.com/114436
This patch is a rework of patch 113023 to stick with x86_64
specific changes: for 64-bit target this patch forces generating
reg-to-reg copy if the src and dest are the same physical
registers. This makes the higher bits be zeroed by 32-bit move
instruction.
Change-Id: Id29af839506ff9319ffba08b2e86e240fef4dafd
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Yevgeny Rouban <yevgeny.y.rouban@intel.com>
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions