aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Nevill edward.nevill@linaro.org <Edward Nevill edward.nevill@linaro.org>2014-07-04 13:08:43 +0100
committerEdward Nevill edward.nevill@linaro.org <Edward Nevill edward.nevill@linaro.org>2014-07-04 13:08:43 +0100
commit152c21f89be01a541bbc1ce5bb9da2be4e8ff4c2 (patch)
treee67f2378d0f2d67adb3c25d985f5ff9f0eb6e961
parentf9ef28f6951f4002cc664b0af9e454be937a3632 (diff)
Fix string_compare for chars that have the top bit set
-rw-r--r--src/cpu/aarch64/vm/macroAssembler_aarch64.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
index b82765326..722e20632 100644
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
@@ -3409,9 +3409,10 @@ void MacroAssembler::string_compare(Register str1, Register str2,
clz(rscratch2, rscratch2);
andr(rscratch2, rscratch2, -16);
lsrv(result, result, rscratch2);
+ uxthw(result, result);
lsrv(cnt1, cnt1, rscratch2);
- sub(result, result, cnt1);
- sxthw(result, result);
+ uxthw(cnt1, cnt1);
+ subw(result, result, cnt1);
b(DONE);
}