From 692235eb54544277e2bde862caa6038472fab833 Mon Sep 17 00:00:00 2001 From: Chris Larsen Date: Mon, 21 Nov 2016 16:04:53 -0800 Subject: 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 --- compiler/utils/mips/assembler_mips.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/utils/mips/assembler_mips.cc') 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(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); } -- cgit v1.2.3-59-g8ed1b