OSDN Git Service

x86: evaluation destination should be after load of source in RA
authorSerguei Katkov <serguei.i.katkov@intel.com>
Mon, 8 Sep 2014 05:42:27 +0000 (12:42 +0700)
committerSerguei Katkov <serguei.i.katkov@intel.com>
Tue, 9 Sep 2014 06:01:22 +0000 (13:01 +0700)
commita464466fea8df617a50055230cfe7a16ea52cc14
tree3ac5c8345c29b6945c3bcf0ce8db1ba1e8a7d937
parent9204ed5102ea7cd57bd3ff7bb44f3ea26e28ae2a
x86: evaluation destination should be after load of source in RA

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>
compiler/dex/quick/x86/int_x86.cc