OSDN Git Service

Correctly handle switches on values in a high register
authorBen Gruver <bgruv@google.com>
Thu, 23 Aug 2012 01:45:25 +0000 (18:45 -0700)
committerBen Gruver <bgruv@google.com>
Thu, 23 Aug 2012 01:54:48 +0000 (18:54 -0700)
commit40c69d949e67fe2cc2cccf4dd16b2f9fdabea396
treef1d8b2eecceaebb0ba4032ed995a071b28936c6a
parentb931f9065990520bf34b8c6128e069b4cca4a7ec
Correctly handle switches on values in a high register

When dx generates a switch on a value in a high register, it prepends a move
instruction, to move the value to a low register. However, this causes the
switch data pseudo-instruction to use address of the move instruction as the
base address of the switch targets, rather than the address of the switch
instruction

Change-Id: I0708d35ec3059c30221cd0a64f426244411d31ea
dx/src/com/android/dx/dex/code/CodeAddress.java
dx/src/com/android/dx/dex/code/OutputFinisher.java
dx/src/com/android/dx/dex/code/RopTranslator.java
dx/tests/122-switch-with-high-register/Blort.java [new file with mode: 0644]
dx/tests/122-switch-with-high-register/expected.txt [new file with mode: 0644]
dx/tests/122-switch-with-high-register/info.txt [new file with mode: 0644]
dx/tests/122-switch-with-high-register/run [new file with mode: 0644]