-
Enhancement
-
Resolution: Fixed
-
P4
-
14
-
b03
-
aarch64
-
linux
In generate_compare_long_string_different_encoding, the two Register vars strU and strL were used to record the pointers of the last 4 characters for the final comparisons. strU has been no use since the latest code updates as the chars got pre-loaded by compare_string_16_x_LU, and strL is redundant too since the pointer is available in another variable. Removing them can save two add, two temp vars, and replace two sub with mov.
http://hg.openjdk.java.net/jdk/jdk/file/11b96254ea92/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
Register strU = isLU ? str2 : str1, // <-- this can be removed
strL = isLU ? str1 : str2, // <-- this can be removed
tmpU = isLU ? rscratch1 : tmp1, // where to keep U for comparison
tmpL = isLU ? tmp1 : rscratch1; // where to keep L for comparison
__ push(spilled_regs, sp);
__ sub(tmp2, strL, cnt2); // strL pointer to load from
__ sub(cnt1, strU, cnt2, __ LSL, 1); // strU pointer to load from
http://hg.openjdk.java.net/jdk/jdk/file/11b96254ea92/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
Register strU = isLU ? str2 : str1, // <-- this can be removed
strL = isLU ? str1 : str2, // <-- this can be removed
tmpU = isLU ? rscratch1 : tmp1, // where to keep U for comparison
tmpL = isLU ? tmp1 : rscratch1; // where to keep L for comparison
__ push(spilled_regs, sp);
__ sub(tmp2, strL, cnt2); // strL pointer to load from
__ sub(cnt1, strU, cnt2, __ LSL, 1); // strU pointer to load from
- relates to
-
JDK-8229351 AArch64: the const STUB_THRESHOLD in macroAssembler_aarch64.cpp needs to be tuned
-
- Resolved
-