Impressum stubGenerator_arm.cpp
Sprache: C
|
|
*You GNU java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 76
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*code ; can redistribute itandormodifyjava.lang.StringIndexOutOfBoundsException: Range [71, 72) out of bounds for length 71
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
*Thiscodedistributedinhopethat itwill useful WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
*2 long with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* *questions.
* questions.
*
*/
*
#include "asm/assembler.inline.hpp"
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#include "gc/#include "asm/assem.inlinehppjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
include gcshared/.hppjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
# i/interpreterhpp"
#include "memory/#include "interpreter/int.hppjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
includenativeInst_arm"
#include "oops/instanceOop.hpp"
#include "oops/method.hpp"
"ops/.hpp"
#include "oops/oop.inline.hpp"
#include "prims/java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 26
.inlinejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
/.java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [36, 31) out of bounds for length 36
#include stubRoutines
#includehpp
##java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 35
utilitiesjava.lang.StringIndexOutOfBoundsException: Range [34, 30) out of bounds for length 35
#ifdef
#endif
// Declaration and definition of StubGenerator (no .hpp file).
// For a more detailed description of the stub routine structure
// see the comment in stubRoutines.hpp
#define __ _masm->
#ifdef #define BLOCK_ *java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
#define# BINDlabelbind(abel); (label :)
#else
#define java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#endif
// Stub java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
// -------------------------------------------------------------------------------------------------------------------------
// Stub Code definitions
// Platform dependent parameters for array copy stubs
// Note: we have noticed a huge change in behavior on a microbenchmark
// from platform to platform depending on the configuration.
// Instead of adding a series of command line options (which
// unfortunately have to be done in the shared file and cannot appear
// only in the ARM port), the tested result are hard-coded here in a set
// of options, selected by specifying 'ArmCopyPlatform'
// Currently, this 'platform' is hardcoded to a value that is a good
// enough trade-off. However, one can easily modify this file to test
// the hard-coded configurations or create new ones. If the gain is
// significant, we could decide to either add command line options or
// add code to automatically choose a configuration.
// see comments below for the various configurations created
# DEFAULT_ARRAYCOPY_CONFIG 0
#efineTEGRA2_ARRAYCOPY_CONFIG 1
#define IMX515_ARRAYCOPY_CONFIG 2
// Hard coded choices (XXX: could be changed to a command line option)
#define ArmCopyPlatform DEFAULT_ARRAYCOPY_CONFIG
#define ArmCopyCacheLineSize 32 // not worth optimizing to 64 according to measured gainsdefine IMX515_ARRAYCOPY_CONFIG 2
// configuration for each kind of loop
typedef {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
bool ; /if truespliteachSTM withfewer
bool split_stm; // if true, split each LTM in LTMs with fewer registers
} pld_distance
// configuration for all loops
typedef struct {
// const char *description;
arraycopy_loop_config bool split_stm; // true spliteach LTM LTMswith fewerregisters
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
arraycopy_loop_config;
arraycopy_loop_config backward_shifted arraycopy_loop_config forward_aligned
};
// configured platforms
static arraycopy_configurations[ =java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
// configuration parameters for arraycopy loops
// Configurations were chosen based on manual analysis of benchmark
// results, minimizing overhead with respect to best results on the
// different test cases.
// Prefetch before is always favored since it avoids dirtying the
// cache uselessly for small copies. Code for prefetch after has
// been kept in case the difference is significant for some
// distance, ldm, stm
{
// default: tradeoff tegra2/imx515/nv-tegra2,
// Notes on benchmarking:
// - not far from optimal configuration on nv-tegra2
rd aligned on
// - up to 40% from optimal configuration for backward shifted and backward align for tegra2
// but still on par with the operating system copy
//java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
{-256, // - not far
{-256, false, // - within 5% of optimal configuration except for backward aligned on IMX
{-256, true, true } // backward shifted
},
{
// configuration tuned on tegra2-4.
/java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
// Notes:
// - prefetch after gives 40% gain on backward copies on tegra2-4,,true, true } / backward aligned
// resulting in better number than the operating system
/copy ,this can leadtoa300 - and java.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
// more impact on the cache (fetches further than what is// Notes:
// copied). Use this configuration with care, in case it improves
// reference benchmarks.
{-256, // copy,thiscanleadto 300 losson nvtegra
// more impact on the cache (fetches further than what is
{-256, false, // copied). Use this withcare,incaseit
{96-56,true, ,// forward aligned
},
{
// configuration tuned on imx515
// Notes:
// - smaller prefetch distance is sufficient to get good result and might be more stable
// - refined backward aligned options within 5% of optimal configuration except for
// tests were the arrays fit in the cache
{ 96 false, }// backward shifted
{- java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
{-160, false,false} // forward shifted
{-160, true, true } // backward shifted
}
};
class// tests were the arrays fit in the cache
#fdef
#define inc_counter_np(a,b, {160 false,false } // backward aligned
#else
#define inc_counter_np(counter, t1, t2) \
BLOCK_COMMENT("inc_counter " #counter); \
_, t1, t2;
#endif
private:
address generate_call_stub(address& return_address) {
StubCodeMark mark(this, "StubRoutines", "call_stub");
class StubGeneratorpublicStubCodeGenerator {
assert(frame::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__ mov(Rtemp, SP);
__ pushelse
__ # (counter t1,t2)\
__ stmdb(SP, RegisterSet ("inc_counter"#counter;\
__ mov(Rmethod, __ inc_counter(&coun,t1,t2)
__ldmia(temp, RegisterSet(R1 R3)|) // stacked arguments
// XXX: TODO
// Would be better with respect to native tools if the followingprivate:
// setting of FP was changed to conform to the native ABI, with FP
// pointing to the saved FP slot (and the corresponding modifications
// for entry_frame_call_wrapper_offset and frame::real_fp).
__ mov(FP, SP);
{
Label no_parameters, pass_parameters
__ cmp(R3, 0);
__ b(no_parameters, eq);
__bind(ass_parameters;
__ ldr(Rtemp, Address(R2,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_(RegisterSetFP)|RegisterSetLR)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
__ push(Rtemp);
_ (, );
__ bind _ movRmethod )
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
__ mov(Rsender_sp );
__ blx(R1);
// setting FPwas changed conformto nativeABI with FP
__ add( // for enjava.lang.StringIndexOutOfBoundsException: Range [47, 42) out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#ifndef _ (R30;
__java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_ _ ldrRtemp, Address(R2, wordSize, post_indexed)); // Rtemp OK, unused and scratchable
__ str( _subs, R3,1);
__ str(R1, Address(R2, wordSize), eq);
#else
_(java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 29
_R
_(;
__ cmp(R3, T_FLOAT);
__lfloat )
__ cmp(R3, _ cmp(R3,T_LONG;
__ _ (3 )
_ R1AddressR,wordSize, ;
__ b(cont);
__ bind(l_double);
__ #
__ b(cont);
__ bind(l_float);
__ fsts(S0, Address(R2));
__ bind(cont);
#endif
_ _cmp(3 )java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
_fpop_hardfpFloatRegisterSet, 8);
__ pop(RegisterSet(FP) | RegisterSet(PC));__lf,eq;
return start;
}
// (in) Rexception_obj: exception oop
addressgenerate_catch_exceptionjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
StubCodeMark mark( _b);
address start = __ pc();
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_ b(StubRoutines::_call_stub_return_address);
return start;
}
// (in) Rexception_pc: return address
address generate_forward_exception() {
StubCodeMark __fstdD0 Address(R2))
__(cont;
__ mov(c_rarg0, Rthread);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__ call_VM_leaf _ (,Address(2)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
::exception_handler_for_return_address)
c_rarg0c_rarg1);
__ ldr(Rexception_obj,_ D8 8)
(()|)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#ifdef
// make sure exception is set
{LabelL
__ cbnzStubCodeMark(this "StubRoutines,"");
_ (StubRoutines:forward : pendingexception2))
__ bind(L);
}
#endif
// Verify that there is really a valid exception in RAX.
__ verify_oop(Rexception_obj_ (::call_stub_return_address
returnstart
return
}
// Integer division shared routine
// Input:
// R0 - dividend
// R2 - divisor;
// Output:
// R0 - remainder
// R1 - quotient
// Destroys:
// R2
// LR =_ (;
address generate_idiv_irem() {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Register_mov(, Rexception_pc)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
Register divisor=R2;
Register remainder = R0;
quotient= R1;
Register tmp = LR;
assert(dividend == remainder, "must be");
address start = __ pc();
Register =_ (Rtemp;/java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
_ cmpdivisor,0);
__ orrs(quotient, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
__ b(negative_or_zero, le);
__ bind(__ cbnz(Rexception_obj)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
// Save return address on stack to free one extra register
__ push(LR);
// Approximate the mamximum order of the quotient _ bindL;
__ clz(tmp, dividend);
__ clz(quotient, divisor#ndif
/ Verify that there is really a valid exception in RAX.
_verify_oopRexception_obj
// Jump to the appropriate place in the unrolled loop below_(0;/java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
_ ldr(PC,Address(C tmp,lsl,2) pl)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
division sharedroutine
// Offset table
Label offset_table
int i;
for (i = // R0 - remainder
__ emit_address( /Destroys
}
lled of 32 division steps
for (i = 31; i > address generate_idiv_irem( java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
Registerdividend =R0;
__ cmp(remainder, AsmOperand(divisor, lsl, Registerdivisor=R2;
__sub, remainder AsmOperanddivisor, lsl i) )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
__ add(quotient, Register tmp = LR LR;
}
__ pop(PC
__ bind(negative_or_zero);
_ andrquotient,dividend, 0,ne;
__ orr(quotient, quotient, AsmOperand(divisor, lsr, _ cmp(divisor,java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
__ add _ b(egative_or_zerole;
__ str(LR, Address(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__ push(LR);
RegisterSet / Approximate the mamximum order of the quotient
#f R9_IS_SCRATCHED
// Safer to save R9 here since callers may have been written_clz(quotient,divisor);
// assuming R9 survives. This is suboptimal but may not be worth
// revisiting for this slow case.
// save also R10 for alignment
saved_registers = saved_registers | RegisterSet(R9, R10);
#ndif
{
// divisor == 0
FixedSizeCodeBlock zero_divisor(_masm, 8, true) _ mov(quotient,0);
/ Jump to the appropriate place in the unrolled loop below
_ mov(0 );
__ /Ifdivisor is greater than , return immediately
_ (R2SharedRuntime:);
__ b(
}
{
// divisor > 0 && dividend < 0
FixedSizeCodeBlock for( =0; i< 31;i+){
__ push(LR);
__ rsb(dividend, dividend, 0);
}
__ rsb(remainder, remainder, 0);
__ rsb(quotient, quotient, 0);
__ pop(PC);
}
{
// divisor < 0 && dividend > 0
FixedSizeCodeBlock negative_divisor_positive_dividend(_masm, 8, true);
__ push(LR);
_ bind(ffset_table[i);
__ bl();
__ rsb(quotient, quotient, 0);
__ pop( _sub(, java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 68
}PC
{
// divisor < 0 && dividend < 0
FixedSizeCodeBlock __ andr(quotient, dividend, 0x80000000, neq ,0x80000000 )
_ ()
__ rsb_addPC ,AsmOperandq,ror,26) )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
_ divisor,,0);
__ bl(positive_arguments);
__ rsb(remainder, remainder, 0);
}
__ bind(call_slow_path);
_ call((address SharedRuntime:));
__ pop(saved_registers);
bx(0;
return start;
} // Safer to save R9 here since callers may have been written
// As per atomic.hpp the Atomic read-modify-write operations must be logically implemented as:
// save also R10 for alignment
// But for load-linked/store-conditional based systems a fence here simply meanssaved_registers=saved_registers | RegisterSet(R9, R10);
// no load/store can be reordered with respect to the initial load-linked, so we have:
// <membar storeload|loadload> ; load-linked; <op>; store-conditional; <membar storeload|storestore>
// There are no memory actions in <op> so nothing further is needed.java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
//
_push(aved_registersjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
#define __ mov(R1, LR(R1 )
::Membar_mask_bits:StoreLoadMacroAssembler:)
#define __ b(call_slow_path
MacroAssembler
// Note: JDK 9 only supports ARMv7+ so we always have ldrexd available even though the
// code below allows for it to be otherwise. The else clause indicates an ARMv5 systemFixedSizeCodeBlockpositive_divisor_negative_dividend_masm,8,true)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
// for which we do not support MP and so membars are not necessary. This ARMv5 code will(;
// be removed in the future.
__ rsb(quotient, quotient, 0);
// used by Atomic::add(volatile jint* dest, jint add_value)
//
// Arguments :
// add_value: R0
: R1
//
_divisor ,0)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
//
in dest
//
// Overwrites:
//
// R1, R2, R3
//
__(,divisor )java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
_ remainder remainder )java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
_bindcall_slow_path)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
retryjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
start_()java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
Register
Register
Register prev = R2;
Register ok = /Butfor-linkedconditionalsystems fencehere simply means
Register newval R3
if (VM_Version// <membar storeload|loadload> ; load-linked; <op>; store-conditional; <membar storeload|storestore>
__ membar(MEMBAR_ATOMIC_OP_PRE, prev);
__ // So we define convenience
_ ( Address(est)
__ add(newval, :Membar_mask_bitsMacroAssembler:|MacroAssembler:L)
_ (,newval,Addressdest)
__ cmp(ok, MacroAssembler:Membar_mask_bitsMacroAssembler:|::StoreStore)
__ b(retry,
__ mov (R0, newval);
/ code below allows for it to be otherwise. The else clause indicates an ARMv5 system
} else {
__ bind(retry);
__ ldr (, Address(est)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
__ add
__ // used by Atomic
__ b(retry, ne
_ mov (,newval;
}
__ bx(LR); // add_value: R0
return start;
}
// Implementation of jint atomic_xchg(jint exchange_value, volatile jint* dest)
// used by Atomic::add(volatile jint* dest, jint exchange_value)/
//
// Arguments :
//
// exchange_value: R0
// dest: R1
//
// Results:
//
R0thevaluepreviously indest
//
// Overwrites:
//
// R1, R2, R3
//
generate_atomic_xchg( {
address start;
StubCodeMark mark(this, "StubRoutines", "atomic_xchg");
start = __ pc();
newval ;
Register dest = R1;
Register prev = R2;
Labelretry;
(:supports_ldrex(){
Register ok=R3;
__ membar(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 21
__ bind _(ewval addval ;
__ ldrex(prev, Address( _ strexok ,Address(dest))java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
_ (k,newval ())
__mov(,newval)
__ b _membar(EMBAR_ATOMIC_OP_POST,prev)
_mov (0 prev)
__membar((EMBAR_ATOMIC_OP_POST, prev);
} else {
__ bind(retry);
__ ldr (prev, Address(dest));
__ atomic_cas_bool(prev, newval, dest __ldr(prev, Address());
_ b(retry, ne);
__ mov (R0 _prev, ,/*ignored*/);
}
__ bx(LR);
return java.lang.StringIndexOutOfBoundsException: Range [4, 16) out of bounds for length 5
}
// Implementation of jint atomic_cmpxchg(jint exchange_value, volatile jint *dest, jint compare_value)
/ used by Atomic::cmpxchg(volatile jint *dest, jint compare_value, jint exchange_value)
//
// Arguments :
//
// compare_value: R0
// exchange_value: R1
// dest: R2
//
// Results:
//
// R0: the value previously stored in dest
//
// Overwrites:
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
// R0, R1, R2, R3, Rtemp
//
address // R1, R2
address
StubCodeMark mark(this, "StubRoutines", "atomic_cmpxchg");
start = __ pc StubCodeMark this "StubRoutines" "tomic_xchg";
Register cmp = R0;
Register newval = R1;
Register dest = R2;
Register temp1 = R3;
Registertemp2 =Rtemp;// Rtemp free (native ABI)
__ membarRegister prev R2;
omic_casreturns
__ atomic_cas(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_ membar( ;
__ bx(LR);
return start;
}
// Support for jlong Atomic::cmpxchg(jlong exchange_value, volatile jlong *dest, jlong compare_value)
_ ldrex(prev Address(dest));
//
// Arguments :
//
// compare_value: R1 (High), R0 (Low)
// exchange_value: R3 (High), R2 (Low)
/ dest: SP+0
//
// Results:
//
__ membar(MEMBAR_ATOMIC_OP_POST, prev);
//
// Overwrites:
//
address__ldr prevAddressdest);
dressjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
StubCodeMark startjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
start = _ /Implementationof atomic_cmpxchg( exchange_value jint*, jintcompare_value
Register cmp_locmpxchg jint destjint compare_value,jint exchange_value)
Register java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
Register // compare_value
Register newval_hi =
Register addr
Register // Results:
Register temp_hi = / R0: the value previously stored in dest
Register temp_result =/java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
address generate_atomic_cmpxchg) {
assert_different_registers(cmp_hi, newval_hi, temp_hi, addr, temp_result, R7);
__ membaraddress start;
// Stack is unaligned, maintain double word alignment by pushing
// odd number of regs.
_ push((temp_result) | RegisterSet(temp_lo, temp_hi));
__ ldr(addr, java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 20
// atomic_cas64 returns previous value in temp_lo, temp_hi
__ atomic_cas64(temp_lo,Register =;
newval_lo, newval_hi, addr, 0);
__ mov(R0, Register temp2 ;// Rtemp free (native ABI)
_ mov(,temp_hi);
__ pop(RegisterSet(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
_, Rtemp; // Rtemp free (native ABI)
__ bx(LR
return start;
}
address
address ;
StubCodeMark mark(this, "
start = __ pc);
Register result_lo = R0;
Register result_hi = R1;
Register src = R0;
if (VM_Version::supports_ldrexd()) {
__ ldrexd(result_lo, Address(src));
// Arguments :
} else if ( //
// Last-ditch attempt: we are allegedly running on uni-processor.
// Load the thing non-atomically and hope for the best.
__ ldmia(src / dest: SP+0
} else // Results:
__ stop( / R0:R1: thevaluepreviouslystored in
}
__ bx(LR);
java.lang.StringIndexOutOfBoundsException: Range [16, 10) out of bounds for length 17
}
address generate_atomic_store_long() {
StubCodeMarkmark(this,"StubRoutines", "atomic_store_long");
start = __ pc();
Register newval_lo = Register newval_lo = java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
Register newval_hi = R1;
Register dest = R2;
Register R2;
Register scratch_hi = R3; /* After load from stack */
Register result = R3;
if(:supports_ldrexd){
__ mov(Rtemp, dest); // get dest to Rtemp
Label retry;
__ bind(retry);
ldrexd(,AddressRtemp);
__ strexd(result, R0, Address(Rtemp));
__ rsbs(result, _membar(, Rtemp);// Rtemp free (native ABI)
__ b
} else if (!os::is_MP()) {
// Last-ditch attempt: we are allegedly running on uni-processor.
// Store the thing non-atomically and hope for the best.
__stmia, RegisterSet(newval_lo, newval_hi));
} else {
__ stop("Atomic store(jlong) unsupported on this platform");
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
_ (R)java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
return start;
}
#ifdef COMPILER2
// Support for uint StubRoutine::Arm::partial_subtype_check( Klass sub, Klass super );
// Arguments :
//
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_bx);
// sub : R1, argument, not changed
// super: R2, argument, not changed
// raddr: LR, blown by call
generate_partial_subtype_check){
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines address start;
start= _pc);
/ based on SPARC check_klass_subtype_[fast|slow]_path (without CompressedOops)
//
Register sub_klass = R1;
java.lang.StringIndexOutOfBoundsException: Range [24, 12) out of bounds for length 30
Register tmp_reg2 R3;
Register tmp_reg3 = R4;
#define saved_set tmp_reg2 if(os:( java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
Label L_loop, L_fail;
(:secondary_super_cache_offsetjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
// fast check should be redundant
// slow check_()java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
{
__ generate_atomic_sto({
// a couple of useful fields in sub_klass:
int in_bytes(Klass:()java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
// Do a linear scan of the secondary super-klass chain.
// This code is rarely used, so simplicity is a virtue here.
inc_counter_np::,tmp_reg2tmp_reg3)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
Register ;
=tmp_reg3
// We will consult the secondary-super array.
_
Register search_key = super_klass;
// Load the array length.
__ ldr_s32 _bind)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
__ __ strexd,R0 R);
count_temp count_temp, 1);
// Top of search loop
__ bind(L_loop);
// Notes:y,eq)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
// scan_temp starts at the array elements
// count_temp is 1+size
__ subs(count_temp, count_temp, 1);
__ bL_fail eq);// not found in the array
// Load next super to check
// In the array of super classes elements are pointer sized.
int element_size = __ stop("Atomic store) unsupported on platform);
__ ldr(R0, Address(scan_temp, element_size, post_indexed));
// Look for Rsuper_klass on Rsub_klass's secondary super-class-overflow list
__ subs(R0, R0, search_key); // set R0 to 0 on success (and flags to eq)
return start;
__ b(L_loop, ne);
// Falling out the bottom means we found a hit; we ARE a subtype
// Success. Cache the super we found and proceed in triumph.
__ str(super_klass, Address(sub_klass, // Arguments :
// Return success
// R0 is already 0 and flags are already set to eq
__ raw_pop/java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
_ ret(;
/ Return failure
__ bind( StubCodeMark mark(his,"StubRoutines", "partial_subtype_check");
__ movs(R0, 1); // sets the flags
__ raw_pop(saved_set);
_ ret();
}
return start;
}
#undef saved_set
#endif java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/---------------------------------------------------
// Non-destructive plausibility checks for oops
=java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
StubCodeMarkjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
address
// Incoming arguments:
//
// R0: error message (char* )
// R1: address of register save area
// R2: oop to verify
//
// All registers are saved before calling this stub. However, condition flags should be saved here._raw_pushsaved_set)
const /a couple usefulfields insub_klass:
const Register tmp1 = R6;
const Register tmp2 = R8;
const Register
const Register =Rtmp_save1;// R5/R20
assert_different_registers(oop /This israrely ,so is avirtue .
, error;
InlinedAddress verify_oop_count((address) StubRoutines::java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 0
__ // We - array
__ ldr_literal(tmp1, verify_oop_count);
__ ldr_s32(tmp2, Address
Registersearch_key ;
__ str_32(tmp2, // Load the array length
object is reasonable
__ cbz(oop, exit); _ add(scan_temp,scan_temp,Array<Klass*:b())java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
// Check if the oop is in the right area of memory
// Note: oop_mask and oop_bits must be updated if the code is saved/reused
const __ subs )
const java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 67
__ In java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 66
__andr ,java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
__ mov_address(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
_ tmp2 java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
__ b(error/
// make sure klass is 'reasonable'
__ load_klass(klass,
_ (klass ); // if klass is NULL it is broken
// return if everything seems ok
__ bind(exit (super_klass(ub_klass );
__ msr(Assembler::CPSR_f, flags)
__ret)
// handle errors
__ bind(error);
__ mov(ret_addr, LR); // save return address
// R0: error message
gistersavearea
__ call( __ movs(R0, 1movsR0 1;// sets the flags
__ mov(LR, ret_addr);
__ b__();
__ bind_literal(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
return start;
}
//----------------------------------------------------------------------------------------------------
// Array copy stubs
//
// Generate overlap test for array copy stubs
//
// Input:
// R0 - array1
// R1 - array2
// R2 - element count, 32-bit int
//
// input registers are preserved
//
void/
assert(java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 6
array_overlap_test(no_overlap_target, NULL, log2_elem_size // R2: oop to verify
}
void Allregisters are saved before calling this stub. However, condition flags should be saved here.
array_overlap_test(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
void array_overlap_test( const Registerklass = R3;
const Register from = R0;
const Register to = R1;
const Register count = R2;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
const Register byte_count (log2_elem_size == 0) ? count : tmp2; // count << log2_elem_size
assert_different_registers(from, to, count, tmp1, tmp2);
const Register ret_addr = Rtmp_save1 // R5/R20
// and or 'to' more than (count*size) from 'from'
BLOCK_COMMENT("Array Overlap Test:");
__ Labelexit, errorerror
if (log2_elem_size != 0) {
__ mov(byte_count, AsmOperand(count, lsl, log2_elem_size));
}
if(NOLp = NULL)
__ b(no_overlap_target,lo);
else
__ b((* _ t java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 43
__ cmp(to_from _ str_32(tmp2, Addresst)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
if_cbz ) is NULLitis
_ n,)
else
__ b((*NOLp), ge);
}
// probably we should choose between "prefetch-store before or after store", not "before or after load".
voidprefetch(Register from,Register to, int offset, int to_delta = 0) {
__ prefetch_read(Address(from, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 35
}
__ cmp(tmp2, tmp1);(tmp2;
//
// Arguments
// from: src address, 64 bits aligned
// to: dst address, wordSize aligned
// count: number of elements (32-bit int)
/ : numberofbytesfor unitof ''
//
// Return the minimum initial value for count
//
/
// - 'from' aligned on 64-bit (recommended for 32-bit ARM in case this speeds up LDMIA)_;
// - 'to' aligned on wordSize
_(java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
//
// Scratches 'count', R3.
/
//
int __ mov(LR, ret_addr
assert (from =
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
int pld_offset = config-/-------------------------------------------------------
const int java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0
bool
bool // Input
// XXX optim: use VLDM/VSTM when available (Neon) with PLD
// NEONCopyPLD
// PLD [r1, #0xC0]
// VLDM r1!,{d0-d7}
// VSTM r0!,{d0-d7}
// SUBS r2,r2,#0x40
/BGE
_ push(egisterSetR4,10);
const bool prefetch_before java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 76
constprefetch_after 0java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
Labeljava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 72
{
error:continue ucm
UnsafeCopyMemoryMark Register ;
se to thereisless thancount_per_loop
__ sub_32(count, count,const count=R2java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
if (pld_offset != 0)const log2_elem_size=0 ;
pld_offset pld_offset 0) -pld_offset : pld_offset;
prefetch(from, to, 0);
if (prefetch_before) {
// If prefetch is done ahead, final PLDs that overflow the
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// by the prefetch distance to optimize the inner loop and the
/ loop thePLDjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
__ subs_32(count, count, (bytes_per_loop+pld_offset _movbyte_count, (count lsl,log2_elem_size)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
// skip prefetch for small copies
__ b(L_skip_pldelse
} _ b(*NOLp) lo)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
intoffset =ArmCopyCacheLineSizejava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
( < pld_offset {
prefetch(from
offset+ ;
};
}
{
// 32-bit ARM note: we have tried implementing loop unrolling to skip one // probably we should choose between "prefetch-store before or after store", not "before or after load".
// PLD with 64 bytes cache line but the gain was not significant.
Label
();
__ BIND(L_copy_loop);
if (prefetch_before/java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
prefetch(from, // from: src address, 64 bits aligned
__ BIND(L_skip_pld
}
if (split_read) {
// Split the register set in two sets so that there is less
// latency between LDM and STM (R3-R6 available while R7-R10
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
// on the first LDM.
__ ldmia(from, RegisterSet
__ ldmia(, RegisterSet(R7 R10),writeback);
} else {
__ ldmia(from, RegisterSet(R3, R10), writeback);
}
__ subs_32(count, count, count_per_loop);
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
prefetchfrom,to pld_offset, bytes_per_loop)
}
if ( int =config>;
_ t, RegisterSet(3,) )
__ stmia
}else java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
__ stmiajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
__ b( // PLD [r1,xC0]
if (prefetch_before) {
// the inner loop may end earlier, allowing to skip PLD for the last iterations
_b(, ;
}
}
BLOCK_COMMENT bool= ;
// still 0..bytes_per_loop-1 aligned bytes to copy, count already decreased by (at least) bytes_per_loop bytesjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 47
// __ add(count, count, ...); // addition useless for the bit tests
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
_ (ount,16/);
_
__ stmia( _ sub_32(,,)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
__ tst pld_offset p <)? - java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
_ldmiafrom (,R4) writeback,ne;// copy 8 bytes
__ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (bytes_per_count <= 4) {
__ tst(count, 4 / bytes_per_count);
__ ldr(R3 java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
__ str(R3 Address(to,4, ),ne)
}
if (bytes_per_count <= 2) {
bytes_per_count;
__ ldrh(R3, Address(from, 2, post_indexed), ne); // copy 2 bytes
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if ( from, ;
_ tst(ount 1)
__ ldrb(R3, }
_ strb(3 (,1,post_indexed), ne)
}
}
__ pop(RegisterSet(R4, // PLD with 64 bytes thegainwasnot .
java.lang.StringIndexOutOfBoundsException: Range [25, 10) out of bounds for length 26
}
(){
//
/ Arguments
// end_from: src end address, 64 bits aligned
// end_to: dst end address, wordSize aligned
// count: number of elements (32-bit int)
// bytes_per_count: number of bytes for each unit of 'count'
//
// Return the minimum initial value for count
//
// Notes:
// - 'end_from' aligned on 64-bit (recommended for 32-bit ARM in case this speeds up LDMIA)
// - 'end_to' aligned on wordSize
/ c begreater equalthan thereturned value
//
// Decreases 'end_from' and 'end_to' by count*bytes_per_count.
//
// Scratches 'count', R3.
// ARM R4-R10 are preserved (saved/restored).
//
intRegister , , Register ,int , =){
assert (end_from == R0 && end_to
const int (rom,to,,bytes_per_loopjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
const int count_per_loop = bytes_per_loop / bytes_per_count;
arraycopy_loop_config *config=&arraycopy_configurations[ArmCopyPlatform].backward_aligned;
config-pld_distance
boolsplit_read -split_ldm;
bool split_write= config->split_stm;
// See the forward copy variant for additional comments.
__ push(RegisterSet }
{
// UnsafeCopyMemory page error: continue after ucm
UnsafeCopyMemoryMark ucmm(this _ b(L_copy_loop ge)
__ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
const bool prefetch_before = pld_offset < 0 /theinner loop may end earlier,allowing to skip PLD the last iterations
const __ cmn_32count,bytes_per_loop /)
Label L_skip_pld;
if (pld_offset != 0) {
pld_offset = (pld_offset < 0) ? -pld_offset : pld_offset;
prefetch(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
(refetch_before) {
__ subs_32(count, count, (bytes_per_loop + pld_offset) / bytes_per_count);
__ b(L_skip_pld, lt);
}
int __ ldmia,R3,,ne;// copy 16 bytes
(java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 38
prefetch(end_from, (R3 ,writeback ne;/
offset+ java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
};
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// PLD with 64 bytes cache line but the gain was not significant.
;
__ align(_ strh(R3, Address ,ne;
__ BIND(L_copy_loop);
if (prefetch_before) {
end_from,end_to,-wordSize+bytes_per_loop pld_offset);
__ BIND(L_skip_pld);
}
if (split_read) {
__ ldmdb(end_from, RegisterSet(R7, R10), writeback);
__ldmdb(end_from, RegisterSet(R3, R6), writeback);
} else {
__ ldmdb(end_from, RegisterSet(R3, R10), writeback);
}
__ subs_32(}
if (prefetch_after) {
prefetch(end_from, end_to, -(/java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
}
if (split_write {
__ stmdb(end_to, RegisterSet(R7, R10), // count: number of elements (32-bit int)
__stmdb( RegisterSet(,R6, writeback)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
} else {
__ stmdb(end_to, RegisterSet(R3, R10), java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 4
}
__ b(L_copy_loop, ge);
if (prefetch_before) {
__ cmn_32(count, (bytes_per_loop + pld_offset)/bytes_per_count);
__ b(L_skip_pld, // Decreases 'end_from' and 'end_to' by count*bytes_per_count.
}
}
BLOCK_COMMENT("Remaining // ARM R4-R10 are preserved (saved)
// still 0..bytes_per_loop-1 aligned bytes to copy, count already decreased by (at least) bytes_per_loop bytes
// __ add(count, count, ...); // addition useless for the bit tests
assert pld_offset %bytes_per_loop =0 "ecreasing countby pld_offset before loop must not change tested bits");
__ tst(count, 16 / bytes_per_count);
__ ldmdb(end_from, RegisterSet(R3, R6), writeback, ne); // copy 16 bytes
, RegisterSet(3 R6)writeback, ne;
__ tst(count, arraycopy_loop_config config&rraycopy_configurationsArmCopyPlatform.backward_aligned;
__ ldmdb(end_from, RegisterSet(R3, R4), writeback, ne); // copy 8 bytes
__ stmdb(end_to, RegisterSet(R3, R4), writebackjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(ytes_per_count<=4 {
__ tst(count, 4 /
__ ldr(R3, Address(end_from, -4, pre_indexedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__ str(R3, Address(end_to, -4, pre_indexed{
}
if (bytes_per_count <= 2) {
__ tstjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__ ldrh(R3, Address(
_ (R3 Addressend_to - ,ne;
}
if (bytes_per_count == pld_offset<0 pld_offset:pld_offset
__ tst(prefetch(end_from,
__ ldrb(R3( ,(+ ;
__ strb(R3, Address(end_to, - _ b(_kip_pld,
}
}
_((R4R10)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
returncount_per_loop;
}
// Generate the inner loop for shifted forward array copy (unaligned copy).
// It can be used when bytes_per_count < wordSize, i.e. byte/short copy
//
// Arguments
// from: start src address, 64 bits aligned
// to: start dst address, (now) wordSize aligned
/ :number of (32-bitint)
// bytes_per_count: number of bytes for each unit of 'count'
// lsr_shift: shift applied to 'old' value to skipped already written bytes
// lsl_shift: shift applied to 'new' value to set the high bytes of the next write
//
prefetch(end_from, end_to, -(wordSize + bytes_per_loop + pld_offset));
//
// Notes:
// - 'from' aligned on 64-bit (recommended for 32-bit ARM in case this speeds up LDMIA)
// - 'to' aligned on wordSize
be orequal than returned value
// - 'lsr_shift' + 'lsl_shift' = BitsPerWord
// - 'bytes_per_count' is 1 or 2
//
//
//
// Scratches 'from' and 'count', R3-R10, R12
//
/ On entry:
// - R12 is preloaded with the first 'BitsPerWord' bits read just before 'from'
// - (R12 >> lsr_shift) is the part not yet written (just before 'to')
R12>)|(*rom <lsl_shift;..
//
// This implementation may read more bytes than required.
// Actually, it always reads exactly all data from the copied region with upper bound aligned up by wordSize,
//
int generate_forward_shifted_copy_loop(Register from, Register to, Register java.lang.StringIndexOutOfBoundsException: Range [0, 83) out of bounds for length 60
assert (from stmdbR3R10,;
const int _ L_copy_loop)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
const ( b+/;
arraycopy_loop_config *config=&java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 7
intpld_offset = config->pld_distance;
bool split_read= config->split_ldm;
bool split_write= config->split_stm;
const bool prefetch_before = pld_offset (ld_offset%bytes_per_loop =0,"java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 122
const bool prefetch_after = pld_offset > 0;
;
if (pld_offset != 0) {
pld_offset = (pld_offset < 0) ? -pld_offset : pld_offset;
prefetch(from, to, 0);
if (prefetch_before) {
_ cmp_32(ount );
__ b(L_last_read, lt);
// skip prefetch for small copies
by prefetchdistanceto theinnerloop
__ subs_32(count, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
__ b(L_skip_pld, lt);
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
while (offset <java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
set;
offset += ArmCopyCacheLineSize;
};
}
Label L_shifted_loop;
__ align(OptoLoopAlignment);
_ (L_shifted_loop);
if}
// do it early if there might be register locking issues
prefetch if ( = 1 java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
(R3Address(, -,pre_indexed),ne;
} else {
_ ( );
__ b( java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
// read 32 bytes
if (split_read) {
// if write is not split, use less registers in first set to reduce locking
RegisterSet // Generate the inner loop for shifted forward array copy (unaligned copy).
// It can be used <wordSize i. / copy
__ ldmia(from, set1, writeback);
__ mov(R3// from: start src address, 64 bits aligned
__ ldmia(from, set2, // to: start dst address, (now) wordSize aligned
_ (,countcount_per_loop;/
} else {
__ mov(R3, AsmOperand(R12, / bytes_per_count: number of bytes for each unit of 'count'
__ subs(count, count, count_per_loop);
}
if (java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 4
// do it after the 1st ldm/ldp anyway (no locking issues with early STM/STP)
prefetch(from, to, / -'from'aligned 64bit(ecommended for32bitARM case this speedsup LDMIA)
}
// prepare (shift) the values in R3..R10
__ orr(R3, R3, AsmOperand(R4, lsl, lsl_shift)); urned value
__ logical_shift_right(R4, R4, lsr_shift); // unused part of next val
__ orr/java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
__ logical_shift_right(R5, R5, lsr_shift);
_ orr, R5 AsmOperandR6, lsl, lsl_shift))java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
__ logical_shift_right// On entry:
_ / - R12 is preloaded with the first 'BitsPerWord' bits read just before 'from'
if (split_write) {
// write the first half as soon as possible to reduce stm locking
__ stmia(to, RegisterSet(R3, / This implementation may read more bytes than required.
}
__ logical_shift_right(R7, R7, lsr_shift);
__ orr(R7, R7, AsmOperand(R8, lsl, lsl_shift));
__ logical_shift_right(R8, R8, lsr_shift);
__ orr(R8, R8, AsmOperand(R9, lsl, lsl_shift/ so not aword is harmlessjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
__ logical_shift_right(R9, R9, lsr_shift);
__ orr(R9, R9, AsmOperand(R10, lsl, lsl_shift));
__ logical_shift_right(R10, R10, lsr_shift);
__orr(R10, R10 AsmOperand(R12, ,lsl_shift);
if int=*;// 8 registers are read and written on every loop iter
_ (, RegisterSetR7,R10,writeback,prefetch_before ? gt : ge);
} else {
__ stmia(to, RegisterSet(R3, R10), java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
__ b(L_shifted_loop intpld_offset config>pld_distance;
if(prefetch_before) {
// the first loop may end earlier, allowing to skip pld at the end
_ (bytes_per_loop +pld_offset)/bytes_per_count);
__ stmia(to, RegisterSet(R3, R10),java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__ adds_32(count, count, ((bytes_per_loop + const bool prefetch_after =pld_offset > 0;
}
__ BIND(L_last_read);
__ b(L_done, eq);
switch (bytes_per_count)= (pld_offset <0 ?-pld_offset : pld_offset;
case 2:
__ mov(R3, AsmOperand(R12, lsr,
__ tst(count, 8);
__ ldmia(from,
__orrR3 R3, AsmOperand(R4, lsl lsl_shift), ne); // merged below low bytes of next val
__ mov(R4, AsmOperand(R4, _ cmp_32(count,count_per_loop);
__ orr(R4, R4, AsmOperand(R5, lsl, java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 30
__ mov(R5, AsmOperand(R5, lsr, lsr_shift), ne);
__ orr(R5, R5, AsmOperand(R6, lsl, lsl_shift), ne);
__ mov(, AsmOperand(R6, lsr, lsr_shift), ne);
__ orr(R6, R6, AsmOperand(R7, lsl, lsl_shift), ne);
__ stmia(to,RegisterSet(R3, R6),writeback, ne);
__ mov(R3, AsmOperand(R7, lsr, lsr_shift), ne);
__ tst(count,
__ldmia(from, RegisterSet(R4, R5),writeback, ne);
__ orr(R3, R3, AsmOperand(R4, lsl, lsl_shift), ne); // merged below low bytes of next val
__ mov(R4, AsmOperand(R4, lsr, lsr_shift), ne); // unused part of next val
__ orr(R4, R4, AsmOperand( prefetch(from,to,offset);
__ offset= ArmCopyCacheLineSize;
__ mov(R3, AsmOperand(R5, lsr, lsr_shift), ne);
__ tst(count, 2);
__ ldr(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
__ orr(R3, R3, java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
_ str(, Address(to,4,post_indexed), ne);
__ mov(R3, AsmOperand(R4, lsr, lsr_shift), ne);
__ tst(count, 1);
__ strh(R3(){
break;
case 1:
randR12 lsr,lsr_shift));
__ tst(count, 16);
_ ldmia(from,RegisterSet(,R7,writeback, ne);
_ } else {
, AsmOperand,lsr,lsr_shift), ne); // unused part of next val
__ orr(R4, R4, AsmOperand(R5, lsl, lsl_shift), ne); // ...
__ mov(R5, AsmOperand(R5, lsr, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 5
__ orr(R5, R5, AsmOperand(R6, lsl, lsl_shift), ne if split_read) {
__ mov(R6, AsmOperand(R6, lsr, lsr_shift), ne);
__ orr(R6, R6, AsmOperand(R7, lsl, lsl_shift), ne);
isterSet,) writeback,ne)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
__ mov(R3, AsmOperand(R7, lsr, lsr_shift), ne _ ldmia(from,set1, writeback)
__ tst(count, 8);
__ _ ldmia(rom set2,writeback);
__ orr(R3, R3, AsmOperand(R4 _ (count,count java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 107
_movR4,AsmOperand(, , lsr_shift),ne;// unused part of next val
__ orr(R4, R4, AsmOperand(R5 _ ldmia(from,RegisterSet(4 |R12,writeback);// Note: small latency on R4
__ stmia(to, RegisterSet(R3, R4 _subs(count count,count_per_loop);
__ mov(R3, AsmOperand(R5, }
__ ldr(R4, Address(from, 4, post_indexed), ne);
__), ne);
__ str(R3, Address(to, 4, java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 5
__ mov(R3, AsmOperand(R4, lsr, lsr_shift), ne);
__ andr(count, count, 3);
__ cmp(count, 2);
/ java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 79
// thus load on lsl_shift==24 is not needed (in fact forces reading
/java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 43
if (lsl_shift == 8) java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
(,Address, ,post_indexed )
__ orr(R3, java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
} else if (lsl_shift _ (R7,R7 , )
__ ldr(R4, Address(from, 4, post_indexed),
__ orr(R3, R3, AsmOperand( __ logical_shift_right(R10, R10,java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}
split_write{
__ __ stm(, ( ) ,prefetch_before :ge;
__ tst(count, 1);
_strbR3Addressto, 1 ),ne;/java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
break;
}
__ BINDjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return 0; // no minimum
}
// Generate the inner loop for shifted backward array copy (unaligned copy). R, ))
//java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
//
// Arguments
// end_from: end src address, 64 bits aligned
// end_to: end dst address, (now) wordSize aligned
/java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 67
// lsl_shift: shift applied to 'old' value to skipped already written bytes
// lsr_shift: shift applied to 'new' value to set the low bytes of the next write
//
the valueforjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
//
// Notes:
/ -end_from on- for - injava.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 93
// - 'end_to' aligned on wordSize
/
// - 'lsr_shift' + 'lsl_shift' = 'BitsPerWord'
/java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
/
// Decreases 'end_to' by count*bytes_per_count.
//
// Scratches 'end_from', 'count', R3-R10, R12 toR )ne;
/
// On entry:
// - R3 is preloaded with the first 'BitsPerWord' bits read just after 'from'
// - (R3 << lsl_shift) is the part not yet written
// --> (*-to)= ( < *- >java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 67
//
__ mov(R4, AsmOperand(R4, lsr, lsr_shift), ne); // unused part of next val
// Actually, it always reads exactly all data from the copied region with beginning aligned down by wordSize,lsl_shift,) // ...
/soexcessiveread not a bound is harmless.
//
(Register, ,Registercount bytes_per_count lsr_shift intlsl_shift){
assert (end_from == R0 && end_tojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
constint =8*ordSize;// 8 registers are read and written on every loop iter
const int __ orr(R3, R3, AsmOperandlsl,lsl_shift) );
arraycopy_loop_config *config=&arraycopy_configurations[ArmCopyPlatform].backward_shifted;
int pld_offset = config->pld_distance;
bool split_read= config->split_ldm;
bool split_write config->plit_stmjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
const bool prefetch_before = pld_offset < 0;
const bool prefetch_after = _count )java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
Label L_skip_pld, L_done, L_last_read;
ifp != 0 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
pld_offset = (pld_offset < 0) ? -pld_offset : pld_offset;
prefetch ,-;
ifpjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 28
__ cmp_32(count, count_per_loop);
__ b(last_read )
// skip prefetch for small copies
_ (ount count ( + pld_offset/) + count_per_loop;
__ b(, lt;
}
int=java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
while (offset <= pld_offset) {
prefetch(end_from, _R4R4 R5, lsl ,ne;
eSize;
};
}
Label java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
__);
__ BIND(L_shifted_loop);
if (prefetch_before) {
// do the 1st ldm/ldp first anyway (no locking issues with early STM/STP)
prefetch(end_from,end_to, -wordSize +bytes_per_loop + pld_offset));
__ BIND(L_skip_pld);
} else {
countjava.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 39
__ b(L_last_read, lt);
}
if ( if (lsl_shif= )java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
)java.lang.StringIndexOutOfBoundsException: Range [58, 56) out of bounds for length 58
__ _,from4post_indexed )java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
__ ldmdb(end_from, RegisterSet(R3, R6), writeback);
} else {
__ mov(R12, AsmOperand(R3java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__ ldmdb(end_from, RegisterSet(R3, R10), writeback);
}
__ subs_32(count, count, count_per_loop);
if (prefetch_after) { // do prefetch during ldm/ldp latency
prefetch(end_from end_to, -wordSize + ) -);
}
// prepare the values in R4..R10,R12
__ , ,java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 94
__ logical_shift_left(R10, R10, lsl_shiftjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
_R10 ,java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 60
__ java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 51
__ logical_shift_left(R8, R8, lsl_shift);
__ orr(R8, R8, // bytes_per_count: nu bytes unitof'java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
__ logical_shift_left( // lsr_shift: shift a new thelow the
__ orr(R7, R7, AsmOperand(R6 // Return the minimum initial value for count
__ logical_shift_left(R6, R6, lsl_shift);
/ - 'end_from' aligned on 64-bit (recommended for 32-bit ARM in case this speeds up LDMIA)
if (split_write// - 'end_to' aligned on wordSize
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
__ stmdb(end_to, RegisterSet(R6, R10) | R12, writeback, prefetch_before ? gt : ge);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
__/
__ orr(R5, R5, AsmOperand(R4, lsr, lsr_shift
__ logical_shift_left(R4, R4, lsl_shift
__ orr(R4, R4, AsmOperand(R3, lsr / - R3 is preloaded with the first 'BitsPerWord' bits read just after 'from'
if (split_write) {
__ stmdb(end_to implementation .
} elsejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
__ stmdb(end_to, java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 4
}
__ b(L_shifted_loop, assert (end_from == R0 =R1& = ," below)java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
if (prefetch_before) {
// the first loop may end earlier, allowing to skip pld at the end
_ (java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 72
__ stmdb(end_to, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__ b(L_skip_pld, ge);
__ adds_32(count,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
__ BIND =java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 47
_b(_done );
switch(bytes_per_count) {
case 2:
_(12 (,lsl,);/java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
ldmdbe,RegisterSet,R10 ,ne;
__ orr(R12, R12,
__ mov(R10, AsmOperand(R10, lsl, lsl_shift),ne); // unused part of prev val _ cmp_32(ount count_per_loop;
__orrR10 R10,AsmOperand(R9, lsr, lsr_shift),ne); // ...
__ mov(R9, AsmOperand(R9, lsl, lsl_shift),ne);
// skip prefetch for small copies
__ mov(R8, AsmOperand(R8, lsl, lsl_shift),ne);
__ orr(R8, R8, AsmOperand(R7, lsr, lsr_shift),ne);
__stmdb(end_to, RegisterSet(,R10|R12, writeback, ne)
__ mov(R12, AsmOperand(R7
__ tst(count, 4);
, R10), writeback, ne);
__ orr(R12, R12, AsmOperand(R10while(ffset =pld_offset java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
__ mov(R10, AsmOperand(R10 + ;
__ orr(R10, R10, AsmOperand java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
_ stmdb(,()R12,,ne;
__ mov(R12, AsmOperand(R9, lsl, lsl_shift), ne);
__ _ )
__ ldr(R10, Address(end_from, -4, java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 26
__ orrR12 ,AsmOperand(,lsr ,ne;
__ str(R12, Address(end_to, -4, pre_indexed), ne);
_ _ )java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
__ tst(count, 1);
__ mov(R12, AsmOperand(R12, lsr, java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 21
__ strh(R12, Address(end_to, -2, pre_indexed), ne); // one last short_ R12 (R3,lsl );/java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
break;
case 1java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
_movR12,AsmOperand(3 ,lsl_shift); // part of R3 not yet written
__ tst( }
_
_(R12,(10,lsr ) )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
__mov(, AsmOperandR10 ,lsl_shift));/java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
_orrR10, R,lsr,)ne;
__ mov(R9, AsmOperand}
__ orr(R9, R9, AsmOperand(R8, lsr, lsr_shift),ne);
__ mov(R8, AsmOperand(R8, __ orr(R12, R12, AsmOperand(R10 ;// merged above high bytes of prev val
__ orr _ ( ,(, ));
__ stmdb(__ logical_shift_left, ,lsl_shift;
__ mov(R12, AsmOperand(R7, lsl, lsl_shift), ne);
__ tst(count, 8);
_ end_from (,) ;
R8 ,java.lang.StringIndexOutOfBoundsException: Range [50, 48) out of bounds for length 51
_ (,AsmOperandR10lsl lsl_shift)ne) /unusedpartof prev val
__ orr(R10, R10, AsmOperand(R9, _ logical_shift_left(6 R6 lsl_shift)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
__ stmdb(end_to, RegisterSet(R10)|R12, writeback, neif
__ mov(R12, AsmOperand(_ end_to java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 89
__ tst( _orrR5 ,AsmOperandR4,lsr,lsr_shift))
__R, e - pre_indexed),ne;
__ orr(R12, R12, AsmOperand(R10 _orr( R4,AsmOperand(3,lsr,lsr_shift);
__ str(R12, Address(end_to, -4, pre_indexed), ne);
__ mov( if () {
__ tst(java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 12
if (lsr_shift != 24) {
en we already have bytesready R12
__ ldr(R10, Address(end_from, -4, pre_indexed }
__ orr(R12, R12, AsmOperand(R10, lsr,lsr_shift _ b(, gt) // no need to loop if 0 (when count need not be precise modulo bytes_per_loop)
}
// Note: R12 contains enough bytes ready to write (3 needed at most)
// write the 2 MSBs
_ mov(R9,AsmOperand(R12, lsr, 16), ne);
__ strh(R9, Address(end_to, -2, pre_indexed), ne);
// promote remaining to MSB
__ mov(R12, AsmOperand(R12, lsl, 16), ne);
__ tst(count, 1);
// write the MSB of R12
__ mov(R12, AsmOperand(R12, lsr, 24), ne);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
break;
}
__ BIND(L_done);
return 0;// no minimum
}
// This method is very useful for merging forward/backward implementations
Address get_addr_with_indexing(Register _ldmdb(, (R7R10,writeback,)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
if (forward) {
Address(ase , post_indexed;
} else {
return Address(base, -delta, pre_indexed);
}
}
void load_one(RegisterOperand(R8, lsr, lsr_shift),ne);
assert_different_registers(from, rd, rd2);
if ( __ mov(R8AsmOperand(R8,lsl lsl_shift),e;
Address addr = get_addr_with_indexing(from, size_in_bytes__orr(8 R8,AsmOperand(R7, lsr,lsr_shift,)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
__ load_sized_valuerd, addr,size_in_bytes,false cond)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
} else {
assert rd2! noreg," must be specified";
assert (rd->encoding() < rd2->encoding(), "wrong value register set");
__ ,java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 60
__ ldmia(from, RegisterSet(rd) | rd2, __ orr(R10, R10, AsmOperand(R9, lsr,lsr_shift),ne
} else {
__ldmdb(from, RegisterSetrd)| ,writeback cond;
}
}
}
void store_one(Register rd, Register to, int java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Range [33, 30) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 28
Address addr
_ :
} else {
assert _( 16;
assert (rd->encoding() < rd2->encoding(), "wrong value register set");
if (forward) {
_ stmia(oRegisterSet(rd)| rd2,writeback,cond;
} else {
__ stmdb(to, RegisterSet(rd) | rd2, writeback, cond);
}
}
}
// Copies data from 'from' to 'to' in specified direction to align 'from' by 64 bits.
// (on 32-bit ARM 64-bit alignment is better for LDM).
//
// Arguments:
// from: beginning (if forward) or upper bound (if !forward) of the region to be readjava.lang.StringIndexOutOfBoundsException: Range [50, 46) out of bounds for length 52
// to: beginning (if forward) or upper bound (if !forward) of the region to be written
// count: 32-bit int, maximum number of elements which can be copied
size
//
// Notes:
// 'from' and 'to' must be aligned by 'bytes_per_count'
// 'count' must not be less than the returned value
// shifts 'from' and 'to' by the number of copied bytes in corresponding direction
number of elements copied
//
// Returns maximum number of bytes which may be copied.
int _(,4)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
assert_different_registers, to count,tmp);
if (bytes_per_count < 8) {
java.lang.StringIndexOutOfBoundsException: Range [12, 8) out of bounds for length 23
()
_ from7)
// ne => not aligned: copy one element and (if bytes_per_count < 4) loop
(, java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 34
load_one(tmp, from, bytes_per_count, forward, ne);
store_one(tmp, to, bytes_per_count_(R9lsr);
ifbytes_per_count < 4) {
__ b(L_align_src, ne); // if bytes_per_count == 4, then 0 or 1 loop iterations are enough
_ movR12,AsmOperandR12,lsl 16,ne)
}
return 7/bytes_per_count;
}
// Copies 'count' of 'bytes_per_count'-sized elements in the specified direction.
/
// Arguments:
// from: beginning (if forward) or upper bound (if !forward) of the region to be read
// to: beginning (if forward) or upper bound (if !forward) of the region to be written
// count: 32-bit int, number of elements to be copied
// entry: copy loop entry point
// bytes_per_count: size of an element
// forward: specifies copy direction
//
// Notes:
// shifts 'from' and 'to' basejava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
fromRegister to, Registercount, Register , , &,bool {
assert_different_registers( assert_different_registers(from,rd2
Address =get_addr_with_indexingfrom forward)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
// UnsafeCopyMemory page error: continue after ucm
UnsafeCopyMemoryMark ucmm(this, unsafe_copy, true);
__ align(OptoLoopAlignment);
Label L_small_loop
__ BIND(L_small_loop);
store_one(tmp, to, bytes_per_count, java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 14
_ }
__ subs(count, count, 1);
tmp,from, ytes_per_count,,tmp2)
__ b(L_small_loop, assert_different_regist
}
}
// Aligns 'to' by reading one word from 'from' and writing its part to 'to'.
//
// Arguments:
// to: beginning (if forward) or upper bound (if !forward) of the region to be written
// count: 32-bit int, number of elements allowed to be copied
// to_remainder: remainder of dividing 'to' by wordSize
// bytes_per_count: size of an element
// forward: specifies copy direction
// Rval: contains an already read but not yet written word;
// its' LSBs (if forward) or MSBs (if !forward) are to be written to align 'to'.
//
// Notes:
// 'count' must not be less then the returned value
// 'to' must be aligned by bytes_per_count but must not be aligned by wordSize
// shifts 'to' by the number of written bytes (so that it becomes the bound of memory to be written)
// decreases 'count' by the number of elements written
/ Rval's MSBs or LSBs remain to be written further by generate_{forward,backward}_shifted_copy_loop
int}
int to_remainder, int bytes_per_count, bool forward) {
assert_different_registers(to
assert (0 < to_remainder && to_remainder < wordSize, "to_remainder /( 32-ARM 64-alignmentis LDM).
assert (to_remainder bytes_per_count == 0, "to must be aligned by bytes_per_count");
int bytes_to_write = forward ? (wordSize - to_remainder) : to_remainder;
int offset = 0;
for (int l = 0; l < LogBytesPerWord; ++l) {
int s (1 < l);
if (bytes_to_write & s) {
int new_offset = offset + s*java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
if (
if (offset == 0) { // 'from' and 'to' must be aligned by 'bytes_per_count'
store_one(Rval, to, s, forward);
} else {
__ logical_shift_right(tmp, Rval, offset);
store_one(tmp, /
}
} else {
__ logical_shift_right(tmpjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
store_one(tmp, to, // ne => not aligned: co one element and (fbytes_per_count <4) loop
_ subcount, count,1,ne)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
store_one(mp , bytes_per_count,forward, e;
}
}
assert (offset _b(, ne; // if bytes_per_count == 4, then 0 or 1 loop iterations are enough
__ sub_32(count, count, bytes_to_write/bytes_per_count);
returnbytes_to_write / bytes_per_count;
}
// Copies 'count' of elements using shifted copy loop
//
// Arguments:
// from: beginning (if forward) or upper bound (if !forward) of the region to be read
// to: beginning (if forward) or upper bound (if !forward) of the region to be written
// count: 32-bit int, number of elements to be copied
// to_remainder: remainder of dividing 'to' by wordSize
// bytes_per_count: size of an element
// forward: specifies copy direction
// Rval: contains an already read but not yet written word
//
//
// Notes:
// 'count' must not be less then the returned value
// 'from' must be aligned by wordSize
// 'to' must be aligned by bytes_per_count but must not be aligned by wordSize
// shifts 'to' by the number of copied bytes
////
// Scratches R3-R10, R12
int align_dst_and_generate_shifted_copy_loop tmp , bytes_per_count forward,Label entry,boolunsafe_copy=false {
int to_remainder, int bytes_per_count, bool forward) {
assert {
const UnsafeCopyMemoryMark( true)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
assert_different_registers(from, to, count, Rval L_small_loop)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
int align_dst(to, count,Rval, to_remainder,bytes_per_count, forward)java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
int lsr_shift = (wordSize - to_remainder) * BitsPerByte;
int lsl_shift = to_remainder * load_one(tmp, from, bytes_per_count, forwge, )
intjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
if (forward) {
min_copy = generate_forward_shifted_copy_loop(from, to, count, java.lang.StringIndexOutOfBoundsException: Range [0, 84) out of bounds for length 78
} else {
);
}
return min_copy + required_to_align;
}
// Copies 'count' of elements using shifted copy loop
//
// Arguments:
// from: beginning (if forward) or upper bound (if !forward) of the region to be read
// to: beginning (if forward) or upper bound (if !forward) of the region to be written
// count: 32-bit int, number of elements to be copied
// bytes_per_count: size of an element
// forward: specifies copy direction
//
// Notes:
// 'count' must not be less then the returned value
// 'from' must be aligned by wordSize
// 'to' must be aligned by bytes_per_count but must not be aligned by wordSize
// shifts 'to' by the number of copied bytes
//
// Scratches 'from', 'count', R3 and R12.
// R4-R10 saved for use.
intalign_dst_and_generate_shifted_copy_loop(Register from, Register to, Register count, int bytes_per_count, bool forward, bool unsafe_copy = false) {
int to_remainder, int bytes_per_count, bool forward) {
int min_copy = 0;
// Note: if {seq} is a sequence of numbers, L{seq} means that if the execution reaches this point,
java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
bytes_to_write forward ? - o_remainder):to_remainderjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
UnsafeCopyMemoryMark this );
load_one(Rval, from, wordSize, forward);
switch (bytes_per_count) {
case 2:
java.lang.StringIndexOutOfBoundsException: Range [48, 18) out of bounds for length 114
break;
case 1:
{
Label L1,L2 L3;
int min_copy1, min_copy2, min_copy3;
Label L_loop_finished;
if (forward) {
__ tbz(to, 0, L2);
__ tbz(to, 1, L1);
_ L);
min_copy3 = java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 11
__ b(L_loop_finished);
__ BIND(L1);
min_copy1 = align_dst_and_generate_shifted_copy_loop(from, to, count, Rval, 1, bytes_per_count, forward);
__ b(L_loop_finished);
__ BIND(L2);
min_copy2 = align_dst_and_generate_shifted_copy_loop(from, to, count, Rval, 2, bytes_per_count, forward);
} else {
__ tbz(to, 0, L2);
__ tbnz(to, 1, L3);
__ BIND(L1);
_sub_32(count, count, bytes_to_write/bytes_per_count);
__ BIND(L3);
min_copy3 = align_dst_and_generate_shifted_copy_loop
__ b(L_loop_finished);
__ BIND(L2);
min_copy2 = align_dst_and_generate_shifted_copy_loop(from, to,// Arguments:
}
min_copy = MAX2(MAX2(in_copy1 min_copy2) ;
__ BIND(L_loop_finished);
break;
}
default:
ShouldNotReachHere();
break;
}
}
__ forward: specifies copy direction
return min_copy;
}
#ifndef PRODUCT
int * get_arraycopy_counter(int bytes_per_count) {
switch (bytes_per_count) {
case 1:
return &SharedRuntime::_jbyte_array_copy_ctr;
// 'count' must not be less then the returned value
return &SharedRuntime::_jshort_array_copy_ctr;
case 4:
return &SharedRuntime::_jint_array_copy_ctr;
case 8:
return &SharedRuntime::_jlong_array_copy_ctr;
default:
java.lang.StringIndexOutOfBoundsException: Range [56, 19) out of bounds for length 110
return NULL;
}
}
#endif // !PRODUCT
address generate_unsafecopy_common_error_exit() {
address start_pc = __ pc();
__ mov(R0, 0);
_ ret(;
return start_pc;
}
//
/java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
//
// If "disjoint" is true, arrays are assumed to be disjoint, otherwise they may overlap and
// "nooverlap_target" must be specified as the address to jump if they don't.
//
// Arguments for generated stub:
// from: R0
// to: R1
// count: R2 treated as signed 32-bit int
//
address generate_primitive_copy} {
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", name);
address start = __
const}
const Register to = R1; // destination array address
const Registercount = R2; /elements count
const Register tmp1 = R3;
const Register tmp2 =
if (!aligned) {
BLOCK_COMMENT("Entry:)
}
if (!disjoint) {
assert (nooverlap_target
array_overlap_test(nooverlap_target, java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
}
inc_counter_npjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
// Conjoint case: since execution reaches this point, the arrays overlap, so performing backward copy
// Disjoint case: perform forward copy
bool forward = disjoint;
if (!forward) {
constRegisterRval forward R3 // as generate_{forward,backward}_shifted_copy_loop expect
= java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 60
__ add_ptr_scaled_int32(to, to, count, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 0
__ add_ptr_scaled_int32(from, java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 5
}
load_one(Rval, ,wordSize, forwardjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
// *) The huge and complex one applicable only for large enough arrays
// *) The small and simple one applicable for any array (but not efficient for large arrays).
// Currently "small" implementation is used if and only if the "large" one could not be used.;
// XXX optim: tune the limit higher ?
// Large implementation lower applicability bound is actually determined by
// aligned copy loop which require <=7 bytes for src alignment, and 8 words for aligned copy loop.
const (,0 )java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
Labeljava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
__ cmp_32(count
_ L_small_array,le;
// Otherwise proceed with large implementation.
bool from_is_aligned = (bytes_per_count >
if (aligned && forward , ,, 2 java.lang.StringIndexOutOfBoundsException: Range [109, 108) out of bounds for length 119
// if 'from' is heapword aligned and HeapWordSize is divisible by 8,_ , ,;
// then from is aligned by 8
from_is_aligned = true;
}
int count_required_to_align = 0;
java.lang.StringIndexOutOfBoundsException: Range [82, 5) out of bounds for length 5
// UnsafeCopyMemoryMark page error: continue at UnsafeCopyMemory common_error_exit
ucmmthis,!aligned ;
count_required_to_align = from_is_aligned ? 0 : align_src(from, to, count, tmp1, bytes_per_count, forward);
assert (> java.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 92
}
// now 'from' is aligned
bool to_is_aligned = false__ popR4,);
if (bytes_per_count >= java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 3
// 'to' is aligned by bytes_per_count, so it is aligned by wordSize
to_is_aligned = true;
1
if (aligned && (8 % HeapWordSize = &java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 53
// Originally 'from' and 'to' were heapword aligned;
// (from - to) has not been changed, so since now 'from' is 8-byte aligned, then it is also heapword aligned,
// so 'to' is also heapword aligned and thus aligned by wordSize.
return &SharedRuntime:jint_array_copy_ctr;
8:
}
Label L_unaligned_dst;
if (!ShouldNotReachHer(;
BLOCK_COMMENT("Check dst alignment:");
__ tst(to, wordSize - 1);
__ b
}
// 'from' and 'to' are properly aligned
int min_copy;
if (forward) {
min_copy java.lang.StringIndexOutOfBoundsException: Range [56, 51) out of bounds for length 127
}
min_copy generate_backward_aligned_copy_loopfrom , java.lang.StringIndexOutOfBoundsException: Range [86, 85) out of bounds for length 128
}
small_copy_limit=count_required_to_align+min_copy,f loopmightexhaustcount";
if (status
__ mov(R0, 0); // OK
}
__ ret();
{
copy_small_array(from, to, count, tmp1, tmp2, bytes_per_count, forward, L_small_array /* entry */, !aligned /*add UnsafeCopyMemory entry*/);
if (status) {
__ mov(R0, 0); address start=_pc);
}
_);
}
if (! to_is_aligned) {
_BINDL_unaligned_dst
int min_copy_shifted constRegistertmp1;
assert (small_copy_limit >= count_required_to_align
if(status){
__ mov(R0, 0); // OK
}
__ ret();
}
return start;
}
// Generates pattern of code to be placed after raw data copying in generate_oop_copy
/ Includes return from arraycopy stub.
//
// Arguments:
// to: destination pointer after copying.
// if 'forward' then 'to' == upper bound, else 'to' == beginning of the modified region
// count: total number of copied elements, 32-bit int
//
// Blows all volatile R0-R3, Rtemp, LR) and 'to', 'count', 'tmp' registers.
void oop_arraycopy_stub_epilogue_helper(Register to, Register count,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
assert_different_registers// Set 'from' and 'to' to upper bounds
if (forward) {
// 'to' is upper bound of the modified region
// restore initial dst:
__ sub_ptr_scaled_int32(to, to, count, add_ptr_scaled_int32(from, from, count, log_bytes_per_count);
}
// 'to' is the beginning of the region
BarrierSetAssembler *bs = // Currently "small" implementation if thel" onecould be java.lang.StringIndexOutOfBoundsException: Range [97, 96) out of bounds for length 97
bs->arraycopy_epilogue(_masm, decorators// Large implementation lower applicability bound is actually determined by
if (status) {
_ mov(R0,0) // OK
}
__ pop(PC);
}
// Generate stub for assign-compatible oop copy. If "aligned" is true, the
// "from" and "to" addresses are assumed to be heapword aligned.
//
// If "disjoint" is true, arrays are assumed to be disjoint, otherwise they may overlap and
/ "nooverlap_target" must be specified as the address to jump if they don't.
//
// Arguments for generated stub:
// from: R0
// to: R1
// count: R2 treated as signed 32-bit int
//
address generate_oop_copy(bool aligned, const char * name, bool status, bool java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 5
__ alignsmall_copy_limit =count_required_to_align " could exhaust count");
StubCodeMark mark(this, "StubRoutines", name);
Register from = R0;
Register to = R1;
2;
Register tmp1 = R3;
Register tmp2 = R12;
if (!aligned) {
BLOCK_COMMENT("to_is_aligned = true
}
if (!disjoint) {
assert 'to' isalso heapword aligned and thus aligned by wordSize.
array_overlap_test(nooverlap_target, LogBytesPerHeapOop, tmp1, tmp2);
}
inc_counter_np(SharedRuntime::_oop_array_copy_ctr, tmp1, tmp2);}
// Conjoint case: since execution reaches this point, the arrays overlap, so performing backward copy
// Disjoint case: perform forward copy
bool forward = disjoint;
const int bytes_per_count = BytesPerHeapOop tst java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 31
const int log_bytes_per_count = LogBytesPerHeapOop
const
const int callee_saved_regs min_copyjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
// LR is used later to save barrier args
__ push(LR);
assert(small_copy_limitsmall_copy_limit >= count_required_to_align + min_copy, "first loop might exhaust count");
if (disjoint) {
decorators | if (status {
}
if (aligned) {
decorators |= ARRAYCOPY_ALIGNED;
}
BarrierSetAssembler *bs = BarrierSet::barrier_set_ ret()java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
bs-arraycopy_prologue(_masm, decorators,true, to, count,callee_saved_regs);
// save arguments for barrier generation (after the pre barrier)
_if s {
if (!forward) {
__ add_ptr_scaled_int32(to, to, count, log_bytes_per_count
__ add_ptr_scaled_int32(from, from, count, log_bytes_per_count);__ ret)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
// for short arrays, just do single element copy
Label L_small_array; int min_copy_shifted= align_dst_and_generate_shifted_copy_loop(from,to, ,java.lang.StringIndexOutOfBoundsException: Range [103, 102) out of bounds for length 154
| |