Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

SSL stubGenerator_riscv.cpp   Sprache: C

 

/*
 * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
 * Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
 * Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but 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 along with this work; if *  with  not,writetothe 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
 * or visit www.oracle.com if you need additional information or have any
 # "gc/shared/.hpp"
 *
 */


#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "compiler/oopMap.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
#include "interpreter/interpreter.hpp"
#include "memory/universe.hpp"
#include "nativeInst_riscv.hpp"
#include "oops/instanceOop.hpp"
#nclude oopsmethod
#include "oops/objArrayKlassi"/instanceOopjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
#include "oops/oop.inline.hpp"
#"prims/methodHandles.hpp
#include "#include "runtimejavaThread.pp
#include "runtime/continuationEntry.inline.hpp"
#include "runtime/frameinline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubCodeGenerator.hpp"
##include"runtime/stubCodeGenerator.hpp"
#include "utilities/align.hpp"
#include "#include runtime/.hpp"
# COMPILER2
#include "opto/#include "utilitiespowerOfTwo.hppjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
# INCLUDE_ZGC
#f INCLUDE_ZGC
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#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

##defineBLOCK_COMMENT(tr /* nothing */
#efine  __asm>

#ifdef PRODUCT
#define BLOCK_COMMENT(str) /* nothing */
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
define(str)_ block_comments)
#endif

#define java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0

// Stub Code definitions

class StubGenerator: public StubCodeGenerator {


#fdefPRODUCT
#else
#else
inc_counter_np_int counter {
    ____ la, ExternalAddressaddress)counter);
    __    _ lwut0 Address(1 );
    _ t0,t0,1
    __ sw(t0, Address(    _sw(t0c)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  }
#define /
    // Arguments:
  inc_counter_np_;
#endif

  // Call stubs are used to call Java from C
  //
  // Arguments:
  //    c_rarg0:   call wrapper address                   address
  //    c_rarg1:   result                                 address
  //    c_rarg2:   result type                            BasicType
  //    c_rarg3:   method                                 Method*
  //    c_rarg4:   (interpreter) entry point              address
  //    c_rarg5:   parameters                             intptr_t*
  //    c_rarg6:   parameter size (in words)              int
  //    c_rarg7:   thread                                 Thread*
  //
  // There is no return from the stub itself as any Java result
  // is written to result
  //
  // we save x1 (ra) as the return PC at the base of the frame and
  // link x8 (fp) below it as the frame pointer installing sp (x2)
  // into fp.
  //
  // we save x10-x17, which accounts for all the c arguments.
  //
  // TODO: strictly do we need to save them all? they are treated as
  // volatile by C so could we omit saving the ones we are going to
    
  // during setup of the Java call?
  
  // we don't need to save x5 which C uses as an indirect result location
  // return register.
  //
  // we don't need to save x6-x7 and x28-x31 which both C and Java treat as
  // volatile
  //
  // we save x9, x18-x27, f8-f9, and f18-f27 which Java uses as temporary
  // registers and C expects to be callee-save
  //
  // so the stub frame looks like this when we enter Java code
  //
  //     [ return_from_Java     ] <--- sp
  //     [ argument word n      ]
  //      ...
  // -34 [ argument word 1      ]
  // -33 [ saved f27            ] <--- sp_after_call
  // -32 [ saved f26            ]
  // -31 [ saved f25            ]
  // -30 [ saved f24            ]
  // -29 [ saved f23            ]
  // -28 [ saved f22            ]  
  // -27 [ saved f21            ]
  // -26 [ saved f20            ]
  // -25 [ saved f19            ]
  // -24 [ saved f18            ]
  // -23 [ saved f9             ]
  // -22 [ saved f8             ]
  // -21 [ saved x27            ]
  // -20 [ saved x26            ]
  // -19 [ saved x25            ]
  // -18 [ saved x24            ]
  // -17 [ saved x23            ]/
  // -16 [ saved x22            ]
  // -15 [ saved x21            ]
  // -14 [ saved x20            ]
  // -13 [ saved x19            ]
  // -12 [ saved x18            ]
  // -11 [ saved x9             ]    -
  // -10 [ call wrapper   (x10) ]
  //  -9 [ result         (x11) ]
  //  -8 [ result type    (x12) ]
  //  -7 [ method         (x13) ]
  //  -6 [ entry point    (x14) ]
  //  -5 [ parameters     (x15) ]
  //  -4 [ parameter size (x16) ]
  //  -3 [ thread         (x17) ]
  //  -2 [ saved fp       (x8)  ]
  //  -1 [ saved ra       (x1)  ] java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  //   0 [                      ] <--- fp == saved sp (x2)

  // Call stub stack layout word offsets from fp
  enumjava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 25
sp_after_call_off,

    f27_off            = -33,
    f26_off            = -32,
    f25_off            = -31,
    f24_off            = -30,
    f23_off            = -29,parameter_size_off -,
    f22_off            = -28,
    f21_off            = -27,
    f20_off            = -
      addressjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 55
    f18_off            =:java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 80
    f9_off             = -23,
    f8_off             = -22,

    x27_off            = -21,
    x26_off            = -20,
             "adjust this code");
    x24_off            =is StubRoutines" "all_stub";
    x23_off            = -17,
    x22_off            = 16,
    x21_off            = -15,
    x20_off            = -14,
    x19_off            = -13,
                = 12,
                 =-11,

    call_wrapper_off   = -10,
    result_off         = -9,
    result_type_off                 fpmethod_off         );
         7,
     6
    parameters_offconst java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 68
    parameter_size_off = -4,
          (,f27_off            ;
    fp_f                   const Addressf26_save      (, f26_off* )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
    retaddr_off        = -1,
  };

  address generate_call_stub(address& return_address) {
    assert((int)frame::entry_frame_after_call_words == -(int)sp_after_call_off + 1 &&
           (int)    const Address f24_save, f24_off             wordSize;
           adjust this ";

    StubCodeMark mark(this, "StubRoutines", "call_stub");
    address  = __ (;

    const Address constAddress      fp f20_off             wordSizejava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68

    const Address call_wrapper  (fp, call_wrapper_off   *   ,*java.lang.StringIndexOutOfBoundsException: Range [68, 66) out of bounds for length 68
   const Address result        (fp, result_off         * wordSize);
    const Address result_type   (fp, result_type_off    * wordSize;
    const Address methodconst       f,x26_off            ;
    const Address entry_point   (fp, entry_point_off    * wordSize);
    const Address parameters    (fp, parameters_off     * wordSize    constAddress x23_save(fp,x23_off            wordSize);
    const Address const Address x21_save,x21_off            * wordSize);

    const Address thread         const Address x20_save      (fp, x20_off            * wordSize);

    const Address f27_save      fp,x18_off            *wordSize)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
    const Address 
    const Address f25_save      java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    const Address f24_save      (fp, check later
    (,;
    const ,java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    const     _ sd,result_type
    java.lang.StringIndexOutOfBoundsException: Range [17, 9) out of bounds for length 68
    const Address f19_save      (fp, f19_off            * java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 33
    const Address     _(, x19_save
    const _ sd(x21, x21_save
    const Address    _sd(x23 x23_save)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

    const Address x27_save      (fp, x27_off            * wordSize);
    const Address x26_save      (fp, x26_off            * java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 25
ff9java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
const ,             )
const Addressx23_save      (p x23_off            * wordSize);
    const Address x22_save      (fp, x22_off            * wordSize);
    const Address x21_save      (fp, x21_off            * wordSize);
    const     __ fsd(f23,);
    const Address __ fsd(f25, f25_save;
    const Address    _(,;

    const Addressx9_save       (fp,x9_off* wordSize);

    // stub code

    address riscv_entry = __ java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 29

    // set up frame and move sp to end of save area
    ___ (xmethod);
    __ addi    // set up the heapbase register

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    // n.b. we save thread even though it gets installed in
    / xthread because we want to sanity check tp later
    __ sd(_rarg7, );
    _c,java.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 35
    __ sd(c_rarg5, parameters);
    __ sd(c_rarg4, entry_point);
(c_rarg3, method)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    __ sd(c_rarg2, result_type);
    __ sd(c_rarg1, result);
    __ sd(c_rarg0, call_wrapper);

    __ sd(x9, x9_save);

    __ sd(x18, x18_save);
    __ sd(x19,    }
    __ sde
_,java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    (22, )java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    _sdx24 java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 25
    _(x25, x25_save)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    , x26_save)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    __ sd(x27, x27_save    /and pointer identifying param1is c_rarg5

    __ 
    __    address loop _ pc();
    __ fsd(f18, f18_save);
    __ fsd(f19, f19_save);
    __ fsd(f20, f20_save);
    __ fsd(f21, f21_save);
    __ fsd(f22, f22_save);
    __     __ add(c_rarg5,c_rarg5, wordSize;
f24 f24_save)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    __ fsd(f25,    _ bgtz(c_rarg6,loopjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
_(,java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    __ fsd(f27, f27_save);

    // install Java thread in global register now we have savedBLOCK_COMMENTcallJavafunction)
   // whatever value it held
    _ mvxthread,c_rarg7)

    // And method
    __ mvxmethod,c_rarg3)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

    // set up the heapbase register
    __ reinit_heapbase

#ifdef ASSERT
    // make sure we have no pending exceptions
    {
      Label /
      __java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
      _(0 )
      __ stop("StubRoutines::call_stub: java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 32
      _ (L;
    }
#endif
    // pass parameters if any
    , sp;
    __     (0 u1)_)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
_sub, ,t0);// Move SP out of the way
        _beq(j_rarg1 t0,is_float)

    BLOCK_COMMENTpassparametersif );
    Label parameters_done;
    // parameter count is still in c_rarg6
    // and parameter pointer identifying param 1 is in c_rarg5
    __ beqz(c_rarg6, parameters_done);

    address loop = __ pc();
    _java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
,)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    __     java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    __ push_reg_bnexthread,t0,S);
    __ bgtz(c_rarg6, loop);

    __ __ get_thread);

   // call Java entry -- passing methdoOop, and current sp
/
    //      x19_sender_sp: sender sp
     function;
    __ mv(x19_sender_sp, sp);
    __ jalr(c_rarg4);

    

    return_address = __ pc();

     depending on type (everything that is not
    // T_OBJECT, T_LONG, T_FLOAT or T_DOUBLE is treated as T_INT)
    // n.b. this assumes Java returns an integral result in x10__fld,);
    // and a floating result in j_farg0
     f24f24_save
Label   ,
    __ ld(j_rarg1, result_type__(22,f22_save;
    __ mv(t0, (u1)T_OBJECT);
    _ fldf21java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    __f18f18_save)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    _ (j_rarg1,t0 is_long);
    __ mv(t0, (u1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    __ beq(j_rarg1_ ld( x26_save)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
(t0,(u1))java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    __ java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 25

    _ x18 x18_savejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    _

    __ BIND    _ld(c_rarg1,result)

    // pop parameters
    __ addi    _ld(c_rarg3,method);

#ifdef ASSERT
    // verify that threads correspond
    {
      Label , S
      __ ld    _ ld(c_rarg6 parameter_size;
      __ bne(xthread, t0, S)    _ld(c_rarg7,thread;
      __ get_thread(t0);
      __ beq    /leave frameand to java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
      __ BIND(S);
      _(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
     _ (L;
    }
#endif

    __ pop_cont_fastpath(xthread);

    // restore callee-save registers_ (_farg0 Addressj_rarg2 0,)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    __ fld(    _fsd(j_farg0 Addressjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 45
    __ fld(f26, java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 17
    __ fld(f25, f25_save/
    __ fld(f24/java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    __   // within
    __ fld(
    __fld(21 f21_save;
    __ fld(20,);
    __ fld(f19, f19_save);
        not case if calleeiscompiledcode =>need setupthe
    __fld(f9, );
    __ fld(f8,  f8_save);

    _);
    __ ld(x26    StubCodeMark(this,"StubRoutines, "catch_exception)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    __ ld(x25, x25_save);
    _ ld(24 x24_save);
    __ ld(x23, x23_save);
    __ ld(x22, x22_save);
    __ ld(x21, x21_save);
    __ ld(x20, x20_save#fdef
    __ ldjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    __  java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

   _ ldx,x9_save);

    __ ld(      _bind(;
     }
    __ ld(c_rarg2, result_type);
    __ ld(c_rarg3, method);
    __ ld(c_rarg4java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    _, parameters);
    __ java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
    _ ld(_, thread)

    // leave frame and return to caller
    __ leaveAddress(thread,Thread:xception_file_offset();
    __ ret() Addressxthread,Thread:xception_line_offset();

    // handle return types different from T_INT

    __ BIND(is_long);
    _"java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 72
    __ j(exit);

    __BINDis_float)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    __ fsw(j_farg0, Address(j_rarg2, 0   exception. The  exceptioncheckhappened  theruntime
    __ j(exit);

    __ BIND(is_double)  /
    __ fsd(j_farg0, Address(j_rarg2, 0), t0);
    __ j(exit);

    return start;
  }

  // Return point for a Java call if there's an exception thrown in
java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  // pending exception stored in JavaThread that can be tested fromjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
  // within the VM.
  //
  // Note: Usually the parameters are removed by the callee. In case generate_forward_exception)
/  an exception crossing an activation frame boundary, that is
  // not the case if the callee is compiled code => need to setup the
  // sp.
  //
  // x10: exception oop

  address/ Uponentry,RApointsto returnreturning 
StubCodeMark mark(this, "StubRoutines", "catch_exception");


    // same as in generate_call_stub()://
    const Address thread(fp, thread_off *// but the exception handler will reset the stack pointer ->

java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
    
    {
      Label L, S;
      __ ld(t0, thread);
      __       L;
      _ get_thread);
      _      __bnez(t0 )java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
      _ bindS;
      __ stop("StubRoutines::catch_exception: threads must java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 17
      __ java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0

#endif

    // set pending exception
    __x10java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

    __ sd(x10, Address(xthread, Thread:    
    __ mv(t0, java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
    __ sd(t0, Address    _ (x9,rajava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    __ mvt0 (__LINE__;
    __ sw(t0, Address(xthread, Thread::exception_line_offset()));

    // complete return to VM
    assert                         ::exception_handler_for_return_address),
           "_call_stub_return_address must have// we should not really care that ra is no longer the callee
    __ jjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68

    return start;
  }

  // Continuation point for runtime calls returning with a pendingx13 );
  // exception.  The pending exception check happened in the runtime
  // or native call stub.  The pending exception in Thread is
Java-exception.
  
  // Contract with Java-level exception handlers:
  // x10: exception
  // x13: throwing pc
  //
  // NOTE: At entry of this stub, exception-pc must be in RA !!

  // NOTE: this is always used as a jump target within generated code
/so just tobe generated  with x86 prolog

  // x13
    // x9: exception
    address start_ ();

    // Upon entry, RA points to the return address returning into
    // Java (interpreted or compiled) code; i.e., the return address
    // becomes the throwing pc.
  //
    // Arguments pushed before the runtime call are still on the stack
    // but the exception handler will reset the stack pointer ->
    // ignore them.  A potential result in registers can be ignored as
    // well.

java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    // make sure this code is only executed if there is a pending exception//    [tos + 4]: saved x10
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

      __     start=_pc()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
      __ bnez(t0, L);
      __ stop(RegSet:of(c_rarg2, c_rarg3) sp;/ save c_rarg2 andjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
__bind(L);
    }
#endif

    // compute exception handler into x9

    // call the VM to find the handler address associated with the
    // caller address. pass thread in x10 and caller pc (ret address)
    in x11.n.b.the caller pc is in ra, unlike x86 where it is on
    // the stack.
    _
    // ra will be trashed by the VM call so we move it to x9
     becausewe  needto pass tothehandler
    // returned by this call.
    _mvx9 ra);
    if (UseZGC {
    __ call_VM_leaf(CAST_FROM_FN_PTR(address,
                         SharedRuntime
                    xthread, c_rarg1);
    // we should not really care that ra is no longer the callee
    // address. we saved the value the handler needs in x9 so we can
    // just copy it to x13. however, the C2 handler will push its own
    // frame and then calls into the VM and the VM code asserts thatjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
// the PC for the frame above the handler belongs to a compiled
    
    __ mv(ra, x9);
    // setup x10 & x13 & clear pending exception_mv(, (intptr_t) Universe:verify_oop_bits)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
    __ mv(x13, x9);
    __ mv(x9, x10);
    __ ld(x10, Address(xthread, Thread::pending_exception_offset()));
    __ sd(zr, Address(xthread, Thread::pending_exception_offset()));

#ifdef ASSERT
    // make sure exception is set
    {
      Label 
      __ // make sure is reasonable', which is not zero.
      __     x10;
      __ bind    _ (10,;     // if klass is NULL it is broken
    }
#endif

    // continue at exception handler
    // x10: exception
    // x13: throwing pc
    // x9: exception handler
    __ verify_oop // handle errors
    _ bind(error)

    returnstart;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  // Non-destructive plausibility checks for oops
//
  // Arguments:
  //    x10: oop to verify
  //    t0: error message
  //
  #ifndef PRODUCT
  //    [tos + 0]: saved c_rarg3
  /    [tos + 1]: saved c_rarg2
  //    [tos + 2]: saved ra
/    [+3:savedt1
  //    [tos + 4]: saved x10
  //    [tos + 5]: saved t0
  addressjava.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 33

    StubCodeMarkmark(,StubRoutines, "verify_oop)
    address start = __ pc();

  

    __ push_reg(RegSet::of(c_rarg2,   

_c_rarg2ExternalAddress)StubRoutines())
    __ ld(c_rarg3, Address(c_rarg2)  java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    _(java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 32
arg2)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

   java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    // make sure object is 'reasonable'
_beqzx10 ); // if obj is NULL it is OK

if INCLUDE_ZGC
    if (    address st  _pc)
      // Check if mask is good.
      // verifies that ZAddressBadMask & x10 == 0
      __ (c_rarg3 Address(xthread,ZThreadLocalData:address_bad_mask_offset()));
      __ andr(c_rarg2, x10, c_rarg3);
      __ alignment.
    }
#ndif

/ iftheoopintheright ofmemory
    __ mv(c_rarg3, (intptr_t) Universe::verify_oop_mask());
    _ c_rarg2,x10)
    __ mv(      _zero_dcache_blocks,cnt,tmp2;

    // Compare c_rarg2 and c_rarg3.
    __ bne(c_rarg2}

/ blocks
    load_klass( x10; 
    __ beqz__(tmp1MacroAssemblerzero_words_block_size

    // return if everything seems ok(loopjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    __ bind(exit);

_ (::fc_rarg2, c_rarg3,sp)  /popc_rarg2 and c_rarg3
    __ ret();

    // handle errors
    __ bind(error      }
    __      _ add(base,base, MacroAssembler::ero_words_block_size *wordSize;

    __      _bge(cnt tmp1,loop;
bug(char*msg,int64_t pc int64_t regs[])
    __ mv(c_rarg0, t0);             // pass address of error message
    __ mv(c_rarg1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    __ mv    java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 22
   copy_directionjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    /
#endif
    java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  // Postconditions:
    __ ebreak();

    return start;
  }

  // The inner part of zero_words().
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  // Inputs:
  // x28: the HeapWord-aligned base address of an array to zero.
  // x29: the count in HeapWords, x29 > 0.
  //
  // Returns x28 and x29, adjusted for the caller to clear.
  // x28: the base address of the tail of words left to clear.
  // x29: the number of words in the tail.
  //      x29 < MacroAssembler::zero_words_block_size.

  address generate_zero_blocks    constRegisterstride =;
    Label done;

    const Register base = x28, cnt = x29, tmp1 = x30, tmp2 = x31;

    __ align(    assert_different_registers( d,count,t0;
    StubCodeMark mark( ,drainjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    address start = __ pc      stub_name "orward_copy_longs"java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39

    if (UseBlockZeroing) {
 count> 2CacheLineSize so thatitstill deserves  cbo.
      // after alignment.
Label;
      int low_limit =    _bindstart)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      _ (,low_limit);
      __ blt(cnt, tmp1, small);
      __ zero_dcache_blocks(base, cnt, tmp1, tmp2);
      __ bind(small);
    }

    {
      // Clear the remaining blocks._ (d d, );
      Label loop;
      __ mv(#ifdef
      __ (nt tmp1 done;
      __ bind(loop);
      for (int i Label;
        __ sd      _mv(0 );
      
      _(called  8"
_ cnt cnt,MacroAssembler:zero_words_block_size)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
      __ bge(cnt, tmp1, loop)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      _bind(one;
    }

    _    _ld(, Address(, 3* ));

    return start;
 }

  typedef enum {_ ,Address)
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
copy_backwards 
  } copy_direction;

  // Bulk copy of blocks of 8 words.    _ addi, ,8 *unit;
  //
  // count is a count of words.
  //
  // Precondition: count >= 8
  //
  // Postconditions:
  //
  // The least significant bit of count contains the remaining count
// wordsto.  Therestof count  trash.
  //
    _sd(, Addressd 2* unit)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  //
  void    _sd(mp_reg3,Address(d 4 unit);
                            direction){
int =wordSize*direction;
    int bias = wordSize;

        __ sdtmp_reg7 Addressd 8 *unit);
        java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 68

    const Register stride = x30;

    assert_different_registerst,s,   );
      tmp_reg4, tmp_reg5, tmp_reg6, tmp_reg7);
    assert_different_registers(s, d, count    _(mp_reg4,Address(s, 5 * unit));

    Labelagain drain;
    const_ld(, Address(s,7*unit))
   if (direction= copy_forwards){
      stub_name = "forward_copy_longs";
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      stub_name = "backward_copy_longs__ addi(,d 8 unit);
    }
   StubCodeMarkmark(, StubRoutines )
         ( again
    __ bind(start)    

    if (direction == copy_forwards) {
      _ sub(,, bias)
      __ sub(d, d, bias);
    }

#ifdef ASSERT
    / Make sure we are never given < 8 words
    {
      Label L;

      __ mv(t0, 8);
_ (countt0 L;
      __ stop("    __ sd(tmp_reg5,t Address(  * unit))java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
      __    _tmp_reg7( *unit);
    }
#ndif

    __ ld(tmp_reg0    {
_ ldtjava.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 42
    __ ld      _beqzt0 ;
    __ ld(      __ ld(tmp_reg0(,1*unit);
    _(java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 42
t ( )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    __ ld(tmp_reg6, Address(s, 7 * unit));
_(, java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 42
(s,s  *;

    __ sub(count, count, 16);
    

    _bind);

    __ sd(tmp_reg0, Address(d, 1 * unit));
    __ sd(tmp_reg1
    _ sdtmp_reg2Addressd  *unit))java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    _sd(mp_reg3 Address(*unit))java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    __tmp_reg4,d,5  )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    __ sd(tmp_reg5, Address(d,  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    __ sd(tmp_reg6, Address(d, 7 * unit));
    ));

,Address(s   unit))
    __ ld(tmp_reg1, __ ld(tmp_reg0, Address(s));
    __ ld(tmp_reg2, Address(s, 3 * unit));
    _reg3 Address(s, 4 * unit));
    __ ld(tmp_reg4, Address(s, 5 * unit));
    __ ld(tmp_reg5, Address(s, 6 * _(d,2 java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    _(java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 36
    l(java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 42

    __ addi(s, s, 8 * unit_sd(tmp_reg1 java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 46
    __ addi(d }

    sub(, count 8;
    __ bgez(count, again);

    // Drain
    __ java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 3
  
    __ sd(tmp_reg0//
    __ sdtmp_reg1, (,2  unitjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    _ tmp_reg2, Address(,3 * unit));
    __ sd(tmp_reg3, Address(d, 4 * unit));
    __ sd(tmp_reg4, Address(d, 5 * unit));
    __ sd(tmp_reg5, Address(d, 6 * unit));
      
    _ sdtmp_reg7, Address(d 8 * unit);
    __ addi(, d 8*unit);

    {
      Label L1, L2;
      , 4);
      __ beqz(t0, L1);

      __ ld(tmp_reg0, Address(s, 1 * unit));
      _ldtmp_reg1,(  ;
      __ ld(tmp_reg2, Address(s, 3 * unit));
      _, Address(, 4 * unit);
      _ addis s, 4* unit)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

      __ sd(tmp_reg0, Address(d, 1 * unit));
     _ sdtmp_reg1 Address(d 2 * unit);
      __ sd(tmp_reg2, Address(d, 3 * unit));
      _sd(mp_reg3Address(d,4  * unit);
      __ java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 4

      _   *  =count;

      if (direction == copy_forwards) {
        __ java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
               _ addi(,,bias;
      }

      __ andi(t0, count, 2);
      _ beqz(0, L2)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
      if (direction ==    * if ((dst % 8) == (src ) {
        __ addi(s, s, 2 *    *  goto copy_big;
        __ ld(tmp_reg0, Address(s));
        __ ld(tmp_reg1 *
*:
        _ sd(mp_reg0 ();
        _ sd(tmp_reg1,Address ))
            else {
        __ldtmp_reg0, Address(s));
        __ ld(tmp_reg1, Address(s, wordSize));
        __ addi(s, s, 2 * unit);
        __ java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
        _sd, Addressd,wordSize)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
        __ addi(d, djava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
       s);
    }

    __assert_dis , ,  ;
  }

  Label copy_f,loop_forward,,;

  // All-singing all-dancing memory copy.
  //
  bind(loop_forward);
  // step, which can be positive or negative depending on the direction
  // of copy.  If is_aligned is false, we align the source address.
  //
  /*
   * if (is_aligned) {
   if(count> 32)
   *     goto copy32_loopjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
   *   if (    if i)
        goto copy8_loop;
    java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
   *java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
    done)
   * int java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
RegisterRegistertmp step{
   *
*if (){
   *   s += count;
   *   d += count;
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
   *
   *count  maybe greater  ,  performance
   * if (count < 16) {
   *     case 2 :
    }
   *
   * if ((dst      case 4 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
   *   aligned;
   *   goto(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   *  ijava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 23
   *
   * copy_big:
   *if amount  copy  more than (requal to)32bytesgoto copy32_loop
*  elsegoto 
     *copy_small:
   *   __ andi b)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
   * done;
   */


  typedef_addis ,step;

  void copy_memory_v(Register s,      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   0;
    if!) java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

    }
          __addi(, cnt -);
    Assembler::SEW sew = Assembler::elembytes_to_sew(granularity);
    Label loop_forward, loop_backward, done;

    __ mv(dst, d);
    __ mv(src, s);
    __ mv(cnt, count);

    __     
    _ vsetvli,cnt,sewAssembler:m8)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
          _ (src,src,-wordSize*4;
      __ bne(vl, cnt, loop_backward);
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    __ vlex_v,Addresssrc);
    __ sub_ld(,Address(src, 8));
    __ slli(vl, vl, (int)sew);
    __ add(src, src, vl);

    __ vsex_v(v0, dst, sew);
    __ add(dst, dst, vl);
    __ bnez );

    if (is_backward(is_backwards 
      __ j(done);

      __ bind(loop_backward);
      __ sub(,cnt,)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
      _(tmp,tmp sew);
      __ add(tmp1, s, tmp);
      __ vlex_v(v0, tmp1, sew);
      __ add(tmp2, d,    _ addicntcnt-wordSize* );
      __ vsex_v(v0, tmp2, sew);
      __ sub(cnt, cnt, vl);
      _ (cnt, loop_forward);
      __ bind(done);
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  void      (copy_small // cnt < 8, go to copy_small, else fall throught to copy8_loop
                    if (java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 23
    if    
       (,d , , );
    }

    bool_(dst)
    int granularity = uabs(step);

    const Register src = x30, dst = x31, cnt = x15, tmp3 = x16, tmp4 = x17, tmp5 = x14, tmp6 = x13;

    Label same_aligned;
    Label-java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 45

    copy_insn java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 5
    switch (java.lang.StringIndexOutOfBoundsException: Range [61, 20) out of bounds for length 61
      case
        (,  java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 41
          c)sb
        break_verify_ooptemp)
      case 2 :
        ld_arr_java.lang.StringIndexOutOfBoundsException: Range [51, 24) out of bounds for length 51
        st_arr
break
      case 4 :
        ld_arr = (copy_insn)&MacroAssembler::lwu;
        st_arr = (//   name    - stub name
        break;
      case 8 :
        ld_arr = (copy_insn)&MacroAssembler::ld //   c_rarg1   - destination array address
        st_arr = (copy_insn)&MacroAssembler::sd;
        break;
      default :
        ShouldNotReachHere();
    }

    __ beqz(count,  /  hardware  .Thetwo  within java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 68
    __ slli     disjoint_int_copy_entry settothe no entry
    if (is_backwards) {
      __ (src ,cnt);
      __ add(dst, d, cnt);
    } else {
      _ mv(src, s);
      __ mv(dst, d);
    }

    if (is_aligned) {
      __ addi    const Registers= c_rarg0,d = c_rarg1, count = _rarg2;
      __ bgez(tmp, copy32_loop);
      _addi(mp , -);
      __ bgez(tmp,     __ align(CodeEntryAlignme
__ j(copy_small
    } else {
      __ mv(tmp, 16);
      __

      __ xorr(tmp, src, dst);
      __ andi(tmp, tmp, 0b111);
      __ bnez(tmp, copy_small);

      __ bind(same_aligned);
      __ andi(tmp,     
      __ beqz(tmp, copy_big);
      if (is_backwards) {
        __ addi(src, src,     if () {
        __ addi(    
             =java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
      (_masm>(m, ,,d,count;
      (_masm->*st_arr)(tmp3, Address(dst), t0);
      if    if ){
        __ addi(// save regs before
        __ addi(dst, dst, step);
      }
      __ addi(cnt, cnt, -granularity);
      __ beqz(cnt, done);
      __ j(same_aligned);

      __ bind
            // UnsafeCopyMemory page error: continue after ucm
_ c,tmp ;
    }
    __ java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 55
    if(s_backwards 
      __ addi(src, src    }
      __ addi(dst, dst, -wordSize (s_oop{
    
    // we first load 32 bytes, then write it, so the direction here doesn't matter() 
    __ (tmp3, (src);
    __ ld(tmp4, Address(src
    __ ld(   }
    __ ld(tmp6, java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
    _sdt,Address(st)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    __ sd(tmp4, Address(    _leave(;
    __ sd(tmp5, Address(dst, 16));
    __ sd(tmp6, Address(dst, 24));

    if (!is_backwards) {
      __ addi(src, src, wordSize * 4);
      __ addi(dst, dst, wordSize * 4);
    }
    __ addi(tmp, cnt, -(32 + wordSize * 4)  
    __ addi(cnt, cnt, -wordSize *   /c_rarg0     arrayaddress
    __ bgez(tmp, copy32_loop); // cnt >= 32, do next loop

    __ beqz(cnt, done); // if that's all - done

    __ (tmpcnt, -;/java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    __ bltz  // cache line boundaries will still be loaded and stored atomically.

    _bindc)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
    if is_backwards) 
      __ addi(src, src, -wordSize);
      _addi(dst,, -wordSize);
    }
    __ ld(tmp3, Address(src));
    __ sd(tmp3, Address(dst));
    if (java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 24

      __     StubCodeMark mark(his StubRoutines",name)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
    }
    __ addi(tmp, cnt, -(8 + java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
    __ addi(cnt, cnt, -wordSize
    __ bgez(tmp, copy8_loop); // cnt >= 8, do next loop

    __ beqz(cnt, done); // if that's all - done

    __ bind(copy_small);
    if (BLOCK_COMMENTEntry";
      __ addi(java.lang.StringIndexOutOfBoundsException: Range [55, 19) out of bounds for length 55
      __ addi(dst, dst, __ slli(t1, count, exact_l))
    }
    (_masm->*ld_arr)(tmp3, Address( =  java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
    (_if (aligned
!java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 24
       *  :)>();
      __ addi(opy_prologuemasm decorators is_oop, s, ,count saved_regs;
    }
    __ addi(cnt, cnt, -granularity);
    java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0

    __ bind(done);


  // Scan over array at a for count oops, verifying each one.
=!  ||(jlong=;
  void UnsafeCopyMemoryMarkt )
      ;
    __ mv(t1, zr)    }
    __ slli(t0, count, exact_log2(size     (s_oop) {
    _ (loop;
    __ bgeu(t1, t0, end);

    __ add(temp, a, t1);
    if (size == (size_t)wordSizeverify_oop_array(, d,count t2);
      __ ld(temp, Address      
      __ verify_oop(temp);
    } else 
      __ lwu(temp, Address(    _ leave()java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
      __ decode_heap_oop(temp); // calls verify_oop
    }
    __ addjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    __ j(loop)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    __ bind(end);
  }

  // Arguments:
  /   aligned -true= Input  output alignedon a HeapWord == 8-byte boundary
  //             ignored
  //   is_oop  - true => oop array, so generate store check code
  //   name    - stub name string
  //
  // Inputs:
  //   c_rarg0   - source array address
  //   c_rarg1   - destination array address
  //   c_rarg2   - element count, treated as ssize_t, can be zero
  //
  // If 'from' and/or 'to' are aligned on 4-byte boundaries, we let
  // the hardware handle it.  The two dwords within qwords that span
  // cache line boundaries will still be loaded and stored atomically.
  //
  // Side Effects:
  //   disjoint_int_copy_entry is set to the no-overlap entry point
  //   used by generate_conjoint_int_oop_copy().
  //
  address generate_disjoint_copy(size_t size  / dwords  qwords that  cache line boundarieswillstill be loaded
                                 const char* name, bool dest_uninitialized = false) {
    const Register s = c_rarg0, d = c_rarg1, count = c_rarg2;
    RegSet saved_reg = RegSet::of(s, d, count);
    __ java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 4
     java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 31
    address start = __ pc();
    __ enter

    if (entry/
      *entry = __ pc(  
      // caller can pass a 64-bit byte count here (from Unsafe.copyMemory)
      BLOCK_COMMENT("Entry:");
    }

    DecoratorSet decorators = IN_HEAP  //   c_rarg0   - source array address
    if (dest_uninitialized)  asjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 65
      decorators |= IS_DEST_UNINITIALIZED
  }
    if (aligned) {
      decorators |= ARRAYCOPY_ALIGNED//
    }

    BarrierSetAssembler *bs = BarrierSet::barrier_set                                      address entry,const* name {
    bs->arraycopy_prologue(_masm, decorators    const bool not_oop= false;

    if (is_oop) {
      // save regs before copy_memory
      __ push_reg(RegSet::of(d, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    }

    {
      // UnsafeCopyMemory page error: continue after ucm
      bool add_entry 
      UnsafeCopyMemoryMark ucmm(this, add_entry, true);
      copy_memory(aligned, s, d, count, t0, size);
    }

    if (is_oop) {
      __ pop_reg(RegSet:of(d, count), sp);
      if (VerifyOops) {
        verify_oop_array(size, d, count, t2);
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    }

     //

    __ leave(      isset  theno- entry 
    __ mv(x10, zr); // return 0
    __ ret();
    return start;
  

  // Arguments:
  //   aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
  //             ignored
  //   is_oop  - true => oop array, so generate store check code
  //   name    - stub name string
  //
  // Inputs:
  //   c_rarg0   - source array address
  //   c_rarg1   - destination array address
  //   c_rarg2   - element count, treated as ssize_t, can be zero
  //
  // If 'from' and/or 'to' are aligned on 4-byte boundaries, we let
  // the hardware handle it.  The two dwords within qwords that spanjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
  // cache line boundaries will still be loaded and stored atomically.
 //
  address generate_conjoint_copyaddress*,  ) 
                                 address* entry, const char* name,
                                 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    const   //         ignored
    RegSet saved_regs = RegSet::of(s, d, count);
    StubCodeMark mark(this
  )
    __ enter();

    if (entry  
      *entry = __ pc();
      // caller can pass a 64-bit byte count here (from Unsafe.copyMemory)/
      java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 18
    }

    // use fwd copy when (d-s) above_equal (count*size)
    _ (0 ,s;
    __ slli(t1, count, exact_log2 char name  dest_uninitialized =){
    __ bgeu(t0, t1, nooverlap_target);

N_HEAP |IS_ARRAY
    if (dest_uninitialized) {
       | ;
    }
    if (aligned) {
      decorators |= ARRAYCOPY_ALIGNED
    }

    BarrierSetAssembler  
    bs->arraycopy_prologue(_masm, decorators, is_oop, s, d, java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 4

    if (is_oop) {
      // save regs before copy_memory
      __ push_reg(RegSet  /   c_rarg2-element ,treatedasssize_t can zero
    }

    {
      // UnsafeCopyMemory page error: continue after ucm
      bool add_entry = !is_oop && (!aligned || sizeof(jlong) == java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 4
address entry,*name
      copy_memory(aligned, s, d, count,                                      bool false{
}

    if (is_oopjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      __ pop_reg(RegSet::of
      if (VerifyOops) {
verify_oop_array
      }
    }
    bs>_masm,is_oop d count t0 ();
    __ leave();
    __ mv(x10, zr); // return 0
    __ ret  / Inputs:
    return start;
  }

  // Arguments:
  //   aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
  //             ignored
  //   name    - stub name string
  //
  // Inputs:
  
  //   c_rarg1   - destination array address
  //   c_rarg2   - element count, treated as ssize_t, can be zerosizeof),entryjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
  //
  // If 'from' and/or 'to' are aligned on 4-, 2-, or 1-byte boundaries,
  // we let the hardware handle it.  The one to eight bytes within words,
  // dwords or qwords that span cache line boundaries will still be loaded
  // and stored atomically.
  //
  // Side Effects:
  //   disjoint_byte_copy_entry is set to the no-overlap entry point  //
 on 4, 2-, or1-byte,
  /we  the  itTheto eightbytes within java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
/ orqwordsthatspan boundarieswill  be
  // and stored atomically.
  //
  // Side Effects:
  //   disjoint_byte_copy_entry is set to the no-overlap entry point
  //   used by generate_conjoint_byte_copy().
  //
  address generate_disjoint_byte_copy
    const bool not_oop = false;
    return generate_disjoint_copy(sizeof (jbyte), aligned, java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 24
  }

  // Arguments:
  //   aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
  //             ignored
  //   name    - stub name string
  //
  // Inputs:
  //   c_rarg0   - source array address
  //   c_rarg1   - destination array address
  //   c_rarg2   - element count, treated as ssize_t, can be zero
  //
  // If 'from' and/or 'to' are aligned on 4-, 2-, or 1-byte boundaries, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

/
  // and stored atomically.
  //
  address generate_conjoint_byte_copy(  
                                      address* entry, const char* name) {
    const bool java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 12
    return generate_conjoint_copy(  //   c_rarg2   - element count, treated
  }

  // Arguments:
 8-byte java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
  //             ignored
 //   name    - stub name string
  //
  // Inputs:
  //   c_rarg0   - source array address
  //   c_rarg1   - destination array address
 
  //
  // If 'from' and/or 'to' are aligned on 4- or 2-byte boundaries, we
   let the hardware handle it.  The two or four words within dwords
  // or qwords that span cache line boundaries will still be loaded
 // and stored atomically.
  //
  // Side Effects:
  //   disjoint_short_copy_entry is set to the no-overlap entry point
  //   used by generate_conjoint_short_copy().
  //
  addressgenerate_disjoint_short_copy(bool
                                       address*                            Registersuper_check_offset
    const bool not_oop = false;
    return generate_disjoint_copy(sizeof (jshort), alignedassert_different_registers(sub_klass, super_check_offset, super_klass);
  }

  // Arguments:
  //   aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
  //             ignored
  //   name    - stub name string
  //
      __ check_klass_subtype_slow_path(sub_klass, super_klass, noreg, noreg, &L_success, NULL);
  //   c_rarg0   - source array address
  //   c_rarg1   - destination array address
  //   c_rarg2   - element count, treated as ssize_t, can be zero
  //
  // If 'from' and/or 'to' are aligned on 4- or 2-byte boundaries, we
  // let the hardware handle it.  The two or four words within dwords
  // or qwords that span cache line boundaries will still be loaded
  // and stored atomically.
  ////    c_rarg0   - source array address
  address generate_conjoint_short_copy(bool aligned, address java.lang.StringIndexOutOfBoundsException: Range [0, 77) out of bounds for length 66
                                       address* entry, const char* name) {
    const bool not_oop = false;
    return generate_conjoint_copy(sizeof  
  }

  // Arguments:
  //   aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
  //             ignored
  //   name    - stub name string
  //
  // Inputs:
  
  //   c_rarg1   - destination array address
  //   c_rarg2   - element count, treated as ssize_t, can be zero
  //
  // If 'from' and/or 'to' are aligned on 4-byte boundaries, we let
  // the hardware handle it.  The two dwords within qwords that span
  // cache line boundaries will still be loaded and stored atomically.
  //
  // Side Effects:
  //   disjoint_int_copy_entry is set to the no-overlap entry point
  //   used by generate_conjoint_int_oop_copy().
  //
  address generate_disjoint_int_copyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                     const char     Register   = ;// orig elementscount
    const bool not_oop = false;
        const  copied_oop  =x7        java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  }

  // Arguments:
  //   aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
  //             ignored
  //   name    - stub name string
  //
  // Inputs:
  //   c_rarg0   - source array address
  //   c_rarg1   - destination array address
  java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
  //
  // If 'from' and/or 'to' are aligned on 4-byte boundaries, we let
  // the hardware handle it.  The two dwords within qwords that span
  // cache line boundaries will still be loaded and stored atomically.
  S markthis StubRoutines", name)
  address(booljava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 76
                                     address* entry    _enter( / for proper  RuntimeStub
                                     bool dest_uninitialized = false) {
    const bool not_oop = false;
    return generate_conjoint_copy(sizeof (jint),     }
  }


  // Arguments:
  //   aligned - true => Input and output aligned on a HeapWord boundary == 8 bytesR:ofx7,x9,x18 ) )
  //             ignored
  //   name    - stub name string
  //
  // Inputs:
  //   c_rarg0   - source array address
  java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  //   c_rarg2   - element count, treated as size_t, can be zero
  //
/
  //   disjoint_oop_copy_entry or disjoint_long_copy_entry is set to the
  //   no-overlap entry point used by generate_conjoint_long_oop_copy()._("inconsistent)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  //
  address generate_disjoint_long_copy(bool aligned
                                      const char*     DecoratorSet decorators = IN_HEAP | IS_ARRAY | ARR;
    const bool    if(dest_uninitialized){
    return generate_disjoint_copy(sizeof (jlong), aligneddecorators= ;
  }

  // Arguments:
  //   aligned - true => Input and output aligned on a HeapWord boundary == 8 bytes
  //             ignored
  //   name    - stub name string
  //
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  //   c_rarg1   - destination array address
  //   c_rarg2   - element count, treated as size_t, can be zero
  //
  address generate_conjoint_long_copy(bool alignedjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
                                      address nooverlap_target    _alignOptoLoopAlignment;
                                      const char*    __BIND(L_store_element;
     boolnot_oop ;
    return generate_conjoint_copy_add(   ?  )
  }

  // Arguments:
/java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
  //             ignored
  //   name    - stub name string
  /
  // Inputs:
  //   c_rarg0   - source array address
  //   c_rarg1   - destination array address
  //   c_rarg2   - element count, treated as size_t, can be zero
  //
  // Side Effects:
disjoint_oop_copy_entry or isset  
   used by generate_conjoint_long_oop_copy().
  //
  address generate_disjoint_oop_copy(bool aligned    / It was a real error; we must depend on the caller to finish the job.
                                     const char* name, bool dest_uninitialized) {
    constbool =;
    const size_t__(countcount,-)                    report1Kto
    return generate_disjoint_copy(size, aligned, is_oop, entry, name, dest_uninitialized
  }

  // Arguments:
  //   aligned - true => Input and output aligned on a HeapWord boundary == 8 bytes
  //             ignored
/    
  //
  // Inputs:
  //   c_rarg0   - source array address
rarg1  -destinationarray 
  //   c_rarg2   - element count, treated as size_t, can be zero)
  //
  address generate_conjoint_oop_copy(bool aligned,
                                     
                                     const/
    const bool is_oop = true;
    const size_t size = UseCompressedOops ? sizeof (jint) : sizeof (jlongvoidarraycopy_range_checks(Register,     
    return generate_conjoint_copy(size, aligned, is_oop, nooverlap_target, entry,
                                  name, dest_uninitialized);
  }

  // Helper for generating a dynamic type check.
  // Smashes t0, t1.
  void generate_type_check(sub_klassjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
                           java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
                           Register super_klass,
                           ){
    assert_different_registers(sub_klass, super_check_offset, super_klass);

    BLOCK_COMMENT("type_check:");

    Label L_miss;

    __ check_klass_subtype_fast_path(sub_klass, super_klass, noreg,    __ addw(temp, length, src_pos);
   __check_klass_subtype_slow_path(sub_klass, super_klass, noreg, noreg, &L_success, NULL);

    // Fall through on failure!
    __ BIND(L_miss);
  }

  //
  //  Generate checkcasting array copy stub
  //
  //  Input:
_java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  //    c_rarg2   - element count, treated as ssize_t, can be zero
  //    c_rarg3   - size_t ckoff (super_check_offset)
  //    c_rarg4   - oop ckval (super_klass)
  //
  //  Output:
  //    x10 ==  0  -  success
  //    x10 == -1^K - failure, where K is partial transfer count
  //
  address generate_checkcast_copy(const char* name, address* entry  /    java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 45
                                  bool  
 ,java.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 79

    // Input registers (after setup_arg_regs)
    const Register fromaddress java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    const Register to          = c_rarg1;   // destination array address
    const Register count= c_rarg2 //elementscount
    const                 !  &long_copy_entry NULL);
    const Register ckval       = c_rarg4;   // super_klass

d_regs=::ange(,c_rarg4;
    RegSet wb_post_saved_regs

    // Registers used as temps (x7, x9, x18 are save-on-entry)
    const Registercount_save  =x19;      
    const Register start_to    =    address   _ pc(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    const Register copied_oop  = x7;        // actual oop copied
    const Register r9_klass    = x9;        // oop._klass

    //---------------------------------------------------------------
    // Assembler stub will be used for this call to arraycopy
    // if the two arrays are subtypes of Object[] but the
 notequal   asupertype
    // of the source type.  Each element must be separately
    // checked.

    assert_different_registers _beqzt,);
        copied_oop,, count_save

   _ CodeEntryAlignment)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    StubCodeMark mark(this"StubRoutines, name);
    address start = __ pc();

    __ enter(); // required for proper stackwalking of RuntimeStub frame

    // Caller of this entry point must set up the argument registers.
    if (entry != NULL) {
      *entry = __ pc();
      BLOCK_COMMENT(E:")
    }

    // Empty array:  Nothing to do
    i)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

    __ push_reg(__ j(RuntimeAddresslong_copy_entry))java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

#ifdef ASSERT
    BLOCK_COMMENT(//
    // The ckoff and ckval must be mutually consistent,
    // even though caller generates both.
    { Label L;
      int sco_offset = in_bytes//    c_rarg1    -  src_pos (32-bits)
      __ lwu(start_to,   //    c_rarg3    -  dst_pos
  /    c_rarg4    element count(32bits)
      __ stop("super_check_offsetjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
      __ bind(L);
    }
#java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15

    DecoratorSet decorators = address int_copy_entry,address ,
    bool is_oop = trueaddresslong_copy_entry,address checkcast_copy_entry {
    if (dest_uninitialized) {
      decorators |   assert_condbyte_copy_entry= NULL  !  &
    }

    BarrierSetAssembler *bs = java.lang.StringIndexOutOfBoundsException: Range [16, 1) out of bounds for length 73
    (_asm , ,, count,java.lang.StringIndexOutOfBoundsException: Range [89, 88) out of bounds for length 90


    _src/

     from toaddresses
_ (tart_to )              Save  array startaddress
    __ j    const dst_pos= c_rarg3;  // destination position

    // ======== begin loop ========
    // (Loop is rotated; its entry is L_load_element.)
    // Loop control:_CodeEntryAlignment
    //   for count to 0 do
    //     copied_oop = load_heap_oop(from++)
    //     ... generate_type_check ...
    //     store_heap_oop(to++, copied_oop)
    //   end

    __ align(OptoLoopAlignment);

    __ BIND(L_store_element);
    __ store_heap_oop(Address(to, 0)    java.lang.StringIndexOutOfBoundsException: Range [35, 32) out of bounds for length 59
    __ add(to, to, UseCompressedOops  /java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
    __ sub(count,     // (2) src_pos must not be negative.
    __ beqz(count, L_do_card_marks);

    
    __ BIND(L_load_element);
__ oad_heap_oop(,Addressf,0), , noregAS_RAW; 
    __ add// (7) src_pos + length must not exceed length of src.
    __ beqz(copied_oop, L_store_element);

    __ load_klass(r9_klass, copied_oop);// query the object klass    / if [src == NULL] then return -1
    java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
    // ======== end loop ========

    // It was a real error; we must depend on the caller to finish the job.andi(t0,src_pos,1L<<31;
 = remainingoops  =totaloops.
    // Emit GC store barriers for the oops we have copied and report
    // their number to the caller.

    __ sub(count, count_save, count);     // K = partially copied oop count
    __xori(count, count, -1);                   // report (-1^K) to caller
        

    __ BIND(L_do_card_marks(,java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    bs->rraycopy_epilogue(_asmdecorators, is_oop start_to count_save, t0, wb_post_saved_regs);

   _bind(;
    __ pop_reg(RegSet::of(x7, x9, x18, x19), sp);
    inc_counter_np(SharedRuntime::_checkcast_array_copy_ctr);

    __ java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    __ mv(x10, count);
    __ leave();
    __ ret();

    return start;
  }

  // Perform range checks on the proposed arraycopy.
  // Kills temp, but nothing else.
  // Also, clean the sign bits of src_pos and dst_pos.
  void _ bnez(scratch_src_klass
                              Register src_pos, // source position (c_rarg1)bind)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
                              Register dst,     // destination array oo (c_rarg2)
                              
                              Register length,
                              Register temp,
                              Label& L_failed) {
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 6

    assert_different_registers(t0, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    // if [src_pos + length > arrayOop(src)->length()] then FAIL
    __ lwu(t0, Address    / Handle objArrays completely differently...
    _ templength,src_pos
    __ bgtu(temp  java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53

    // if [dst_pos + length > arrayOop(dst)->length()] then FAIL
    __ lwu(t0, Address(dst, java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 27
    __ addw(temp, length, dst_posjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    __ bgtu(temp, t0, L_failed);

/java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
     )java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    __ zero_extend(dst_pos, dst_pos, 32);

    BLOCK_COMMENT("arraycopy_range_checks done");
  }

  //
  //  Generate 'unsafe' array copy stub
  //  Though just as safe as the other stubs, it takes an unscaled
  //  size_t argument instead of an element count. 
  //
  //  Input:endif
  //    c_rarg0   - source array address
  //    c_rarg1   - destination array address
  //    c_rarg2   - byte count, treated as ssize_t, can be zerot1 java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 41
  //
  // Examines the alignment of the operands and dispatches
  // to a long, int, short, or byte copy loop.
  //
  address generate_unsafe_copy(const char* name,
                               address byte_copy_entry,
                                
                               address int_copy_entry,
                                java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 57
    assert_cond(byte_copy_entry != NULL && short_copy_entry_              
entry != NULL)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
    Label L_long_aligned,    
    const Register     Register      = = c_rarg0  // source array address

    __ align(CodeEntryAlignment);
    StubCodeMark mark(this, "StubRoutines", name);
    address start = __ pc();
    __ enter(); // required for proper stackwalking of RuntimeStub frame

    // bump this on entry, not on exit:
    inc_counter_np(    // The possible values of..exact_log2

    __ orr   BIND();
    __    _ andi((,x22_elsize 2)

    __ andi(t0, t0, BytesPerLong - 1);
    __ beqz(t0, L_long_aligned andi(,x22_elsize, , 1)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    _t0 t0  - 1;
    __ beqz(    _add(,java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 41
    __ andi(t0, t0, 1);
    _ beqzt0, L_short_aligned;
    __ j(RuntimeAddress(byte_copy_entry));

_(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
_(,java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 68
_jshort_copy_entry);
    __ BIND(L_int_aligned);
_()    java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
    __ j(RuntimeAddress(int_copy_entry));
    __ BIND(L_long_aligned);
(count count,);   // size => long_count
    __     RuntimeAddress));

      _ BIND();
  }

  //
  //  Generate generic array copy stubs
  //
  //  Input:
  //    c_rarg0    -  src oop
  //    c_rarg1    -  src_pos (32-bits)
  //    c_rarg2    -  dst oop
os32-)
  //    c_rarg4    -  element count (32-bits)
  //
  //  Output:
  //    x10 ==  0  -  success
  //    x10 == -1^K - failure, where K is partial transfer count stop(must   ,  is );
//
  address generate_generic_copy(const char* name,
                                address byte_copy_entry, address short_copy_entry,
                                address int_copy_entry, address oop_copy_entry                                
java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
    assert_cond(byte_copy_entry != NULL && short_copy_entry != NULL &&
                 !=NULL& oop_copy_entry! NULLjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
long_copy_entry= ULL&& checkcast_copy_entry !NULL;
    Label L_failed, L_failed_0, L_objArray;
    Label L_copy_bytes, L_copy_shorts, L_copy_ints, L_copy_longs;

    // Input registers
    const Register src        = c_rarg0;  // source array oop
    const Register src_pos    = c_rarg1;  // source position
    const Register dst        = c_rarg2;  // destination array oop
    const Register dst_pos    = c_rarg3;  // destination position
    java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 0

    // Registers used as temps
     dst_klass=c_rarg5;

    _align(CodeEntryAlignment)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

    StubCodeMark// Identically typed arrays can be copied without element-wise checks.

address java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 28

    __ enter(); // required for proper stackwalking of RuntimeStub frame

    // bump this on entry, not on exit:
    SharedRuntime_eneric_array_copy_ctr

    //-----------------------------------------------------------------------_( ,:base_offset_in_bytesT_OBJECT
/
    // if the following conditions are met:
    //
    // (1) src and dst must not be null.
    // (2) src_pos must not be negative.
    // (3) dst_pos must not be negative.
    // (4) length  must not be negative.
    // (5) src klass and dst klass should be the same and not NULL.
    // (6) src and dst should be arrays.
rc_pos + length must not exceed length of src.
    // (8) dst_pos + length must not exceed length of dst.java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 31
/

    // if [src == NULL] then return -1
    __ beqz(src, L_failed);

    // if [src_pos < 0] then return -1
    // i.e. sign bit set
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    __ bnez(t0 _shadd( ,,t0,)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59

    / if [dst == NULL] then return -1
    __ beqz(dst, L_failed);

// if [dst_pos < 0] then return -1
   
    __ andi(t0, dst_pos      (from to,count sco_tempjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
    __ bnez(t0, L_failed);

    registers as temp
    const Register       __ lwu(sco_temp, Address );
    const Register scratch_src_klass
     Register                  ;// layout helper

    // if [length < 0] then return -1
    __ addw(scratch_length,       // Fetch destination elementfrom theObjArrayKlassheader
    // i.e. sign bit set
    __ andi(t0, scratch_length, 1UL << 31);
    __ bnez(t0, L_failed);

    __ load_klass(scratch_src_klass, src);
#ifdef ASSERT
    {
     ("ssertklasses not {;
      Label L1, L2;
      __ bnez(scratch_src_klass, L2);   // it is broken if klass is NULL
      __ bind(L1);
      __ stop("broken null klass");
      __ bind(L2);
      __ load_klass(t0, dst, t1);
      __ beqz(t0, L1);     // this would be broken also
      BLOCK_COMMENT("} assert    )
    }
#ndif

      /
    //
    //  |array_tag|     | header_size | element_type |     |log2_element_size|
    // 32        30    24            16              8     2                 0
    //
    //   array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0
    //

    const    java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 50

   // Handle objArrays completely differently...
    const jint objArray_lh = Klass::    const Register to        = c_rarg0
    __ lw(lh, Address(scratch_src_klass, lh_offset));
    _ mvwt0,objArray_lh);
    __ beq

    // if [src->klass() != dst->klass()] then return -1
    __ load_klass(t1, dst);
    __ bne(t1, scratch_src_klass, L_failed);

    // if [src->is_Array() != NULL] then return -1
    // i.e. (lh >= 0)
    __ andi(t0, lh, 1UL << 31);
    __ beqz(t0, L_failed);

   / At this point, it is known to be a typeArray (array_tag 0x3).
#ifdef ASSERT
    {
      BLOCK_COMMENT("assert primitive array {");
      Label L;
      __ mvw(t1, Klass::_lh_array_tag_type_value << Klass::_lh_array_tag_shift);
      __ bge(lh, t1, L);
      __ stop("must be a primitive array");
      __ bind(L);
K_COMMENT} assert array done")
    }
#endif

    arraycopy_range_checks(src, src_pos, dst, dst_pos, scratch_length// 8 bit -> 16 bit
                           t1, L_failed);

/java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    //
    // src_addr = (src + array_header_in_bytes()) + (src_pos << log2elemsize)
    // dst_addr = (dst + array_header_in_bytes()) + (dst_pos << log2elemsize)
    //

   const Register t0_offset ;    // array offset
    const Register x22_elsize = lh;   // element size

    // Get array_header_in_bytes()
    int lh_header_size_width =         __ mv(tmp_reg, 8 >> shift); / arrays(  java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 79
    int java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 14
    __ slli(t0_offset, lh,          =1
    __ srli(t0_offset, t0_offset, XLEN - java.lang.StringIndexOutOfBoundsException: Range [0, 61) out of bounds for length 27

    _         mvtmp_reg)
       
    BLOCK_COMMENT("choose copy loop based on java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 38

    // next registers should be set before the jump to corresponding stub
    const Register from     = c_rarg0;  // source array address
    const Register to       = c_rarg1;  // destination array address
    const Register count    = java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0

    // 'from', 'to', 'count' registers should be set in such order
    // since they are the same as 'src', 'src_pos', 'dst'.

    assert(Klass::_lh_log2_element_size_shift == 0, 

    // The possible values of elsize are 0-3, i.e. exact_log2(element
        if (!aligned) {
  __ BIND(L_copy_bytes);
    __ andi(t0, x22_elsize, 2);
    __ bnez(t0, L_copy_ints);
    _andi(,x22_elsize 1)
    __           _beqzt0,)
    __ add(from, src, src_pos); // src_addr
    ( ,dst_pos) 
    __ addw(count_bind;
    __ j(RuntimeAddress(byte_copy_entry          

  __ BIND(L_copy_shorts);
    shadd(romjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 52
    __           (value )
    __ addw(count, scratch_length,           __ addiw(count, count, -(2
    __ j(RuntimeAddress(java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 24

  __ BIND(L_copy_ints);
    __ andi(t0, x22_elsize, 1);
    _(, java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 30
          _,count >)
    __ shadd(to, dst_pos, )
    __ addw(count, scratch_length, zrdefault java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 38
    _java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  _    
#ifdef ASSERT
    {
      BLOCK_COMMENT("assert    /32 -  java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
      Label L;
      __ andi(lh, lh, Klass::_java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 34
      __ addw(lh,__slli(   -)
      __ mvw(t0, LogBytesPerLong);
      __ _  ,)
      __ stop("must be long copy, but elsize is java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      __ bind(L);
      BLOCK_COMMENT("} assert long copy done")_beqz, ;
    }
#endif
    __        (to, -/
    __ shadd(to, dst_pos_(;
    __ addwjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
_ java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 42

    // ObjArrayKlass
  __ BIND(__ andi ,)
    // live at this point:  scratch_src_klass, scratch_length, src[_pos], dst[_pos]

    Label L_plain_copy, L_checkcast_copy;
    // test array classes for subtyping
    __ load_klass(t2, dst);
    __ bne(scratch_src_klass, t2, L_checkcast_copy); // usual case is exact equality

 arrays can  copied withoutelement-wisechecks.
    arraycopy_range_checks(src, src_pos, dst, dst_pos, scratch_length_ ,Addressto );
                           t1, L_failed);

    __ shadd(from, src_pos, src, t0, java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 30
    __ add(from, from,         __ addi(to, to, 2
    __ shadd(to, dst_pos, dst, t0, java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 30
    __ add(to, to        _java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 37
    __ addw(      java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 17
  __ BIND(L_plain_copy);
    __ j(RuntimeAddress(oop_copy_entry));

  __BIND();
    // live at this point:  scratch_src_klass, scratch_length, t2 (dst_klass)
     bindjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 21
      // Before looking at dst.length, make sure dst is also an objArray.
      __ lwu(t0, Address
      __ mvw( voidgenerate_arraycopy_stubs 
      _ bne,t1,L_failed;

      // It is safe to examine both src.length and dst.length.
      arraycopy_range_checks(src, src_pos, dst, dst_pos, scratch_length,
                             t2, L_failed);

      __ load_klass(dst_klass, dst); // reload

      // Marshal the base address arguments now, freeing registers.
      __ shadd(from, src_pos, src, t0, LogBytesPerHeapOop);
      _add, ,arrayOopDesc:base_offset_in_bytes(T_OBJECT);
      __ shadd(to, dst_pos, 
      __ add(generate_copy_longsjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 70
     _addwc,lengthzr;           
      const Register sco_temp = c_rarg3;      // this register is free now
      assert_different_registers(from, to, count, sco_temp,
                                 dst_klass, scratch_src_klass);

      // Generate the type check.
      const int sco_offset = in_bytes(Klass::super_check_offset_offset());
      __ lwu(sco_temp, Address(dst_klass, sco_offset));

      // Smashes t0, t1
      generate_type_check(scratch_src_klass, sco_temp,                                                                                   java.lang.StringIndexOutOfBoundsException: Range [106, 105) out of bounds for length 106

      // Fetch destination element klass from the ObjArrayKlass header.
      int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset( StubRoutines:arrayof_jbyte_disjoint_arraycopy  = generate_disjoint_byte_copytrue entryjava.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
      __ ld(dst_klass, Address(dst_klass, ek_offset));
      __ lwu(sco_temp, Address(dst_klass,     :_rrayof_jbyte_arraycopy=generate_conjoint_byte_copy(true, entry, NULL,

                                                                                   ";
      assert(c_rarg3 == sco_temp, "#3 already in place");
      // Set up arguments for checkcast_copy_entry.
      __ mv(c_rarg4, dst_klass);  // dst.klass.element_klass
      __ j(RuntimeAddress(checkcast_copy_entry));
    }

  __ BIND(L_failed);
    __ mv(x10, -1);
_ )   // required for proper stackwalking of RuntimeStub frame
    __ ret(;

    return start;
  }

  //
  // Generate stub for array fill. If "aligned" is true, the
  // "to" address is assumed to be heapword aligned.
  //
  // Arguments for generated stub:
  //   to:    c_rarg0
  //   value: c_rarg1
  //   count: c_rarg2 treated as signed
  //
  address generate_fill(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 23
    __ align(                                                                                  java.lang.StringIndexOutOfBoundsException: Index 117 out of bounds for length 117
    StubCodeMark"arrayof_jint_arraycopy")
    address start = __ pc();

    BLOCK_COMMENT(Entry"java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

/ sourcearray address
    const Register value"jint_disjoint_arraycopy");
    const Register count     = c_rarg2;  // elements count

    const Register bz_base   = x28;      // base for block_zero routine
const cnt_words=x29;      // temp register
    const Register tmp_reg   = t1;

    __ enter();

 ;

    int shift = -1;
    switch
      case T_BYTE:
        shift"arrayof_jlong_arraycopy)java.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110

        jlong_arraycopyStubRoutines_;
        // 8 bit -> 16 bit
        __ andi(value, value, 0xff);
        __ (mp_regvalue)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
        __ slli(tmp_reg, tmp_reg, 8);
        __ orr(value, value, tmp_reg);

        // 16 bit -> 32 bit
        __ mv(tmp_reg, value);
        __ slli(tmp_reg, tmp_reg, 16);
        __ orr(value, value, tmp_reg);

        ,8  
        __ _
        break;
      case T_SHORT:
        shift = 1;
        // Zero extend value
        // 16 bit -> 32 bit
        __ andi(value, value, 0xffff);
        __ mv(
        __ slli    StubRoutines:_oop_disjoint_arraycopy            = StubRoutines::_arrayof_oop_disjoint_arraycopy;
        __ orr(value, valueStubRoutines::_                      StubRoutines:;

/java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
        _mv(tmp_reg,8 >)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
        __ bltu(count, tmp_reg, L_fill_elements);
        break;
      case T_INT:
        shift = 2;

        // Short arrays (< 8 bytes) fill by element
        __ mv(tmp_reg, 8 >> shift);
        __ bltu(count, tmp_reg, java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0
        break;
      default ;
    }

    // Align source address at 8 bytes address boundary.
    Label L_skip_align1, L_skip_align2, L_skip_align4;
    if (!aligned) {
      switch (t) {
        case T_BYTE    (java.lang.StringIndexOutOfBoundsException: Range [83, 81) out of bounds for length 83
          // One byte misalignment happens only for byte arrays.
          __ andi(t0, to, 1);
          __ beqz(t0, L_skip_align1);
          __ sb(value, Address(to, 0));
          __ addi(to, to, 1);
          __ addiw(                        entry_jlong_arraycopy
          __ bind(L_skip_align1);
          // Fallthrough
        case T_SHORT:
          // Two bytes misalignment happens only for byte and short (char) arrays.
          __ (to, 2
          __ nes:_jshort_fill generate_fillT_SHORT , "short_fill)
_(,  );
          __ addi(to, to, 2);
          __count count -2> shift);
);
          // Fallthrough
         :
          // Align to 8 bytes, we know we are 4 byte aligned to start.
          __ andi(t0, to, 4);
          __ beqz(t0, L_skip_align4);
          _ (, Address,))
          __ addi(to, to, 4     Register = , str1=x11, =x12 str2=, tmp1 x28,  x29 tmp4 =x7 tmp5=x31
         _(count ,-4> ));
          __ bind(L_skip_align4);
          break;
        default: ShouldNotReachHere();
      }
    }

    //
    //  Fill large chunks
    //
    __ srliw(cnt_words, count, 3 - shift); // number of words

    // 32 bit -> 64 bit
    __ andi(value, __ bnez(tmp4, DIFF2
    __ mv(tmp_reg, value);
    __ slli(tmp_reg, tmp_reg, 32);
    __ orr(value, value, tmp_reg);

    __ slli(tmp_reg, cnt_words, 3void(, tmpU &
    __ subw(count, count, tmp_reg);
    {
      __ fill_words(to, cnt_words, value);
    }

    // Remaining count is less than 8 bytes. Fill it by a single store.
    // Note that the total length is no less than 8 bytes. (tmp ;
    if (t == T_BYTE || t = _tmp  t0)
      _beqz(count,L_exit1)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
      _ shadd, countto,tmp_reg );// points to the end
          _ addi(strU , 8);
      __ bind(L_exit1);
      __ leave();
      __ ret();
    }

    // Handle copies less than 8 bytes.
    Label
    __ bind(L_fill_elements);
    switch (t) {
      case T_BYTE:
        __ java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
        __ beqz(t0, L_fill_2);
        __ sb(value,     StubCodeMark mark(this, ? "  java.lang.StringIndexOutOfBoundsException: Range [141, 136) out of bounds for length 142
_to )
        __ bind(L_fill_2);
        _ andicount 2);
        __ beqz(t0, L_fill_4);
        __ sh(value, Address(to, 0));
        __ addi(to, to, 2);
        __ bind(L_fill_4);
        __ andi(t0, count, 4);
        __ beqz(t0, L_exit2);
        __ java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 0
        break
      case T_SHORT:
        __ andi(t0, count, 1);
__beqz(t0, L_fill_4;
        __ sh(value, Address(to, 0));
        addi(to,to 2)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
_ bindL_);
        __ andi(t0, count,_ sub  )// Alreadyloaded 4 symbols. Last 4 isspecial case.
        __ beqz(t0, L_exit2);
        __ sw(value, Address(to, 0));
        break;
      case T_INT:
        __ beqz(count, L_exit2);
        __ sw(value, Address(to, 0));
        break;
      default: ShouldNotReachHere();
    }
    bind()java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
_java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    __ ret();
    return start;
  }

  void generate_arraycopy_stubs() {
    address entry                     = NULL;
    address entry_jbyte_arraycopy     = NULL;
    address =NULL;
    address entry_jint_arraycopy      = NULL;
s entry_oop_arraycopy        NULL;
    address entry_jlong_arraycopy     = NULL;
    address entry_checkcast_arraycopy = NULL;

    generate_copy_longs(_(,trU, );// strU pointer to load from
    generate_copy_longs(copy_b, c_rarg0, c_rarg1, t1, copy_backwards);

    StubRoutines::riscv::_zero_blocks = generate_zero_blocks();

    //*** jbyte
    // Always need aligned and unaligned versions
    StubRoutines::_jbyte_disjoint_arraycopy          = java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 40
                                                                                   "jbyte_disjoint_arraycopy");
    StubRoutines::_jbyte_arraycopy                   =      _ ,)
                                                                                   
                                                                                   "java.lang.StringIndexOutOfBoundsException: Index 102 out of bounds for length 102
    :_  = (, &ntry,
                                                                                   
    :arrayof_jbyte_arraycopy=(true entryNULL
                                                                                   

    //*** jshort
    // Always need aligned and unaligned versions
    StubRoutines::_ _bind
                                                              
:java.lang.StringIndexOutOfBoundsException: Range [53, 35) out of bounds for length 97
                                                                                    &entry_jshort_arraycopy,
                                                                                    "jshort_arraycopy");
_beqz ;
                                                                                    "arrayof_jshort_disjoint_arraycopy");
    StubRoutines::_arrayof_jshort_arraycopy          = generate_conjoint_short_copy(true, entry,       // compute their difference.
                                                                                     )

    //*** jint
    // Aligned versions
    StubRoutines::_arrayof_jint_disjoint_arraycopy   = generate_disjoint_int_copy(true, &entry,
                                                                                 
    _)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
                                                                                  
    // In 64 bit we need both aligned and unaligned versions of jint arraycopy.
    // entry_jint_arraycopy always points to the unaligned version
    :jint_disjoint_arraycopy           =generate_disjoint_int_copyf, entry
                                                                                  "jint_disjoint_arraycopy");
    StubRoutines::_jint_arraycopy                    = java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 0
                                                                                  
                                                                                  

    //*** jlong
    // It is always aligned
    StubRoutines:_t,>)
                                                                                   ;
          __ membar LoadLoad;
                                                                                   
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    StubRoutines::_jlong_arraycopy                   =     _add(,spwordSize;

    //*** oops
    {
      // With compressed oops we need unaligned versions; notice that
copy.
      bool

      StubRoutines    _call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSetNMethod::nmethod_stub_entry_barrier), 1);
        = generate_disjoint_oop_copy
                                     _ reset_last_Java_frame);
      StubRoutines::_arrayof_oop_arraycopy
        = generate_conjoint_oop_copy(aligned, entry, &entry_oop_arraycopy, "arrayof_oop_arraycopy",
                                     /*dest_uninitialized*/false);
      // Aligned versions without pre-barriers
     ::
         java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
                                     /*dest_uninitialized*/true);
     java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 49
        generate_conjoint_oop_copy(,entry,NULL "arrayof_oop_arraycopy_uninit
                                     /*dest_uninitialized*/true);    _ld,Address(p, * ));
    }

    StubRoutines::_oop_disjoint_arraycopy            = StubRoutines_ mvsp ;
    StubRoutines::_oop_arraycopy                     = StubRoutines::_arrayof_oop_arraycopy;
::oop_disjoint_arraycopy_uninit      StubRoutines:_arrayof_oop_disjoint_arraycopy_uninit
      }

    StubRoutines:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    StubRoutines::_checkcast_arraycopy_uninit = generate_checkcast_copy("checkcast_arraycopy_uninitjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
                                                                        


    StubRoutines::_  
                                                              entry_jbyte_arraycopy,
                                                                  _(;
entry_jint_arraycopy
                                                              entry_jlong_arraycopy);

    StubRoutines::_generic_arraycopy   = generate_generic_copy("generic_arraycopy",
                                                               entry_jbyte_arraycopy,
                                                               entry_jshort_arraycopy,
                                                               entry_jint_arraycopy,
                                                               entry_oop_arraycopy,
                                                               ,
                                                               

    StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill");    
_=(SHORT,"short_fill;
    StubRoutines::_jint_fill = generate_fill(T_INT,      ( sp)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE,       compare_string_16_bytes_sameDIFF)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    StubRoutines::_arrayof_jshort_fill = java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 32
    StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill");
  }

   java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
   (&,  D){
    const Register result_xorrtmp4 tmp2)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    __ ld(tmp5,       _ ldtmp1,Address);
    __ addi(str1, str1, 8);
    __ xorr(tmp4, tmp1, tmp2);
    __ ld(cnt1, Address,_,,java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 39
    _(isLL){
    __ bnez( __addcnt2,cnt2 cnt2) // now in bytes
    __ ld(tmp1, Address(str1));
    __ addi(str1, str1, 8);
    __ xorr(tmp4, tmp5, cnt1);
    __ ld(tmp2, Address(str2));
    __ addi(str2, str2, 8);
    __ bnez(tmp4, DIFF2);
  }

  // code for comparing 8 characters of strings with Latin1 and Utf16 encoding
   ,java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 72
                              Label &_andi(tmp5, tmp5, 0xFF;
    const Register strU = x12, curU = x7, strL        {
    __ ld(tmpL, Address(strL));
   _ (trL ,8;
    __ ld(tmpU, Address(strU));
    __ addi(strU, strU
    _(esult  cnt1;
    __ mv(      __ j(L);
    __ xorr(tmp, curU, t0);
    __ bnez(tmp, DIFF2);

    __curU,Address));
    __ addi(strU, strU, 8);
_ (tmp,tmpL
    __ mv(t0, tmp);
    __ xorr(tmp, tmpU, t0);
    __ bnez(tmp, DIFF1);
  }

  // x10  = result
  // x11  = str1
  // x12  = cnt1
  // x13  = str2
  // x14  = cnt2
  // x28  = tmp1
sjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 33
  // x30  = tmp3
  address generate_compare_long_string_different_encoding(bool isLU) {
    __      LENGTH_DIFF
StubCodeMarkt"   "java.lang.StringIndexOutOfBoundsException: Range [91, 90) out of bounds for length 142
entry  ()
    Label SMALL_LOOP, TAIL     entry;
          DONE, CALCULATE_DIFFERENCE;
    const Register java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
                   ::java.lang.StringIndexOutOfBoundsException: Range [51, 48) out of bounds for length 101
spilled_regs:( )java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49

    // cnt2 == amount of characters left to compare
    // Check already loaded first 4 symbols
    __ inflate_lo32(tmp3, isLU ? tmp1 : tmp2);
    __ mv(isLU ? tmp1// x13 pattern
    __ addi(str1, str1, isLU ? wordSize / 2 : wordSize);
    __ addi(str2, str2, isLU ? wordSize : wordSize / 2
    __ sub(cnt2?(?"ndexof_linear_ll "
_(, ;

if){
      __ add(str1, str1, cnt2mark java.lang.StringIndexOutOfBoundsException: Range [44, 41) out of bounds for length 54
      __ shadd
    } else {
      __ shadd(str1, cnt2, intjava.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 46
      __ add(str2, str2, cnt2);
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    __ xorr(tmp3, tmp1, tmp2);
    __ mv(tmp5, tmp2);
    __ bnez(tmp3,     Register mask1 = x20, match_maskx21,   x22, =x23,mask2 x24,, =;

    Register strU = isLU ? str2 : str1,
             strL = isLU ? str1 : str2,
             tmpU = __ push_reg(spilled_regs);
             tmpL = isLU ? tmp1 : tmp5; // where to keep L for comparison

m
    __ slli(t0, cnt2, 1);
    __ sub(cnt1, strU, t0); // strU pointer to load from

   _ld(mp4, ();
   _ addicnt1, cnt1, 8)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    __beqz,LOAD_LAST) // no characters left except last load
    __ sub(cnt2, cnt2, 16);
    __ bltz(cnt2, TAIL);
    __ bind(SMALL_LOOP); // smaller loop
      __ sub(cnt2, cnt2, 16);
      compare_string_8_x_LU(tmpL, tmpU, DIFF1, DIFF2);
      compare_string_8_x_LU(tmpL, tmpU, DIFF1, DIFF2);
      _ bgez(cnt2,SMALL_LOOP);
      __ addi(t0, cnt2uint64_t=0;
_beqz, ;
    __ bind(TAIL); // 1..15 characters left until last load (last 4 characters)(, haystack_isL   mask0001;
      // Address of 8 bytes before last 4 characters in UTF-16 string
     _ shadd  cnt1,)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
      // Address of 16 bytes before last 4 characters in Latin1 string
      __ add(tmp2, tmp2, cnt2);
     _tmp4, (nt1 -);
      // last 16 characters before last load
      compare_string_8_x_LU(tmpL (java.lang.StringIndexOutOfBoundsException: Range [22, 18) out of bounds for length 37
      compare_string_8_x_LU(tmpL, tmpU, DIFF1, DIFF2);
      __ (java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 73
    _ bindjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      __ mv(tmpU, tmp4);
    __ bind(DIFF1);
      _ mv(tmpL)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
      __ j(CALCULATE_DIFFERENCE);
    __ bind(LOAD_LAST);
    / compare and set match_mask[i] with 0x80/0x8000 (Latin1/UTF16) if ch2[i] == first[i]
      // No need to load it again
      __ mv(tmpU, tmp4);
      __ ld(tmpL, Address(strL));
      __ inflate_lo32(tmp3, tmpL);
      __ mv(tmpL, tmp3);
      __ xorr(tmp3, tmpU, tmpL);
      __ beqz(tmp3, DONE);

      // Find the first different characters in the longwords and
      // compute their difference.
    _ ();
      __ ctzc_bit(tmp4,     __ add(haystack, haystackwordSize);
      __ srl(tmp1, tmp1, tmp4);
       tmp5)
      __ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      __ andi(tmp5, tmp5, 0xFFFF);
      __ sub(result, tmp1, tmp5);
    __ bind(DONE);
      _pop_regjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 35
      __ ret();
    return entry;
  }

  address generate_method_entry_barrier() {
_java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 33
    StubCodeMark mark(this, "java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 34

    Label deoptimize_label java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 39

    address start = __ pc();

    __ j(L_SMALL_PROCEED

    L;
      BarrierSetNMethod* bs_nm =  slli(haystack_len, haystack_len  ;
      Address thread_epoch_addr(xthread, in_bytes(bs_nm->thread_disarmed_offset()) + 4);
      __ la(t1, ExternalAddress(bs_asm->patching_epoch_addr()));
      __ lwu(t1, t1);
      __ sw(t1, thread_epoch_addr)_ (ch2first ;
_ membar_LoadLoad;
    }

    __ set_last_Java_frame(sp, fp    _ mvtrailing_zeros,-); // all bits set

    __ enter();
    __     _(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 90

_java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 33

    __ push_call_clobbered_registers();

_ ,;
    __ call_VM_leaf_addi(,  ? 7:)

    __ reset_last_Java_frame needle_len,ch2 L_SMALL_CMP_LOOP_LAST_CMP2;

    __ mv(t0, x10    _compute_indexhaystack,match_mask, , ,  haystack_isL;

    __ pop_call_clobbered_registers();

    __ bnez(t0, deoptimize_label);

    __ leave();
    _(;

    __ BIND(deoptimize_label);

_(t0, 0)
    __ ld(fp, Address add(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 46
    __ ld(ra, Address(sp, wordSize * 2));
    __ ld(t1,     _bind(L_SMALL_CMP_LOOP_NOMATCH);

    __ mv(sp, t0);
    __ jr(t1);

    return start;
  }

  // x10  = result
  // x11  = str1
  // x12  = cnt1
  // x13  = str2
  // x14  = cnt2
  // x28  = tmp1
  // x29  = tmp2
  // x30  = tmp3
  // x31  = tmp4
java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 65
    __ align(CodeEntryAlignment);
    StubCodeMark mark(this, "StubRoutines", isLL ?
                      "compare_long_string_same_encoding LL" : "compare_long_string_same_encoding UU");
    address entry = __ pc();
    Label SMALL_LOOP, CHECK_LAST, DIFF2, TAIL,
          LENGTH_DIFF, DIFF, LAST_CHECK_AND_LENGTH_DIFF;
    const Register result = x10, str1 = x11, cnt1 = x12, str2 = x13, cnt2 
                   tmp1 = x28, tmp2 = x29, tmp3 = x30, tmp4 = x7, tmp5 = x31;
    RegSet spilled_regs = RegSet::of(tmp4, tmp5);

    // cnt1/cnt2 contains amount of characters to compare. cnt1 can be re-used
    // update cnt2 counter with already loaded 8 bytes
   _sub,cnt2 (   2)
// update pointers, because of previous read
    __ add(str1, str1, wordSize);
    __ add(str2, str2, wordSize
    // less than 16 bytes left?    _mv,  )java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
    __ sub(cnt2, cnt2, isLL ? 16 : 8);
    __ push_reg(spilled_regs, sp);
    __ bltz(cnt2, TAIL);
    __ bind(SMALL_LOOP);
      compare_string_16_bytes_same(DIFF, DIFF2);
      __sub(, cnt2,? 16:8java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
      __ bgez    _addr,, 1;
_bind()java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
      __ addi(cnt2, cnt2, isLL ? 16 : 8);
, LAST_CHECK_AND_LENGTH_DIFF
      __ sub(cnt2_lbuneedle_lenAddressneedle_len) _lhu( ()
      __ blez(cnt2, CHECK_LAST);
      __ xorr(tmp4, tmp1, tmp2);
      __ bnez(tmp4, DIFF);
__ld,(str1)
      __ addi(str1, str1, 8)_srlitmp,*java.lang.StringIndexOutOfBoundsException: Range [56, 53) out of bounds for length 59
      __ ld(tmp2, Address(str2));
      __ addi(str2, str2, 8);
_sub(nt2, , , ?8:);
    __ bind(CHECK_LAST);
      if (!isLL) {
        __ add(cnt2, cnt2, cnt2); // now in bytes
      }
      __ xorr(tmp4, tmp1, tmp2     java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 67
      __ bnez(tmp4, DIFF);
      __ add(str1,_)
      ldtmp5,java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 33
      __ add(str2, str2, cnt2);
      __ ld(cnt1, Address(str2));
      __java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 32
      __    _compute_index, trailing_zeros,  result,,haystack_isL)
      // Find the first different characters in the longwords and
      // compute their difference.
    __ bind(DIFF2);
      __ ctzc_bit(tmp3, tmp4, isLL); // count zero from lsb to msb
      __ srl(tmp5, tmp5, tmp3);
      __ srl(cnt1, cnt1, tmp3);
      if (isLL) {
        __ andi(tmp5, tmp5, 0xFF);
        __ andi(cnt1, cnt1, 0xFF);
      } else// result by analyzed characters value, so, we can just reset lower bits
        _ (mp5 tmp5 0xFFFF;
        __ andi( / index   inside .So  inat
      }
      __ sub(result, tmp5, cnt1);
      __ j(LENGTH_DIFF);
_ bind(DIFF);
_ ) java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
      __ srl(tmp1, tmp1, tmp3);
);
      if _
        __ andi(tmp1, tmp1, 0xFF);
        __ andi(tmp2, tmp2, 0xFF);
      } else {
        __ andi(tmp1, tmp1, 0xFFFF);
        __ andi(tmp2, tmp2,_ java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
      }
      __ sub(result, tmp1, tmp2);
      __ j(LENGTH_DIFF);
    __ bind(LAST_CHECK_AND_LENGTH_DIFF);
      __ xorr(tmp4, tmp1, tmp2);
      __ bnez(tmp4, DIFF);
    __ bind(LENGTH_DIFF);
      __ pop_reg(spilled_regs, sp);
      __ ret();
 entry
  }

  void generate_compare_long_strings()  (java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    StubRoutines::riscv::_compare_long_string_LL = generate_compare_long_string_same_encoding(true) StubCodeMark(this StubRoutines,"ulAdd)
    StubRoutines::riscv::_compare_long_string_UU = generate_compare_long_string_same_encoding
    
    StubRoutines::     Registerout      ;
  }

  // x10 result
  // x11 src
  // x12 src count
  // x13 pattern
  // x14 pattern count
  address generate_string_indexof_linear(bool needle_isL, bool haystack_isL__ )java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  {
    const ret
           ? (haystack_isL ? ;
           : "indexof_linear_uu";
_ align(CodeEntryAlignment
    StubCodeMark mark(this*Argumentsjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
    address     Input:

    int needle_chr_size = needle_isL ? 1 : 2;
    int haystack_chr_size = haystack_isL ? 1       -java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    int needle_chr_shift = needle_isL ? 0 : 1;
    int haystack_chr_shift = haystack_isL ? 0 : 1;
    bool isL = needle_isL && haystack_isL;
    // parameters
    Register result = x10, haystack = x11, haystack_len = x12, needle = x13, needle_len = x14;
    // temporary registers
    Register mask1 = x20, match_mask = x21, first = x22, trailing_zeros = x23, mask2 = x24, tmp = x25;
/java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
     entry _ pc(;
    RegSet spilled_regs = RegSet::range(x20, x25) + RegSet::range(x28, x29);

    __ push_reg(spilled_regs  y java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

    Label L_LOOP, L_LOOP_PROCEEDjava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 31
          L_HAS_ZERO_LOOP, L_CMP_LOOP, L_CMP_LOOP_NOMATCH, L_SMALL_PROCEED,
          ,  ,
          L_POST_LOOP, L_CMP_LOOP_LAST_CMP, L_HAS_ZERO_LOOP_NOMATCH,
LAST_CMP,L_SMALL_CMP_LOOP_LAST_CMP2
              const   =x28java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

    _ java.lang.StringIndexOutOfBoundsException: Range [23, 18) out of bounds for length 31
    _ld,Address()
    // src.length - pattern.length
    __ sub(haystack_len, haystack_len, needle_len);

    // first is needle[0]
    __ andi(first, ch1,     __ multiply_to_len(x, xlen y, ylen z zlen, tmp1,tmp2 tmp3,tmp4, tmp5, tmp6, tmp7);
    uint64_t mask0101 = UCONST64(0x0101010101010101);
    uint64_t mask0001 = UCONST64(0x0001000100010001);
(mask1haystack_isL ?:mask0001;
    __ mul(first, first, mask1);
    uint64_t    return 
    uint64_t mask7fff
    __ mv(mask2, haystack_isL ? mask7f7f : mask7fff);
    if (needle_isL != haystack_isL) {
      __mvt,;
    }
    __ sub(haystack_len, haystack_len, wordSize address   _ ()
    __ blez(haystack_len, L_SMALL);

    if xlen;
      __ inflate_lo32(ch1,           
    }
    // xorr, sub, orr, notr, andr
    // compare and set match_mask[i] with 0x80/0x8000 (Latin1/UTF16) if ch2[i] == first[i]
    // eg:
    // first:        aa aa aa aa aa aa aa aa
    // ch2:          aa aa li nx jd ka aa aa
    // match_mask:   80 80 00 00 00 00 80 80
_, ,java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 64

:
    __ bnez(match_mask, L_HAS_ZERO);
        java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 22
    __ add(result, result, wordSize / haystack_chr_size);
    __ add(haystack, haystack, wordSize);
    __ bltz(haystack_len, L_POST_LOOP);

    __ bind(L_LOOP);
    __ ld(ch2, Address(haystack));
    __java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    __ bnez(match_mask, L_HAS_ZERO

    __ bind(L_LOOP_PROCEED);
    _subh ,wordSize /;
    __ add(haystack //java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    __ add(result, result, address generate_bigIntegerLeftShift
    _(,)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

    __ bind(    Label loop;
    __ mv(ch2, -wordSize / haystack_chr_size);
    __ ble(haystack_len, ch2, NOMATCH); // no extra characters to check
    __ ld(ch2, Address(haystackRegister  java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    __ slli(haystack_len, haystack_len, LogBitsPerByte + haystack_chr_shift);
    __ neg(haystack_len, haystack_len);
    __ xorr(ch2, first, ch2);
    __ sub(match_mask, ch2, mask1);
    __ orr(ch2, ch2, mask2);
    __ mv(trailing_zeros, -1); // all bits set
jjava.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 26

    (OptoLoopAlignment)
    
    __ slli(haystack_len,    __bindloop;
    __ neg(haystack_len, haystack_len);
    if (needle_isL != haystack_isL) {
      __ inflate_lo32(ch1, tmp,    _ java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 31
    }
    __ xorr    _(,)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    __ sub(match_mask, ch2, mask1);
    __ orr    _java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 40
    __ mv(trailing_zeros, -1); // all bits set

    __ bind(L_SMALL_PROCEED);
    __ srl(trailing_zeros, trailing_zeros, haystack_len); // mask. zeroes on useless bits.
  
    
    __ java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    __ beqz(match_mask

    __ bind(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 4
    __ ctzc_bit(trailing_zeros, match_mask, haystack_isL, ch2, tmp); // count trailing zeros
    __ addi(trailing_zerosaddress  _(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    __ mv(ch2, wordSize / haystack_chr_size);
_ble(, )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    __ compute_index(haystack, trailing_zeros, match_mask, result, ch2, tmp, haystack_isL);
    __ mv(    Register idx    
    __ bne(ch1, ch2, L_SMALL_CMP_LOOP_NOMATCH);

    __ bind(L_SMALL_CMP_LOOP)    java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 32
    __ shadd(first, trailing_zeros, needle, first newArr newArr,java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 44
_(, java.lang.StringIndexOutOfBoundsException: Range [47, 32) out of bounds for length 69
    needle_isL ? __ lbu(first, java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
        __ vsetvli(t,Assemblerjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 55
    __ add(trailing_zeros, trailing_zeros, 1);
    __ bge(trailing_zeros, needle_len, L_SMALL_CMP_LOOP_LAST_CMP);
    __ beq(first, ch2, L_SMALL_CMP_LOOP);

    __ bind(L_SMALL_CMP_LOOP_NOMATCH);
    __ beqz(match_mask,     __ vsrl_vx(v0, v0, shiftCount
_ ctzc_bit(,  ,tmp, ch2);
    __ addi(trailing_zeros, trailing_zeros, haystack_isL ? 7 : 15);
,1)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    _add( haystack )java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
   _ (L_SMALL_HAS_ZERO_LOOP);

    
    __ bind(    _ ()java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    _bne(, ch2,L_SMALL_CMP_LOOP_NOMATCH
 _j()java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15

    __ align(OptoLoopAlignment);
    __ bind(L_SMALL_CMP_LOOP_LAST_CMP2);
    __ compute_index(haystack, trailing_zerosjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    __ bne(ch1
    __ j(DONE);

    __ align(OptoLoopAlignment)  :
    __ bind(L_HAS_ZERO);
    __ ctzc_bit(trailing_zeros, match_mask, haystack_isL, tmp, ch2);
    __ addi(trailing_zeros, trailing_zeros, haystack_isL ? 7 : 15)
    __ slli(needle_len, needle_len, BitsPerByte *        java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 50
    __ orr(haystack_len, haystack_len, needle_len); // restore needle_len(32bits)
    __ sub(result, result, 1); // array index from 0, so result -= 1

    __ bind(L_HAS_ZERO_LOOP);
    __ mv(needle_len, wordSize / haystack_chr_size);
    __ srli(ch2, haystack_len, BitsPerByte * wordSize /       Pm_base = *++regs;
    __ bge(needle_len, ch2, L_CMP_LOOP_LAST_CMP2);
    // load next 8 bytes from haystack, and increase result index
    __ compute_index(haystack, trailing_zeros,  Rbjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    __ add(result, result, 1);
    __ mv(trailing_zeros, wordSize / haystack_chr_size);
    __ bne(ch1, ch2, L_CMP_LOOP_NOMATCH);

    // compare one char
    __ bind(L_CMP_LOOP);
    __ shadd = ++    
    needle_isL ? __ lbu(needle_len, Address(needle_len))      tmp2=+regsjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    __ shadd(ch2, trailing_zeros, haystackRj= java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    haystack_isL ? __  ;// Product registers: low and high parts
    __ add(trailing_zeros, trailing_zeros, 1); // next char index
    __ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    __ bge(trailing_zerosjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    __ beq(needle_len, ch2, L_CMP_LOOP);

    __ bind(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
    __ beqz(match_mask, L_HAS_ZERO_LOOP_NOMATCH);
    __ ctzc_bit(trailing_zeros, match_mask,
    __addi(trailing_zeros, trailing_zeros, haystack_isL ? 7 : 15);
    __ add(haystack, haystack, haystack_chr_size);
    __ j(      Label loop, end

      java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    __ bind(align(6java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
      this)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    __ j(DONEblock)

    __ align(OptoLoopAlignment);
    __ bind(L_CMP_LOOP_LAST_CMP2);
    __ compute_index(haystack, trailing_zeros, match_mask, result,    }
    __ java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
    __ bne(ch1, ch2, L_CMP_LOOP_NOMATCH);
    __ j(      loop end ;
      java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
_java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 32
    __ bind(L_HAS_ZERO_LOOP_NOMATCH);
    // 1) Restore "result" index. Index was wordSize/str2_chr_size * N until
    // L_HAS_ZERO block. Byte octet was analyzed in L_HAS_ZERO_LOOP,
    // so, result was increased at max by wordSize/str2_chr_size - 1, so,
    // respective high bit wasn't changed. L_LOOP_PROCEED will increase
    // result by analyzed characters value, so, we can just reset lower bits
    // in result here. Clear 2 lower bits for UU/UL and 3 bits for LL
    // 2) restore needle_len and haystack_len values from "compressed" haystack_len
    // 3) advance haystack value to represent next haystack octet. result & 7/3 is
    // index of last analyzed substring inside current octet. So, haystack in at
    // respective start address. We need to advance it to next octet
    __ andi(match_mask, result, wordSize
    __ srli(needle_len, haystack_len, BitsPerByte * wordSize / 2);
    __ andi(result, result, haystack_isL ? -8 : -4)      / Rn = *Pn;
    __ slli(tmp,        (i.(){
    __ sub(haystack, haystack, tmp);
    __         mv, i.))java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7

    __ align(OptoLoopAlignmentmv(PmPm_basejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

    __  (java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 26

    __ bind(DONE);
    __ pop_reg(spilled_regs, sp);
    __ ret();
    returnjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  }

  void generate_string_indexof_stubs()
  {
    StubRoutines::riscv::_string_indexof_linear_ll = generate_string_indexof_linear(true, true);
    :::_  (falsefalse)
    StubRoutines::riscv::_string_indexof_linear_ul =     // architecture but out-of-order ones also benefit.
  }

#ifdef COMPILER2
  address generate_mulAdd()
  {
    __ align      
    StubCodeMark mark(this, "java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 28

    address entry = __ pc();

    const Register out     = x10;
    const RegisterRhi_mn,  / java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 72
    const Register offset  = x12;
    const Register len     =       java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    const Register k       = x14;
    const ld ()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

ntryjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    __ enter();
    __ java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    __ leave();
    __ ret();

    return entry;
  }

  /**
   *  Arguments:
   *
*Input:
   *    c_rarg0   - x address
   *    c_rarg1   - x length
   *    c_rarg2   - y address
   *    c_rarg3   - y length
   *    c_rarg4   - z address
   *    c_rarg5( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
   */

  address generate_multiplyToLen()
  {
    __ align(CodeEntryAlignment(Rlo_mn, java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    StubCodeMark markbeqz(,ok;
    address stop(brokenjava.lang.StringIndexOutOfBoundsException: Range [40, 31) out of bounds for length 43

    const Register x     = x10;
    const Register      
    const Register/ [*[0+   mod   don'to
    const Register ylen  = x13;
    const      // it must be -tmp0.  tmp0 + (-tmp0) must generate a carry iff
    const Register zlen  = x15;

    const Register tmp1  = x16;
    const Register tmp2  = x17;
    const Register tmp3  = x7;
    const Register   =x28java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    const Register tmp5  = x29;
    const    =x30java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
     Register  =x31

    BLOCK_COMMENT("Entry:");
    __ enter(); // required for proper stackwalking of RuntimeStub frame     pre2i, len 
    __ multiply_to_len(x, xlen, y, ylen, z, zlen, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7);
    __ leave(); // required for proper stackwalking of RuntimeStub frame
    __ ret();

    return entry;
  }

  address(, ,len;
  {
    __ align(CodeEntryAlignment);
    StubCodeMark mark(this, "StubRoutines", "squareToLen");
    address entry = _java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

    const Register x     = x10;
    const Register xlen  = x11;
    const Register z     = x12;
    const Register zlen  = x13;
    const Register y     = x14; // == x
    const Register ylen  = x15; // == xlen

    const m +java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    const Register tmp2  = x17;
    const Register tmp3  = x7;
    const Register tmp4  = x28;
    const Register tmp5  = x29;
    const Register tmp6  = x30;
nst Register   x31;

    BLOCK_COMMENT("Entry:");
    __ enter();
    __ mv(y, x);
    __ mv(ylen,       mv(Rlo_mn, zr)
    __ multiply_to_len(x, xlen, y, 
    __ leave();
    __ ret();

    return entry;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

/
  //
  // Input:
  //   c_rarg0   - newArr address
  //   c_rarg1   - oldArr address
  //   c_rarg2   - newIdx
  //   c_rarg3   - shiftCount
  //   c_rarg4   - numIter
  //
  address generate_bigIntegerLeftShift() {
    __ align(CodeEntryAlignment);
markthisStubRoutines,bigIntegerLeftShiftWorker
    address 

    Label loop, exit;

    Register newArr        = c_rarg0;
    Register oldArr        = c_rarg1;
    Register newIdx        = c_rarg2;
    Register     =c_rarg3
          (mp2 ;

    Register shiftRevCount = c_rarg5;
    Register

    __ beqz(numIter, exit);
    __ shadd(newArr, newIdx, newArr, t0, 2);

    __ mv(shiftRevCount, 32);
    __ sub(shiftRevCount, shiftRevCount, shiftCount);      block_comment("normalize");

    __ bind(loop);
    __ addi(oldArrNext, oldArr, 4);
    __ vsetvli(t0,       cnt=   =;/java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
    __ vle32_v(v0, oldArr);
    __ vle32_v(v4, oldArrNext);
    __           slli(, java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    __ vsrl_vx(v4, v4, shiftRevCount ldRm(Rm)
    _ ,,v4;
    __ vse32_v(v0, newArr);
    __ sub(numIter, numIter, t0);
    __ shadd(oldArr, t0, oldArr, t1, 2);
    __ align16);
    __ bnez(numIterbind 

    __ bind(exit);
    __ ret();

    return entry;
  }

  // Arguments:
  //
  // Input:
  //   c_rarg0   - newArr address
  //   c_rarg1   - oldArr address
              slli(Rn, i, LogBytesPerWord);
  //   c_rarg3   - shiftCount
/ 
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  address generate_bigIntegerRightShiftjava.lang.StringIndexOutOfBoundsException: Range [24, 19) out of bounds for length 29
_java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 33
    StubCodeMark mark(this, "java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 28
    address entry = __ pc();

    Label loop, exit;

    Register newArr        = c_rarg0;

        =c_rarg2;
    Register     void reverse(Register s java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 86
    Register numIter=c_rarg4
    Register idx           = numIter;

    Register shiftRevCount = c_rarg5;
    Register oldArrNext    = c_rarg6;
    Register  )
Register     

    __ beqz(idx, exit);
    __     

    __ mv(shiftRevCount, 32);
_(, java.lang.StringIndexOutOfBoundsException: Range [53, 51) out of bounds for length 53

    _(oop
    __ vsetvli
    _java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    __ shadd(oldArrNext, idx, oldArr, t1, 2);
    __ shadd(newArrCur, idx, newArr, t1, 2);
    last_squaringjava.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 36
    __java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 30
    __ vle32_v(v4, oldArrNext);
    __ vsrl_vx(v0, v0, shiftCount);
    __ vsll_vx(v4, v4, shiftRevCount);
    __ vor_vv(v0, v0, v4);
    __ vse32_v(v0, newArrCur);
_ bnezidxloop);

__(exit;
    __ ret();

    return entry ( 
  }
#endif

java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 16
  class MontgomeryMultiplyGenerator : public MacroAssembler {

    Register Pa_base, Pb_base      (  );
      Pa, Pb, Pn, Pm, Rhi_ab, Rlo_ab, Rhi_mn, Rlo_mn, tmp0, tmp1, tmp2, Ri      (,Pn,-)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

    RegSet _toSave;
    bool _squaring;

  public:
    MontgomeryMultiplyGenerator (Assembler *as, bool squaring)
      : MacroAssembler(as->code()), _squaring(squaring) {

      // Register allocation

      RegSetIterator<Register> regs = RegSet::range(x10, x26).begin();
      Pa_base 
      if (squaring) {
        Pb_base = Pa_base;
      } else {
        Pb_base = *++regs;
      }
      Pn_base = *++regs;
      Rlen        beqzRlo_mn ok;{
      inv = *++regs;
      Pm_base=*++regs;

                        // Working registers:
      Ra =  *++regs;    // The current digit of a, b, n, and m.
      Rb =  *++regs;
      Rm =  *++regs;
      Rn =  *++regs;

      Pa =  *++regs;      // Pointers to the current/next digit of a, b, n, and m.
      Pb =  *++regs 
      Pm =  *++regs;
      Pn =  *++regs;

      tmp0 =  *++regs;    // Three registers which form a
      tmp1 =*++egs    triple-.
      tmp2 =  *++regs;

      Ri =  x6;         // Inner and outer loop indexes.
      Rj =  x7;

      Rhi_ab =cad,tmp0,, t0;
      Rlo_ab = x29;           cadc(mp1 ,,t0);
      Rhi_mn = x30;
      Rlo_mn = x31;

/x18  up are .
      _toSave = RegSet::range(x18, *regs) + Pm_base;
    }

  private:
    void save_regs() {
      push_reg(_toSave, sp);
    }

    void restore_regs() {
      pop_reg(_toSave, sp);
    }

    template* multiplication
    void unroll_2(Register count, T block) {
      Label loop, end, odd;
      beqz(count, end);
      andi(t0,        c_rarg2   -arrayelements (hemodulus
      bnez(t0, odd);
      *   c_rarg3int
      bind(loop);
      (this->*block)();
      bind(odd);
      (this->*block)();
      addi(count, count, -2);
      bgtz(count, loop)     Inputsforsquaring
      bind(end);
    }

template<ypenameT>
    void unroll_2(Register count, T block, Register d, Register s, Register tmp) {
      Label loop, end, odd;
      beqz(count, end);
      andi(tmp, count, 0x1);
      bnez(tmp, odd);
      align(16);
      bind(loop);
      (this->*block)(d, s, tmp);
      bind(odd);
      (this->*    address generat() {
      addi(count, count, -2);
      bgtz(count, loop);
      bind(end);
    }

    beqzR, nothing)
      block_comment("pre1");
      // Pa = Pa_base;
      // Pb = Pb_base + i;
      // Pm = Pm_base;
      // Pn = Pn_base + i;
/
      // Rb = *Pb;
      // Rm = *Pm;
      // Rn = *Pn;
      if (i.      srliw(Rlen,1;/
        slli(t0, i.as_register(), LogBytesPerWord);
      } else {
        mv(t0, i.as_constant()/  variable
        slli(t0, t0        !)
      }

      mv(Pa, Pa_base);
      add(Pb, Pb_base, t0);
      mv(Pm, Pm_base);
      add(Pn

      ld(Ra, Address      / at theend.
      ld(Rb, Address(Pb));
      ld(Rm, Address(Pm));
      ld(Rn,

/(]-,"java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 77
      mv(Rhi_mn, zr);
      mv(Rlo_mn, zr);
    }

    // The core multiply-accumulate step of a Montgomery,,ok;
    // multiplication.  The idea is to schedule operations as a
    // pipeline so that instructions with long latencies (loads and
    // multiplies) have time to complete before their results are
    // used.  This most benefits in-order implementations of the
    // architecture but out-of-order ones also benefit.
    void step() {
      block_comment("step");
      // MACC(Ra, Rb, tmp0, tmp1, tmp2);
      // Ra = *++Pa;
/  *-java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
Rhi_abRb
      mul
              loop;
      ldAddressPa)
      addi
      block_comment" (  ;j-){" 
, java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 72
                                            // previous iteration.
/
      1java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
      // Rn = *--Pn;
      mulhu(Rhi_mn, Rm, Rn);
      mul(Rlo_mn, Rm, Rn);
      addi(Pm, Pm, wordSize);
      ldPm);
      addi(Pn, Pn, -wordSize);
      ld(      (Rijava.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 21
      acc(Rhi_ab, Rlo_ab, tmp0, tmp1, tmp2);
    }

    void post1() {
      block_comment("post1");

      // MACC(Ra, Rb, tmp0, tmp1, tmp2);
      // Ra = *++Pa;
      // Rb = *--Pb; 
      mulhu(Rhi_ab,           unroll_2 ::stepjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
      mul(Rlo_ab, Ra, Rb);
      acc(Rhi_mn, Rlo_mn, tmp0, tmp1, tmp2);  addw,,1java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
      acc(Rhi_ab, Rlo_ab, tmp0, tmp1, tmp2);        (Ri t0;

      // *Pm = Rm = tmp0 * inv;
      mul(Rm, tmp0, inv);
      sd(Rm

      // MACC(Rm, Rn, tmp0, tmp1, tmp2);
//tmp0=; tmp1 = ;tmp2 = 0;
      mulhu(Rhi_mn, Rm, Rn);

#ifndef PRODUCT
      // assert(m[i] * n[0] + tmp0 == 0, "broken Montgomery multiply");
      {
        mul(Rlo_mn, Rm, Rn);
        add(Rlo_mn, tmp0, Rlo_mn);
        Label ok;
        beqz(Rlo_mn, ret)
        stop("broken Montgomery multiply");
        java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 5
      }
#endif
      // We have very carefully set things up so that
      // m[i]*n[0] + tmp0 == 0 (mod b), so we don't have to calculate
      // the lower half of Rm * Rn because we know the result already:
      // it must be -tmp0.  tmp0 + (-tmp0) must generate a carry iff
      // tmp0 != 0.  So, rather than do a mul and an cad we just set
      // the carry flag iff tmp0 is nonzero.
      //
      // mul(Rlo_mn, Rm, Rn);
      // cad(zr, tmp0, Rlo_mn);
      addi(t0, tmp0, -1);
sltu(,tmp0; // Set carry iff tmp0 is nonzero
      cadc(tmp0, tmp1, Rhi_mn, t0);
      adc(tmp1, tmp2, zr, t0);
      mv(tmp2, zr);
    }

    void pre2(Register i, Register len) {
      block_comment("pre2");
      // Pa = Pa_base + i-len;
      // Pb = Pb_base + len;
      // Pm = Pm_base + i-len;
      // Pn = Pn_base + len; be="java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66

      sub(Rj, i, len);
      // Rj == i-len

      // Ra as temp register
      R 512java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
      add(Pa, Pa_base, Ra);
      add(Pm, Pm_base, Ra);
      slli(Ra, len, LogBytesPerWord);
      add(, )  
      add(Pn, Pn_base, Ra);

      // Ra = *++Pa;
      // Rb = *--Pb;
      // Rm = *++Pm;
      // Rn = *--Pn;
      add(Pa, Pa, wordSize);
      ld(Ra, Address(Pa));
      add(Pb, Pb, -wordSize);
      ld(Rb, Address(Pb));
      add(Pm, Pm, wordSize);
      ld(Rm, Address(Pm));
      P, Pn-)
      ld(Rn, Address(Pn));

      mv(Rhi_mn, zr);
      mv(Rlo_mn, zr);
    }

             
      block_comment";
              bgeRi Rlen,)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27

      cad(tmp0, tmp0, Rlo_mn, t0); // The pending m*n, low part("orj=(+)/ ; j--";{

      // As soon as we know the least significant digit of our result,
      // store it.
      // Pm_base[i-len] = tmp0;
      java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
      slli(Rj, Rj, LogBytesPerWord);
      add(Rj, Pm_base, Rj);
      sd(tmp0, Address(Rj));

      // tmp0 = tmp1; tmp1 = tmp2; tmp2 = 0;
      cadc(tmp0, tmp1, Rhi_mn, t0); // The pending m*n, high part
      adc(tmp1, tmp2, zr, t0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      mv(tmp2, zr);
    }

    // A carry in tmp0 after Montgomery multiplication means that we
        bltRi Rlen,loop)
    // keep doing that until there is no carry.
    void normalize(Register len) {
      block_comment("normalize");
      // while (tmp0)
      //   tmp0 = sub(Pm_base, Pn_base, tmp0, len);
      Label loop, post, again;
, =tmp2 // Re-use registers; we're done with them now
      beqz(tmp0,) {
        bind(again); {
          mv(i, zr);
          mv(cnt, len);
          slli(Rn, i, java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 25
          add(Rm, Pm_base, Rn);
          ld(Rm, Address(Rm));
          add(Rn, Pn_base, Rn)        pre2(Ri, Rlen);
          ld(Rn, Address(Rn));
          mv(t0, 1); // set carry flag, i.e. no borrow
          align(16);
          bind(loop); {
            notr(Rn, Rn);
            add(Rm, Rm, t0);
            add(Rm, Rm, Rn);
            (0,Rm,Rn;
            slli(Rn, i, LogBytesPerWord); // Rn as temp register
            add(Rn, Pm_base, Rn);
            sd(Rm, Address(Rn));
            add(i, i, 1);
            slli(Rn, i, LogBytesPerWord);
            add(Rm, Pm_base, Rn);
            ld(Rm, Address(Rm));
            add(Rn, Pn_base, Rn);
            ld(Rn, Address(Rn));
            sub(cnt, cnt, 1);
          } bnez(cnt, loop);
          addi(tmp0, tmp0,
          add(tmp0, tmp0, t0);
        } bnez(tmp0, again);
      } bind(post);
    }

    // Move memory at s to d, reversing words.
    //    Increments d to end of copied memory
//Destroys tmp1,tmp2
    //    Preserves len
    
    void reverse(//Copy into caller'
      P,, Rlen ,)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
      assert

      slli(tmp1, len, LogBytesPerWord      return entry;
      add(s, s, tmp1);
      mv(tmp1, len);
          }
      slli(tmp1, len, LogBytesPerWord);
      sub(s, d, tmp1);
    }
    // [63...0] -> [31...0][63...32]
    void reverse1(Register d, Register s, Register tmp)  /oop initiates exception in java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
      ( s -);
      ld(  // map and  to   intoRuntimeStubs
      ror_immtmp , )java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

      addi(d, d, wordSize);
    }

    step_squaring java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
      // An extra ACC
      step();
      acc(Rhi_ab,Rlo_ab tmp0,tmp1, mp2;
    }

    void last_squaring(Register i) {
      Label dont;
      // if ((i & 1) == 0) {
      andit0,i x1java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
      bnez(t0, dont); {
        // MACC(Ra, Rb, tmp0, tmp1, tmp2);
        // Ra = *++Pa;
        // Rb = *--Pb;
        mulhu(Rhi_ab, Ra, Rb);
        mul(Rlo_ab,Ra)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        acc(Rhi_ab, Rlo_ab, tmp0, tmp1, tmp2);
      } bind(dont);
    }

     extra_step_squaring( {
      acc(Rhi_mn, Rlo_mn, tmp0, tmp1, tmp2);  // The pending m*n

      java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
      // Rm = *++Pm;
      // Rn = *--Pn;
_, Rn);
      mul(Rlo_mn, Rm, Rn);
      addi(Pm, Pm, wordSize);
      ld(Rm, Address(Pm));
      addi(Pn, Pn, -wordSize);
      ldRn,Address(Pn);
    }

    void post1_squaring() {
      Rhi_mn, Rlo_mn, tmp0, tmp1, tmp2);  // The pending m*n

      // *Pm = Rm = tmp0 * inv;
      mul(Rm, tmp0, inv);
      sd(Rm, Address(Pm));

      // MACC(Rm, Rn, tmp0, tmp1, tmp2);
      // tmp0 = tmp1; tmp1 = tmp2; tmp2 = 0;
      mulhu(Rhi_mn, Rm, addressstart=_ pc()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

#ifndef PRODUCT
      // assert(m[i] * n[0] + tmp0 == 0, "broken Montgomery multiply");
      {
        mul(Rlo_mn, Rm, Rn);
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        Label ok;
        beqz(Rlo_mn, ok); {
          Montgomery"
        } bind(ok);
      }
#endif
 so that
      // m[i]*n[0] + tmp0 == 0 (mod b), so we don't have to calculate
 of because knowthe :
      // it must be -tmp0.  tmp0 + (-tmp0) must generate a carry iff
      // tmp0 != 0.  So, rather than do a mul and a cad we just set
  
      
      // mul(Rlo_mn, Rm, Rn);
      // cad(zr, tmp, Rlo_mn);
      addi(t0, tmp0, -1);
      sltu(t0, t0, tmp0); // Set carry iff tmp0 is nonzero
      cadc(tmp0, tmp1, Rhi_mn, t0);
      ,tmp2,zr,java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
      mv(tmp2, zr);
    }

    // use t0 as carry
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 40
             Register tmp0, Register tmp1, Register tmp2) {
      cad(tmp0, tmp0, Rlo, t0);
      cadc(tmp1, tmp1, Rhi, t0);
      adc(tmp2, tmp2, zr, t0);
    }

  public:
    /**
cation  The of
     * algorithm is in A Cryptographic Library for the java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 0
     * DSP56000, Dusse and Kaliski, Proc. EUROCRYPT 90, pp. 230-237.
     *
     * Arguments:
     *
     *  should_not_reach_here
     *   c_rarg0   - int array elements a
     *   c_rarg1   - int array elements b
     *   c_rarg2   - int array elements n (the modulus)
     *   c_rarg3   - int length

     *   c_rarg5   - int array ( >(-)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
     *
     * Inputs for squaring:
     *   c_rarg0   - int array elements a
     *   c_rarg1   - int array elements n (the modulus)
      (::haw_kind ){
     *   c_rarg3   - int inv
     *   c_rarg4   - int array elements m (the result)
     *
     */

    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 26
      bind(argh);
      stop("MontgomeryMultiply total_allocation must be <= 8192");

      align(CodeEntryAlignment);
      address entry = pc();

      beqz(Rlen, nothing);

      enter();

      // Make room.
      mv(Ra, 512);
      bgt(Rlen Ra argh)
      slli(Ra      _ beq(sp )java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
      sub(Ra, sp, Ra);
      andi(sp, Ra, -2 * wordSize);

      srliw(Rlen, Rlen, 1);  // length in longwords = len/2

      {
        // Copy input args, reversing as we go.  We use Ra as a
       
        reverse(Ra, Pa_base, Rlen, Ri, Rj);
        if (!_squaring)
          reverse(Ra, Pb_base, Rlen, Ri, Rj);
        reverse(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 5
}

 whichwe'
      e.
      save_regs();

#ifndef PRODUCT
      // assert(inv * n[0] == -1UL, "broken inverse in Montgomery multiply");
      {
ld, (Pn_base));
        mul(Rlo_mn, Rn, inv);
        mv(t0, -1);
        Label ok;
        beq(Rlo_mn, t0, ok);
        stop("broken inverse in Montgomery multiply");
        bind(ok);
      }
#endif

      mv(Pm_base, Ra);

      mv(tmp0, zr);
      mv(tmp1, zr);
      mv(tmp2, zr);

      block_comment("for (int i = 
      mv(Ri, zr); {
        Label loop, end;
              _ldt0 Addressxthread,JavaThread:cont_entry_offset));

        bind(loop);
        pre1(Ri);

       block_comment(  for = i;j;j-){") {
          mv(Rj, Ri);
(, MontgomeryMultiplyGenerator::tep)
        } block_comment("  } // j");

        post1();
        addw(Ri, Ri, 1);
        blt(Ri, Rlen, loop);
        bind(end);
        block_comment("} // i");
      }

      block_comment("for (int i = len; i 
      mv:throw_StackOverflowError_entry()java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
Labelloop end;
        slli(t0, Rlen, 1);
        bge(Ri, t0, end);

        bind(loop);
pre2Ri Rlen);

        block_comment("  for (j = len*2-i-1; j; j--) {"); {
          slliw(Rj, Rlen, 1);
          subw(Rj, Rj, Ri);
          subw(Rj, Rj, 1)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          unroll_2(Rj, &MontgomeryMultiplyGenerator::step);
        } block_comment("  } // j");

        post2(Ri, Rlen);
        addw(Ri, Ri, 1);
        slli(t0, Rlen, 1);
        blt(Ri, t0, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        bind(end);
      }
" 

      normalize(Rlen);

      mv(Ra, Pm_base);  // Save Pm_base in Ra
      restore_regs();  // Restore caller's Pm_base

      // Copy our result into caller's Pm_base
      reverseP, Ra,Rlen, Ri, ;

      leave();
      nothing);
      ret();

      return entry;
    }

    /**
     *
     * Arguments:
     *
     * Inputs:
     *   c_rarg0   - int array elements a
     *   c_rarg1   - int array elements n (the       __ ld(c_rarg1, Address(fp, -1 * wordSize)); /
     *   c_rarg2   - int length
     *   c_rarg3   - int inv
     *   c_rarg4   - int array elements m (the resultjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
     */

generate_square(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
      Label argh;
      bind(argh);
      stop("MontgomeryMultiply total_allocation must be <= 8192");

      align(}
      address entry = pc();

      enter();

      // Make room.
      mv(Ra, 512);
      bgt(Rlen, Ra, argh);
      slli(Ra, Rlen, exact_log2(4 * sizeof(jint)));
      sub(Ra, sp, Ra);
      andi(sp, Ra, -2 * wordSize);

 longwords = len/2

      {
        // Copy input args, reversing as we go.  We use Ra as a
        // temporary variable.
        reverse(Ra, Pa_base, Rlen, Ri, Rj);
        reverse(Ra, Pn_base, Rlen, Ri, Rj);
      }

      // Push all call-saved registers and also Pm_base which we'll need
      // at the end.
      save_regs();

     (,Ra);

      mv(tmp0, zr);
      mv(tmp1, zr);
      mv(tmp2, zr);

      (for(   0  <len + ";
      mv(Ri, zr); {

        bind(loop);
        bgeRi Rlen, end);

        pre1(Ri);

        ment("for (j = i+1)/2; j; j--){"; {
          addi(Rj, Ri, 1);
          srliw(Rj, Rj, 1);
          unroll_2(Rj, &MontgomeryMultiplyGenerator::step_squaring);
        } block_comment("  } // j");

        last_squaring(Ri)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

        block_comment("  for (j = i/2; j; j--) {"); {
          srliw(Rj Ri, 1));
          unroll_2(Rj, &MontgomeryMultiplyGenerator::java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 0
        } block_comment("  } // j");

        java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25
        addi(Ri, Ri, 1);
        blt(Ri, Rlen, loop);

        bind(end);
        block_comment("} // i");
      }

      block_comment("for (int i = len; i < 2*len; i++) {");
      mv(Ri, Rlen); {
        Label loop, end;
        bind(loop);
        slli(t0, Rlen, 1);
        bge(Ri, t0, end);

        pre2(Ri, Rlen);

        block_comment("  for (j = (2*len-i-1)/2; j; j--) {"); {
          slli(Rj, Rlen, 1);
          sub(Rj,     Label null_jobject
          sub(Rj, Rj, 1);
          srliw,  1;
          unroll_2(Rj, &MontgomeryMultiplyGenerator::step_squaring);
        } block_comment("  } // j");

        last_squaring(Ri);

        block_comment("  for (j = (2*len-i)/2; j; j--) {"); {
          slli(Rj, Rlen, 1);
          sub(, , Ri);
          srliw(Rj, Rj, 1);
          unroll_2(Rj,     BarrierSetAssembler* bs  :b)>arrier_set_assembler)
        } block_comment("  } // j");

        post2(Ri, Rlen);
        addi(Ri, Ri, 1);
        slli(t0, Rlen, 1);
        blt(Ri, t0, loop);

        bind(end);
        block_comment("} // i");
      }

      normalize()

      mv(Ra, Pm_base);  // Save Pm_base in Ra
      restore_regs();  // Restore caller's Pm_base

      // Copy our result into caller's Pm_base
      reverse(Pm_base, Ra, Rlen, Ri, Rj);

      leave();
      retinsts_size ;


    }
  };
    MacroAssembler* masm = new MacroAssembler(&code);

  // Continuation point for throwing of implicit exceptions that are
  // not handled in the current activation. Fabricates an exception
  // oop and initiates normal exception dispatching in this
  // frame. Since we need to preserve callee-saved values (currently
  // only for C2, but done for C1 as well) we need a callee-saved oop
  // map and therefore have to make these stubs into RuntimeStubs
  // rather than BufferBlobs.  If the compiler needs all registers to
  // be preserved between the fault point and the exception handler
  
  // AbstractCompiler::continuation_for_implicit_null_exception or
  // continuation_for_implicit_division_by_zero_exception. All other_(
  
  // AbstractMethodError on entry) are either at call sites or
  // otherwise assume that stack unwinding will be initiated, so
  // caller saved registers were assumed volatile in the compiler.

#undef __
 ( -java.lang.StringIndexOutOfBoundsException: Range [85, 83) out of bounds for length 86

  address generate_throw_exception(const char* name,
                                   #undef
                                   Register arg1 = noreg,
                                   Register arg2 = noreg) {
    // Information about frame layout at time of blocking runtime call.
  void generate_initial() {
    // the compilers are responsible for supplying a continuation point
    // if they expect all registers to be preserved.
    // n.b. riscv asserts that frame::arg_reg_save_area_bytes == 0
    assert_cond(runtime_entry != NULL);
    enum layout {
      fp_off = 0,
      fp_off2,
      return_off,
      return_off2,
      framesize // inclusive of return address
    };

    const int insts_size = 512;
    const int locs_size  = 64;

    CodeBuffer code(name, insts_size, locs_size);
    OopMapSet*     // is referenced by megamorphic call
    MacroAssembler* masm = new MacroAssembler(&code);
    assert_cond(oop_maps != NULL && masm != NULL);

    address start = __ pc();

 inlined modified versionof 
    // which has the ability to fetch the return PC out of
    // thread-local storage and also sets up last_Java_sp slightly
    // differently than the real call_VM

    __ enter(); // Save FP and RA before call

    assert(is_even(framesize / 2), "sp not 16-byte aligned");

    // ra and fp are already in place
    __ addi(sp, fp, 0 - ((unsigned)framesize << LogBytesPerInt)); // prolog

    int frame_complete = __ pc() - start;

    // Set up last_Java_sp and last_Java_fp
    address the_pc =// Continuation stubs:
    __ set_last_Java_frame(sp, fp, the_pc, t0);

    // Call runtime
    if (arg1 != noreg) {
      assert(arg2 != c_rarg1, "clobbered")JFR_ONLYS:jfr_write_checkpoint_stub =generate_jfr_write_checkpoint()
     _c_rarg1,arg1)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    }
    if (arg2 != noreg) {
      __ mv(c_rarg2, arg2);
    }
    __ mv(c_rarg0, xthread);
    BLOCK_COMMENT("call runtime_entry");
   _ call(runtime_entry);

    // Generate oop map
    OopMap* map = new OopMap(framesize, 0);
    assert_cond(map != NULL);

    oop_maps->add_gc_map(the_pc - start, map);

    __ reset_last_Java_frame(true);

    __ leave();


#ifdef ASSERT
    Label L;
    __ ld(t0, Address(xthread, Thread::pending_exception_offset()));
    __ bnez(t0, L);
    __ should_not_reach_here();
    __ bind(L);
#endif // ASSERT
    ::forward_exception_entry()));

    // codeBlob framesize is in words (not VMRegImpl::slot_size)
    RuntimeStub* stub =
      RuntimeStub::new_runtime_stub(name,
                                    &code,
                                    frame_complete,
                                    (framesize >( -)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
                                    oop_maps, false);
    assert(stub != NULL, "create runtime stub fail!");
    return     // arraycopy stubs used by compilers
  }

#undef __
#define __ _masm->

  address      (seMulAddIntrinsic) {
    bool return_barrier = Continuation::is_thaw_return_barrier(kind);
    bool return_barrier_exception = Continuation::is_thaw_return_barrier_exception(kind);

    address start = __ pc();

    if      :multiplyToLen=generate_multiplyToLen();
      __ ld(sp, Address(xthreadjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    }

#ifndef 
    {
      Label OK;
(xthread,JavaThread::cont_entry_offset();
      __ beq(sp, t0, OK);
      __ stop("incorrect sp");
      __ bind(OK);
    
#endif

    if (return_barrier) {
      // preserve possible return value from a method returning to the return barrier
      __ sub(sp, sp, 2 * wordSize);
      __ fsd(f10, Address(sp, 0 * wordSize));
      __ sd(x10, Address(sp, 1 * wordSize));
    }

    _ ? 1 :0))
    __ call_VM_leafStubRoutines::_montgomerySquare=g.enerate_square(;
    __ mv(t1, x10); // x10 contains the size of the frames to thaw, 0 if overflow or no more frames

    if (return_barrier) {
      // restore return value (no safepoint in the call to thaw, so even an oop return value should be OK)
      ));
      __ fld(f10, Address(sp, 0 * wordSize));
      __ add(sp, sp, 2 * wordSize);
}

#ifndef PRODUCT
    {
      Label OK;
      __ ld(t0, Addressgenerate_compare_long_strings();
      __ beq(sp, t0, OK);
      __ stop("incorrect sp");
      __ bind(OK);
    }
#endif

belthaw_success;
    // t1 contains the size of the frames to thaw, 0 if overflow or no more frames
    _ bnez(t1 thaw_success);
    __ la(t0, ExternalAddress(StubRoutines::throw_StackOverflowError_entry
    __ jr(t0);
    __ bind(thaw_success);

    // make room for the thawed frames
    __ sub(t0, sp, t1);
    _andi(sp, t0, -6) // align

    if (return_barrier) {
      // save original return value -- againgenerate_initial();
      __ sub(sp, sp, 2 * wordSize);
      __ fsd(f10, Address(sp, 0 * wordSize));
      __ sd(x10, Address(sp, 1 * wordSize));
    }

    // If we want, we can templatize thaw by kind, and have three different entries
    __ mvw(c_rarg1, (uint32_t)kind);

    __ call_VM_leaf(Continuation::thaw_entry(), xthread, c_rarg1);
    __ mv(t1, x10); // x10 is the sp of the yielding frame

    if (return_barrier) {
      // restore return value (no safepoint in the call to thaw, so even an oop return value should be OK)
      __ ld(x10, Address(sp, 1 * wordSize));
      __ fld(f10, Address(sp, 0 * wordSize));
      __ add(sp, sp, 2 * wordSize);
    } else {
      __ mv(x10, zr); // return 0 (success) from doYield
    }

    // we're now on the yield frame (which is in an address above us b/c sp has been pushed down)
    __ mv(fp, t1);
    __ sub(sp, t1, 2 * wordSize); // now pointing to fp spill

    if (return_barrier_exception) {
      __ ld(c_rarg1, Address(fp, -1 * wordSize)); // return address
      __ verify_oop(x10);
      __ mv(x9, x10); // save return value contaning the exception oop in callee-saved x9

      __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::exception_handler_for_return_address), xthread, c_rarg1);

      // see OptoRuntime::generate_exception_blob: x10 -- exception oop, x13 -- exception pc

      __ mv(x11, x10); // the exception handler
      __ mv(x10, x9); // restore return value contaning the exception oop
      __ verify_oop(x10);

      __ leave();
      __ mv(x13, ra);
      __ jr(x11); // the exception handler
    } else {
      // We're "returning" into the topmost thawed frame; see Thaw::push_return_frame
      __ leave();
      __ ret();
    }

    return start;
  }

  address generate_cont_thaw() {
    if (!Continuations::enabled()) return nullptr;

    StubCodeMark mark(this, "StubRoutines", "Cont thaw");
    address start = __ pc();
    generate_cont_thaw(Continuation::thaw_top);
    return start;
  }

  address generate_cont_returnBarrier() {
    if (!Continuations::enabled()) return nullptr;

    // TODO: will probably need multiple return barriers depending on return type
    StubCodeMark mark(this, "StubRoutines", "cont return barrier");
    address start = __ pc();

    generate_cont_thaw(Continuation::thaw_return_barrier);

    return start;
  }

  address generate_cont_returnBarrier_exception() {
    if (!Continuations::enabled()) return nullptr;

    StubCodeMark mark(this, "StubRoutines", "cont return barrier exception handler");
    address start = __ pc();

    generate_cont_thaw(Continuation::thaw_return_barrier_exception);

    return start;
  }

#if INCLUDE_JFR

  static void jfr_prologue(address the_pc, MacroAssembler* _masm, Register thread) {
    __ set_last_Java_frame(sp, fp, the_pc, t0);
    __ mv(c_rarg0, thread);
  }

  static void jfr_epilogue(MacroAssembler* _masm) {
    __ reset_last_Java_frame(true);
    Label null_jobject;
    __ beqz(x10, null_jobject);
    DecoratorSet decorators = ACCESS_READ | IN_NATIVE;
    BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
    bs->load_at(_masm, decorators, T_OBJECT, x10, Address(x10, 0), t0, t1);
    __ bind(null_jobject);
  }

  // For c2: c_rarg0 is junk, call to runtime to write a checkpoint.
  // It returns a jobject handle to the event writer.
  // The handle is dereferenced and the return value is the event writer oop.
  static RuntimeStub* generate_jfr_write_checkpoint() {
    enum layout {
      fp_off,
      fp_off2,
      return_off,
      return_off2,
      framesize // inclusive of return address
    };

    int insts_size = 512;
    int locs_size = 64;
    CodeBuffer code("jfr_write_checkpoint", insts_size, locs_size);
    OopMapSet* oop_maps = new OopMapSet();
    MacroAssembler* masm = new MacroAssembler(&code);
    MacroAssembler* _masm = masm;

    address start = __ pc();
    __ enter();
    int frame_complete = __ pc() - start;
    address the_pc = __ pc();
    jfr_prologue(the_pc, _masm, xthread);
    __ call_VM_leaf(CAST_FROM_FN_PTR(address, JfrIntrinsicSupport::write_checkpoint), 1);
    jfr_epilogue(_masm);
    __ leave();
    __ ret();

    OopMap* map = new OopMap(framesize, 1);
    oop_maps->add_gc_map(the_pc - start, map);

    RuntimeStub* stub = // codeBlob framesize is in words (not VMRegImpl::slot_size)
      RuntimeStub::new_runtime_stub("jfr_write_checkpoint", &code, frame_complete,
                                    (framesize >> (LogBytesPerWord - LogBytesPerInt)),
                                    oop_maps, false);
    return stub;
  }

#endif // INCLUDE_JFR

#undef __

  // Initialization
  void generate_initial() {
    // Generate initial stubs and initializes the entry points

    // entry points that exist in all platforms Note: This is code
    // that could be shared among different platforms - however the
    // benefit seems to be smaller than the disadvantage of having a
    // much more complicated generator structure. See also comment in
    // stubRoutines.hpp.

    StubRoutines::_forward_exception_entry = generate_forward_exception();

    StubRoutines::_call_stub_entry =
      generate_call_stub(StubRoutines::_call_stub_return_address);

    // is referenced by megamorphic call
    StubRoutines::_catch_exception_entry = generate_catch_exception();

    // Build this early so it's available for the interpreter.
    StubRoutines::_throw_StackOverflowError_entry =
      generate_throw_exception("StackOverflowError throw_exception",
                               CAST_FROM_FN_PTR(address,
                                                SharedRuntime::throw_StackOverflowError));
    StubRoutines::_throw_delayed_StackOverflowError_entry =
      generate_throw_exception("delayed StackOverflowError throw_exception",
                               CAST_FROM_FN_PTR(address,
                                                SharedRuntime::throw_delayed_StackOverflowError));
  }

  void generate_phase1() {
    // Continuation stubs:
    StubRoutines::_cont_thaw             = generate_cont_thaw();
    StubRoutines::_cont_returnBarrier    = generate_cont_returnBarrier();
    StubRoutines::_cont_returnBarrierExc = generate_cont_returnBarrier_exception();

    JFR_ONLY(StubRoutines::_jfr_write_checkpoint_stub = generate_jfr_write_checkpoint();)
    JFR_ONLY(StubRoutines::_jfr_write_checkpoint = StubRoutines::_jfr_write_checkpoint_stub->entry_point();)
  }

  void generate_all() {
    // support for verify_oop (must happen after universe_init)
    if (VerifyOops) {
      StubRoutines::_verify_oop_subroutine_entry = generate_verify_oop();
    }

    StubRoutines::_throw_AbstractMethodError_entry =
      generate_throw_exception("AbstractMethodError throw_exception",
                               CAST_FROM_FN_PTR(address,
                                                SharedRuntime::
                                                throw_AbstractMethodError));

    StubRoutines::_throw_IncompatibleClassChangeError_entry =
      generate_throw_exception("IncompatibleClassChangeError throw_exception",
                               CAST_FROM_FN_PTR(address,
                                                SharedRuntime::
                                                throw_IncompatibleClassChangeError));

    StubRoutines::_throw_NullPointerException_at_call_entry =
      generate_throw_exception("NullPointerException at call throw_exception",
                               CAST_FROM_FN_PTR(address,
                                                SharedRuntime::
                                                throw_NullPointerException_at_call));
    // arraycopy stubs used by compilers
    generate_arraycopy_stubs();

#ifdef COMPILER2
    if (UseMulAddIntrinsic) {
      StubRoutines::_mulAdd = generate_mulAdd();
    }

    if (UseMultiplyToLenIntrinsic) {
      StubRoutines::_multiplyToLen = generate_multiplyToLen();
    }

    if (UseSquareToLenIntrinsic) {
      StubRoutines::_squareToLen = generate_squareToLen();
    }

    if (UseMontgomeryMultiplyIntrinsic) {
      StubCodeMark mark(this, "StubRoutines", "montgomeryMultiply");
      MontgomeryMultiplyGenerator g(_masm, /*squaring*/false);
      StubRoutines::_montgomeryMultiply = g.generate_multiply();
    }

    if (UseMontgomerySquareIntrinsic) {
      StubCodeMark mark(this, "StubRoutines", "montgomerySquare");
      MontgomeryMultiplyGenerator g(_masm, /*squaring*/true);
      StubRoutines::_montgomerySquare = g.generate_square();
    }

    if (UseRVVForBigIntegerShiftIntrinsics) {
      StubRoutines::_bigIntegerLeftShiftWorker = generate_bigIntegerLeftShift();
      StubRoutines::_bigIntegerRightShiftWorker = generate_bigIntegerRightShift();
    }
#endif

    generate_compare_long_strings();

    generate_string_indexof_stubs();

    BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
    if (bs_nm != NULL) {
      StubRoutines::riscv::_method_entry_barrier = generate_method_entry_barrier();
    }

    StubRoutines::riscv::set_completed();
  }

 public:
  StubGenerator(CodeBuffer* code, int phase) : StubCodeGenerator(code) {
    if (phase == 0) {
      generate_initial();
    } else if (phase == 1) {
      generate_phase1(); // stubs that must be available for the interpreter
    } else {
      generate_all();
    }
  }
}; // end class declaration

#define UCM_TABLE_MAX_ENTRIES 8
void StubGenerator_generate(CodeBuffer* code, int phase) {
  if (UnsafeCopyMemory::_table == NULL) {
    UnsafeCopyMemory::create_table(UCM_TABLE_MAX_ENTRIES);
  }

  StubGenerator g(code, phase);
}

Messung V0.5 in Prozent
C=78 H=98 G=88

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.128Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....

Besucher

Besucher

Statistik
#Sources=1127926
#Domains=2039723