[PATCH] Fix mterp assembly to use uxtw instead of lsl where needed.
authorDavid Srbecky <dsrbecky@google.com>
Thu, 4 Apr 2019 15:16:17 +0000 (16:16 +0100)
committerRoger Shimizu <rosh@debian.org>
Fri, 21 Jan 2022 15:26:23 +0000 (15:26 +0000)
commitd76099899cb80b81f42b6b634b48b37e380920ec
tree34a00f8009cc5628700f249d981170381cba8ea3
parent1112eb0450a05cb4a30c46cc4df3ea4915562491
[PATCH] Fix mterp assembly to use uxtw instead of lsl where needed.

Bug: https://bugs.llvm.org/show_bug.cgi?id=41504
Origin: https://android-review.googlesource.com/c/platform/art/+/940018

The old instructions are invalid according to the ARM spec.

Event though UXTW and LSL are aliases this is binary change:
"add x0, x1, w2, lsl #1" was invalid and would be treated as
"add x0, x1, x2, uxtx #1" which would keep the high bits.

With uxtw, we ignore the high bits, as expected in code.

Test: test.py -r --target --interpreter
Change-Id: I66f67ccc5a401d0cf6ac5b42d41d8df26a190046

Gbp-Pq: Name fix-mterp-assembly-to-use-uxtw-instead-of-lsl-where-needed.patch
runtime/interpreter/mterp/arm64/array.S
runtime/interpreter/mterp/arm64/main.S
runtime/interpreter/mterp/arm64/other.S