OSDN Git Service

ARM64: Fix mterp switch table pointer calculation.
authorVladimir Marko <vmarko@google.com>
Wed, 20 Jul 2016 16:52:51 +0000 (17:52 +0100)
committerVladimir Marko <vmarko@google.com>
Wed, 20 Jul 2016 17:19:45 +0000 (18:19 +0100)
commit5733e98d4889b7a94e4e647fa4033239038e07e8
tree6e7790cc1c4030fe9d7526097b9847fa6fcd91b7
parent360b4b0137ce5f0bb771e2ddbfd4735cae932565
ARM64: Fix mterp switch table pointer calculation.

Do not mix 32-bit and 64-bit registers with
    add     x0, xPC, w0, lsl #1
that ends up compiled as
    add     x0, xPC, w0, uxtx #1
instead of the required sxtx. Just sing-extend the offset
correctly in previous instructions.

Test: Additional test in 501-regression-packed-switch.
Change-Id: I9867dc1180743e98f9707a312241d2f5b726ca8c
runtime/interpreter/mterp/arm64/op_packed_switch.S
runtime/interpreter/mterp/out/mterp_arm64.S
test/501-regression-packed-switch/info.txt
test/501-regression-packed-switch/smali/Test.smali
test/501-regression-packed-switch/src/Main.java