OSDN Git Service

x86: evaluation destination should be after load of source in RA [DO NOT MERGE]
authorSerguei Katkov <serguei.i.katkov@intel.com>
Mon, 8 Sep 2014 05:42:27 +0000 (12:42 +0700)
committerPat Tjin <pattjin@google.com>
Wed, 24 Sep 2014 14:26:59 +0000 (14:26 +0000)
commitdb273aa1fc12a0e8a0d5a608df540e5d46a16b78
tree7b1edba19581c402d7044baaa3a03fa75eac071e
parent344f4145bdff3c4123d8a1808964ea9761a9edc4
x86: evaluation destination should be after load of source in RA [DO NOT MERGE]

In almost most cases working with Register Allocator we must first
load source and then evaluate the destination. In this particular case
for byte-code shl-int/2addr v10, v10 we first find a destination (memory)
then load source (v10 -> physical register) and generate a shift operation
on memory. This is ok for this bytecode but RA thinks that v10 is in register
(we loaded source) and this is incorrect because updated value in memory
and physycal register is not up to date.

Change-Id: Ib4c71f70dcbf78b76ca89897e3bd605a89d77d08
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
(cherry picked from commit a464466fea8df617a50055230cfe7a16ea52cc14)
compiler/dex/quick/x86/int_x86.cc