OSDN Git Service

Allow dx to properly generate sub-const and rsub-const insns.
authorjeffhao <jeffhao@google.com>
Tue, 25 Jan 2011 01:36:28 +0000 (17:36 -0800)
committerjeffhao <jeffhao@google.com>
Tue, 25 Jan 2011 02:28:59 +0000 (18:28 -0800)
commit4596322b12a72cdeea8deba1242d9b74da5ba12a
tree019254b56ce83a32500408000f4b5ea92b526585
parent0b7926b9becc0f849ded05a33bb192113f6839af
Allow dx to properly generate sub-const and rsub-const insns.

Dx can now handle instructions of the form "reg - const" by converting
it into an equivalent add-const with negative constant. Also, dx can
handle instructions of the form "const - reg" by creating an rsub-const
instruction, which was previously unused.

Change-Id: I67d869b5e14b65f6bbd1daae8bf0c662296af5de
dx/src/com/android/dx/cf/code/RopperMachine.java
dx/src/com/android/dx/dex/code/RopToDop.java
dx/src/com/android/dx/rop/code/DexTranslationAdvice.java