diff options
author | 2016-11-21 16:04:53 -0800 | |
---|---|---|
committer | 2017-01-03 12:07:45 -0800 | |
commit | 692235eb54544277e2bde862caa6038472fab833 (patch) | |
tree | e33282f7de0e4aa8e76129597cc1ef2aa3fa13a3 /compiler/utils/mips/assembler_mips.cc | |
parent | 00797355fa88299db5b4ac941bbda17cd97ab39e (diff) |
MIPS32: java.lang.String.getChars
Use memcpy(3) to copy characters under the assumption that memcpy()
has been hand optimized for best performance on the platform being
tested.
Test: run-test --optimizing 020-string
Test: run-test 020-string
Test: run-test --no-prebuild --optimizing 020-string
Test: run-test --no-prebuild 020-string
Test: run-test --optimizing 082-inline-execute
Test: run-test 082-inline-execute
Test: run-test --no-prebuild --optimizing 082-inline-execute
Test: run-test --no-prebuild 082-inline-execute
Test: mma -j2 ART_TEST_OPTIMIZING=true test-art-target-run-test
Test: booted MIPS32R2 emulator.
Note: Tested against both the MIPS32R2, and MIPS64R6 emulators.
Change-Id: I4192cf6244db120c8de5cc4932d4132acfc9740d
Diffstat (limited to 'compiler/utils/mips/assembler_mips.cc')
-rw-r--r-- | compiler/utils/mips/assembler_mips.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/utils/mips/assembler_mips.cc b/compiler/utils/mips/assembler_mips.cc index 3dcad6a6b9..5e83e825ed 100644 --- a/compiler/utils/mips/assembler_mips.cc +++ b/compiler/utils/mips/assembler_mips.cc @@ -635,6 +635,13 @@ void MipsAssembler::Ins(Register rd, Register rt, int pos, int size) { DsFsmInstrRrr(EmitR(0x1f, rt, rd, static_cast<Register>(pos + size - 1), pos, 0x04), rd, rd, rt); } +void MipsAssembler::Lsa(Register rd, Register rs, Register rt, int saPlusOne) { + CHECK(IsR6()); + CHECK(1 <= saPlusOne && saPlusOne <= 4) << saPlusOne; + int sa = saPlusOne - 1; + DsFsmInstrRrr(EmitR(0x0, rs, rt, rd, sa, 0x05), rd, rs, rt); +} + void MipsAssembler::Lb(Register rt, Register rs, uint16_t imm16) { DsFsmInstrRrr(EmitI(0x20, rs, rt, imm16), rt, rs, rs); } |