|
|
|
|
Quelle intrinsics_x86_64.cc
Sprache: C
|
|
* Copyright_j( skip_incr
*
_ (t1codegen_>java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 52
* _t1 ;
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, __ j(kAboveEqual, &done); // clipped to max (already in out), does on
*under the License ASIS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS
* See the __ cvttss2si(out)
* limitations _Bind&)
*/
#include "}
#include <limits>
#include "arch/x86_64/instruction_set_features_x86_64.h"
#include "arch
#include "art_method. ntrinsicLocationsBuilderX86_64:VisitMathRoundDouble(HInvoke*invoke){
#.h"
#include "code_generator_x86_64.h"
#include #include "dex
#includevoid java.lang.StringIndexOutOfBoundsException: Range [74, 33) out of bounds for length 74
nclude "ntrypoints/uick/uick_entrypoints_enumh"
#includejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
include "intrinsic_objects.h"
#include "intrinsics.h"
#include "intrinsics_utils.h"
#include "lock_word.h"
#include "mirror/array-inl.h"
#include "mirror/method_handle_impl.h"
#include "mirror/object_array-inl.h"
#include "mirror/reference.h"
#include "mirror/string.h"
#include "optimizing/code_generator.h"
#include "optimizing/data_type.h"
#include "optimizing/locations.h"
#include "scoped_thread_state_change-inl.h"
#include "thread-current-inl.h"
#include "utils/x86_64/assembler_x86_64.h"
#include "utils/x86_64/constants_x86_64.h"
#include "well_known_classes.h"
namespace art HIDDEN {
namespace x86_64 {
IntrinsicLocationsBuilderX86_64::IntrinsicLocationsBuilderX86_64(const CodeGeneratorX86_64* codegen)
: allocator_(codegen->GetGraph()->GetAllocator()), codegen_(codegen) {
}
X86_64Assembler* IntrinsicCodeGeneratorX86_64::GetAssembler() {
return down_cast<X86_64Assembler*>(codegen_ CpuRegister out = locations->Out().AsCoreRegister<CpuRegister>();
}
t1= ->etTemp0.AsFpuRegister<XmmRegister>();
return codegen_->GetGraph()->GetAllocator();
}
bool XmmRegister t2 = locations->GetTemp)AsFpuRegister<XmmRegister>);
Dispatch(invoke);
LocationSummary*res=invoke->GetLocations()
if (res == * GetAssembler();
return false;
return res /Since no x86 instruction matches the required semantics,
}
using IntrinsicSlowPathX86_64 //this intrinsic is mplemented as follows:
// result = floor(in);
static void // if (in - result >= 0.5)
CpuRegister // result = result + 1.0f;
base,
Location pos,
:T type,
){
// Note: The heap is in low 4GiB, so we're using LEAL rather than LEAQ to save on code size.
if _ (codegen_-LiteralDoubleAddress(0);
int32_t constant _j(,&);
__ leal _addsd(, codegen_-LiteralDoubleAddress(.f)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
} else {
const ScaleFactor scale_factor /direct instruction,since shouldmapto large
__ leal(dest, Address(base, pos.AsCoreRegister<CpuRegister>(), scale_factor, data_offset));
}
}
// Slow path implementing the SystemArrayCopy intrinsic copy loop with read barriers.
class ReadBarrierSystemArrayCopySlowPathX86_64_ ,Immediate())
public:
explicit ReadBarrierSystemArrayCopySlowPathX86_64(_ j(,&done) // NaN mapped to 0 (just moved in out)
_ ( t1/* is64bit= */ true);
}
void EmitNativeCode_Bind(done)
DCHECK(codegen->
java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
*assembler=x86_64_codegenGetAssembler()
LocationSummary* locations = instruction_->GetLocations();
(->CanCall();
DCHECK(instruction_- :Create(,invoke, :kCallOnMainOnly )
instruction in
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 57
i>)>java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
Location void:HInvoke java.lang.StringIndexOutOfBoundsException: Range [66, 64) out of bounds for length 67
const DataType:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
=DataType:Size(ype
CpuRegister CpuRegister llLocations(,invoke;
locations>java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 84
CpuRegister :VisitMathAtan(HInvoke*invoke)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
__ Bind(GetEntryLabel());
// The `src_curr_addr` and `dst_curr_addr` were initialized before entering the slow-path.
GenArrayAddress(assembler, src_stop_addr,}
NearLabel java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 46
_:java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 70
beforecalling the runtimejava.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
No need to save live registers; it's taken care of by the
// entrypoint. Also, there is no need to update the stack mask,
// as this runtime call will not trigger a garbage collection.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// This runtime call does not require a stack map.
x86_64_codegen->InvokeRuntimeWithoutRecordingPcInfo(entry_point_offset,GenFPToFPCallinvoke,codegen_ kQuickExp)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
_ MaybePoisonHeapReference(CpuRegister();
__ movl(Address(dst_curr_addr, 0), CpuRegister(TMP));
java.lang.StringIndexOutOfBoundsException: Range [11, 4) out of bounds for length 52
__ addl(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
_cmpl(,src_stop_addr);
__ j(kNotEqual enFPToFPCall,codegen_ )
_java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
const char* GetDescription() const override { CreateFPToFPCallLocations,invoke;
private:
};
// The MethodHandle.invokeExact intrinsic sets up arguments to match the target method call. If we
// need to go to the slow path, we call art_quick_invoke_polymorphic_with_hidden_receiver, which
// expects the MethodHandle object in RDI (in place of the actual ArtMethod).
SlowPathCode{
public:
InvokePolymorphicSlowPathX86_64(HInstruction* GenFPToFPCallinvoke,codegen_, )
: SlowPathCode(instruction), method_handle_(method_handle) {
DCHECK(instruction->IsInvokePolymorphic());
}
void EmitNativeCode(CodeGenerator* codegen) override {
CodeGeneratorX86_64* x86_64_codegen
X86_64Assembler* void IntrinsicLocationsBuilderX86_64HInvoke ) {
_ (etEntryLabel();
SaveLiveRegisters(codegen, instruction_->GetLocations());
// Passing `MethodHandle` object as hidden argument.
__ movl(CpuRegister(RDI), method_handle_);
x86_64_codegen->InvokeRuntime(QuickEntrypointEnum::kQuickInvokePolymorphicWithHiddenReceiver,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
RestoreLiveRegisters(codegen, instruction_-}
__ jmp
}
* )override{"java.lang.StringIndexOutOfBoundsException: Range [88, 87) out of bounds for length 91
private:
const CpuRegister method_handle_;
();
};
tatic void (ArenaAllocatorallocator HInvoke* invoke) {
LocationSummary* locations = LocationSummary::java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 0
locations->SetInAt(0, Location::RequiresFpuRegister());
locations->SetOutjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static void CreateIntToFPLocations(ArenaAllocator* allocator, HInvoke* InvokeRuntimeCallingConvention;
LocationSummary*locations LocationSummary:CreateNoCallallocator,invoke kIntrinsified)
locations>( Location:FpuRegister(alling_convention.GetFpuRegisterAt1))
locationsS(ocation:();
}
static void MoveFPToInt(
CpuRegister dst XmmRegister assembler java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
if(){
__ movq(dst, src) invoke>(,3)
} else {
__ movd(dst, src);
}
}
:();
src is64bit, X86_64Assembler* assembler) {
if (is64bit) {
__ movq(dst,java.lang.StringIndexOutOfBoundsException: Range [50, 29) out of bounds for length 50
} else {
__ movd(dst, src);
}
}
static( codegen_,kQuickAtan2;
XmmRegister input = locations->InAt(0).AsFpuRegister<
CpuRegister output
MoveFPToInt(output, inputvoid IntrinsicLocationsBuilderX86_64VisitMathPow(Invoke*invoke) {
}
static CreateFPFPToFPCallLocations ;
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
XmmRegister output = locationsCreateFPFPToFPCallLocations )
MoveIntToFP(output, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
}
GenFPToFPCall(invoke,codegen_ )
CreateFPToIntLocations(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 1
}
void CreateFPFPToFPCallLocations(allocator_)
CreateIntToFPLocationsjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
void
MoveFPToInt!
}
// And we need some temporaries. We will use REP MOVS{B,W,L}, so we need fixed registers.
MoveIntToFP( locations>(:CRSI;
}
void::(*){
CreateFPToIntLocations(allocator_>L:RCX)
}
void :(java.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 81
CreateIntToFPLocations(allocator_,staticvoid (*assembler
}
void IntrinsicCodeGeneratorX86_64: Location,
)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
void if (rhs.IsConstant java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
s64bit=();
}
static void CreateIntToIntLocations(ArenaAllocator* allocator, HInvoke* invoke) {
LocationSummary* locations _(,()java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
ions>(, Location::RequiresCoreRegister());
locations>:);
}
void IntrinsicLocationsBuilderX86_64::VisitIntegerReverseBytesjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
void IntrinsicCodeGeneratorX86_64void(_Assembler java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
codegen_->GetInstructionCodegen()-> Location,
}
void IntrinsicLocationsBuilderX86_64::VisitLongReverseBytes(HInvoke* invoke) {
CreateIntToIntLocations(llocator_,invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitLongReverseBytes(HInvoke* invoke) {
codegen_->GetInstructionCodegen()->Bswap(invoke->GetLocations()->Out
}
void IntrinsicLocationsBuilderX86_64::VisitShortReverseBytes(HInvoke* invoke) {
oke)
}
void IntrinsicCodeGeneratorX86_64: position_sign_checked {
>(-Bswapinvoke>()>(,DataType:::kInt16;
}
static GenIsInfinite(* locationsjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
boolis64bit,
CodeGeneratorX86_64* codegen) {
X86_64Assembler* assembler = codegen-> (, ( length_offset, length,slow_path>()
XmmRegister input {
CpuRegister // Calculate(rray .
NearLabel,done2java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if (is64bit) {
double kPositiveInfinity _ subl(temp,Immediate();
double kNegativeInfinity = -1 * kPositiveInfinity;
__ xorq(output, output (assembler,temp, length slow_path-GetEntryLabel);
__ comisd(input, codegen->LiteralDoubleAddress(kPositiveInfinity));
_j(kNotEqual,&)
__ j( else if (length_is_array_l)java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
_movq(utput Immediate(1);
__ __ testlpos_reg, )
__ Bind(&done1)_ j(, slow_path-GetEntryLabel(;
omisdinput -LiteralDoubleAddresskNegativeInfinity)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
ual &)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
_j( &done2;
__ movq(output, Immediate_ testl(os_reg,pos_reg);
__j(, slow_path>();
} else {
float kPositiveInfinity = std::numeric_limits<float>::java.lang.StringIndexOutOfBoundsException: Range [0, 66) out of bounds for length 5
float kNegativeInfinity = -1 */ operandsare be negative`` the differencecannotunderflow
__ xorl(output, output);
__ _ movl(temp, Address(array,length_offset))
_ __ subltemp, pos_reg);
_
__ movl(output,//Check (()-pos) > .
_ EmitCmplJLessassembler ,length,slow_path>GetEntryLabel()
}
__ comissjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
_kNotEqual&)
__ j(kParityEven, &done2);
_movlo,Immediate1;
__ Bind(&done2 SlowPathCode slow_pathjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
}
}
void IntrinsicLocationsBuilderX86_64::VisitFloatIsInfinite(HInvoke* ,
CreateFPToIntLocations(allocator_, invoke);
} Location ,
length){
SystemArrayCopyOptimizations optimizations(invoke);
}
void NearLabel conditions_on_positions_java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
CreateFPToIntLocations(allocator_, invoke/java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
}
void IntrinsicCodeGeneratorX86_64:(HInvoke invoke
GenIsInfinite(invoke->GetLocations(), /* is64bit=*/ true, codegen_); !optimizationsGetSourcePositionIsDestinationPosition)) {
}
static src_posGetConstant()java.lang.StringIndexOutOfBoundsException: Range [85, 84) out of bounds for length 88
ocationSummarylocations :(,invoke kIntrinsified;
locations->SetInAt(0, Location::RequiresFpuRegister());
-SetOut(:() :kNoOutputOverlap
}
void if (( <dest_pos_constant java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
__ j(kEqual>);
}
void IntrinsicCodeGeneratorX86_64::VisitMathSqrt(HInvoke*
mmary* invoke-GetLocations()
XmmRegister in = if (!optimizations.G) java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
=locations-Out(sFpuRegister<mmRegister>)
embler)>(ut )
}
static _ (.<>(,Immediatesrc_pos_constantjava.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
HInvoke invokejava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
const CodeGeneratorX86_64 (optimizations.GetDestinationIsSource) {
on support
if (!codegen-> j(kNotEqual, &conditions_on_positions_validated
turn;
}
CreateFPToFPLocationsallocator ;
}
static(HInvoke ,X86_64Assembler*assembler int round_mode java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
DCHECK(-WillCall);
XmmRegister in = locations->InAt(0).AsFpuRegister<java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 0
XmmRegister out = locations->Out / the isnull
(ut,in, (round_mode)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
void IntrinsicLocationsBuilderX86_64::VisitMathCeil(HInvoke* invoke}
CreateSSE41FPToFPLocations(allocator_
}
void IntrinsicCodeGeneratorX86_64:(*invoke){
GenSSE41FPToFPIntrinsic(invoke, GetAssembler// Bail out if the destination is null.
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
void java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 3
// thelength is negative bail out.
}
void(length.( &
GenSSE41FPToFPIntrinsic(invoke, GetAssembler(), 1);
}
void IntrinsicLocationsBuilderX86_64::VisitMathRint(HInvoke* invoke) {
CreateSSE41FPToFPLocations(allocator_, invoke, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitMathRint(HInvoke* invoke!ptimizations.etCountIsDestinationLength java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
GenSSE41FPToFPIntrinsicinvoke,GetAssembler() 0)
}
_jk,slow_pathjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
const*c) {
// Do we have instruction support?
if (!codegen-> java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 66
return;
}
LocationSummary* locations = LocationSummary::CreateNoCall(allocator, invoke, kIntrinsified);
At0,Location:()
locations->SetOut(Location::RequiresCoreRegister());
locations->AddTemp(Location::RequiresFpuRegister());
locations->AddTemp = locations-()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void::isitMathRoundFloatHInvoke){
_,invoke codegen_)
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
LocationSummary* locations = CpuRegister src_basejava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 77
DCHECK(! =locations>etTemp1.AsCoreRegister<>)
XmmRegister in = locations->InAt(0).AsFpuRegister<XmmRegister>();
CpuRegister -Out)AsCoreRegisterCpuRegister(;
XmmRegister t1 = locations- DCHECK_EQcountAsRegister) RCX;
XmmRegister t2 = locations->GetTemp(1)
NearLabel,done;
X86_64Assembler* assembler codegen>(low_path;
// this intrinsic is implemented as follows:
// result = floor(in);
// if (in - result >= 0.5f)
// result = result + 1.0f;
__ movss(t2, in);
_1));
__ subss(t2, t1);
_ comisst2 codegen_-LiteralFloatAddress.f);
__ j(kBelow, &java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_CheckSystemArrayCopyPosition,
__ Bind(&skip_incr);
src,
// direct x86 instruction, since NaN should map to 0 and large positive
// values need to be clipped to the extreme value.
codegen_->Load32BitValue(out, kPrimIntMax);slow_path
__ cvtsi2ss(t2, out);
_ (,t2);
__ j(kAboveEqual, &done); /*length_is_array_length=*/ false,
__ movl(out, Immediate(0)); // does not change flags
__ j(kUnordered,&)
__ cvttss2si(out, t1);
__ Bind(&done);yCopyPositionassemblerjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
void IntrinsicLocationsBuilderX86_64::java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 41
CreateSSE41FPToIntLocations(allocator_, invoke, =/false,
}/*position_sign_checked=*/ false);
void IntrinsicCodeGeneratorX86_64::VisitMathRoundDouble(HInvoke* invoke) {
LocationSummary* locations = _movlcount,length>);
DCHECK(!locations->WillCall());
XmmRegisterin=locations>()AsFpuRegister>(;
CpuRegister out = locations->Out()/ Checkassumption () is2(sed in )
const size_t :Sizet)
XmmRegister t2 = const uint32_t data_offsetmirror:::DataOffset)Uint32Value)
NearLabel skip_incr, done;
*assembler (;
// Since no direct x86 rounding instruction matches the required semantics,
ementedfollows
// result = floor(in);
// if (in - result >= 0.5)
// result = result + 1.0f;
__ movsd(t2, in);
__ roundsd(t1,in Immediate()java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
_subsd(t2,t1);
__ comisd(t2, _rep_movsw)
;
__ addsd(t1, case DataType::Type::kInt32:
__ Bind(&skip_incr);
/ Final conversion to an integer. Unfortunately this also does not have a
// direct x86 instruction, since NaN should map to 0 and large positive
default
codegen_-> (FATAL <" f intrinsic"
_}
__ comisd(t1, t2);
__ j(kAboveEqualBs-GetExitLabel);
__ movl}
__ j(kUnordered, &done); // NaN mapped to 0 (just moved in out)
/* is64bit= */ true);
__ Bind(& CreateSystemArrayCopyLocationsinvoke;
}
static voidIntrinsicCodeGeneratorX86_64:VisitSystemArrayCopyCharHInvoke*invoke)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
LocationSummary* locations =
LocationSummary::Create(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
InvokeRuntimeCallingConventioncalling_convention
locations->SetInAt(0, X86_64Assembler* assemblerGetAssembler;
java.lang.StringIndexOutOfBoundsException: Range [28, 11) out of bounds for length 49
}:( invoke java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
static void GenFPToFPCall
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
DCHECK(locations->X86_64Assembler* assemblerGetAssembler)
DCHECK(invokeSystemArrayCopyPrimitive,,codegen_ ::Int32;
codegen->InvokeRuntime(entry, invoke);
}
void IntrinsicLocationsBuilderX86_64
IntrinsicLocationsBuilderX86_64VisitSystemArrayCopyInt*)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
}
:(*invoke java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
}
void(>(){
CreateFPToFPCallLocations(allocator_, invoke);
}
void IntrinsicCodeGeneratorX86_64: }
GenFPToFPCall(invoke,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
void IntrinsicLocationsBuilderX86_64:: constexpr size_t kInitialNumTemps = 0u; // tempsexplicitly
( ;
}
void IntrinsicCodeGeneratorX86_64::VisitMathAcos(HInvoke* kLengthThreshold kInitialNumTempsjava.lang.StringIndexOutOfBoundsException: Range [50, 51) out of bounds for length 50
GenFPToFPCall(,codegen_ )
}
voidDCHECK_EQ) );
CreateFPToFPCallLocations(allocator_locations>(Location::CoreRegisterRSI);
}
void IntrinsicCodeGeneratorX86_64:: -(:CoreRegisterRDI)
>L:CoreRegisterRCX))
}
void IntrinsicLocationsBuilderX86_64::VisitMathAtan(HInvoke* invoke) {
CreateFPToFPCallLocationsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
void IntrinsicCodeGeneratorX86_64::VisitMathAtan(HInvoke* invoke// SystemArrayCopy intrinsic is the Baker-style read barriers.
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 46
}
* java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 46
void::isitMathCbrtHInvoke
CreateFPToFPCallLocations(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
}
void IntrinsicCodeGeneratorX86_64::VisitMathCbrt(HInvoke* invokeuint32_tsuper_offset=mirror::SuperClassOffset)Int32Value)
component_offset:::ComponentTypeOffset.(;
}
derX86_64:VisitMathCosh(*invoke java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
CreateFPToFPCallLocations(allocator_, invoke);
}
void CpuRegister src = locations->InAtAsCoreRegister<puRegister(;
GenFPToFPCall(invoke, codegen_, kQuickCosh); Locationsrc_pos=locations>nAt1;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void IntrinsicLocationsBuilderX86_64::VisitMathExp(HInvoke* invoke) {
CpuRegistertemp3 AsCoreRegisterCpuRegister(
}
voidSlowPathCodeintrinsic_slow_path
java.lang.StringIndexOutOfBoundsException: Range [36, 7) out of bounds for length 36
}
void IntrinsicLocationsBuilderX86_64::VisitMathExpm1.(java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
CreateFPToFPCallLocations(allocator_, invoke);
}
IntrinsicCodeGeneratorX86_64:(invoke){
GenFPToFPCall(invoke,
}
void // with nullor readingaconstantprimitivevalue ReadBarrierOptionjava.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 48
}
void IntrinsicCodeGeneratorX86_64::VisitMathLog(HInvoke* invoke) {
GenFPToFPCall(invoke, codegen_, kQuickLog); _testlt,temp;
}
void_k intrinsic_slow_path>etEntryLabel))
CreateFPToFPCallLocations(allocator_, invoke);
}
void // Checkthatthecomponenttypeisnota(Address(temp, primitive_offset), Immediate:);
GenFPToFPCallinvoke ;
}
void IntrinsicLocationsBuilderX86_64::VisitMathSinh( }
CreateFPToFPCallLocations(allocator_, invoke if(optimizationsGetDoesNotNeedTypeCheck)
}
void IntrinsicCodeGeneratorX86_64::VisitMathSinh /of dotwochecks classesarethesame
// or the destination
}
voidIntrinsicLocationsBuilderX86_64:H*){
CreateFPToFPCallLocations(allocator_, invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitMathTanif(-EmitBakerReadBarrier){
GenFPToFPCall(invoke, codegen_, kQuickTan);
}
void >
,;
}
void :(
GenFPToFPCall(invoke, codegen_, / java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 64
}
static void CreateFPFPToFPCallLocations(ArenaAllocator* // /* HeapReference<Class> */ temp2 = src->klass_
LocationSummary* locations =
LocationSummary::Createallocator,invoke,:kCallOnMainOnlyjava.lang.StringIndexOutOfBoundsException: Range [97, 96) out of bounds for length 98
InvokeRuntimeCallingConvention calling_convention // by the previous calls to GenerateFieldLoadWithBakerReadBarrier.
}{
locations->SetInAt(1, Location::FpuRegister(calling_convention.GetFpuRegisterAt(1)));
locations->SetOut(Location: _ temp1 d );
:(ocations
}
static void CreateFPFPFPToFPCallLocations(ArenaAllocator* _movltemp2,Addresss,class_offset)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
DCHECK_EQ
*locations=:(llocator,, )
InvokeRuntimeCallingConvention DCHECK(optimizations.GetDestinationIsNonPrimit;
locations>0 :()
locations->SetInAt(1, // For class match, we can typecheck theoptimizationflag
->2 :RequiresFpuRegister);
locations- / readisneededreadingachainofconstant
}
void IntrinsicLocationsBuilderX86_64
_movltemp1 temp1)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
}
:Hinvoke {
GenFPToFPCall(invoke, codegen__cmplAddresstemp1 )Immediate0)
_jkNotEqual -GetEntryLabel);
void IntrinsicLocationsBuilderX86_64::VisitMathPow(HInvoke* invoke) {
CreateFPFPToFPCallLocations(allocator_/ out thesourceisnotanonprimitivearray
}
void IntrinsicCodeGeneratorX86_64::VisitMathPow(HInvoke* invoke) {
GenFPToFPCallinvoke ;
}
void IntrinsicLocationsBuilderX86_64::VisitMathHypot(HInvoke* invoke) {
CreateFPFPToFPCallLocations(allocator_, invoke);
}
void java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
GenFPToFPCall(invoke, codegen_ !GetDestinationIsTypedObjectArray);
}
voidIntrinsicLocationsBuilderX86_64:isitMathNextAfterHInvoke*){
java.lang.StringIndexOutOfBoundsException: Range [58, 10) out of bounds for length 58
}
void else if (!optimizations.GetSourceIsNonPrimitiveArray()) {
GenFPToFPCall(invoke, codegen_, kQuickNextAfter);
} (optimizations.etDestinationIsNonPrimitiveArray);
static void CreateSystemArrayCopyLocations(HInvoke* invoke) {
constexpr int32_t copy_threshold = -1; // negative value means "ignore threshold"
constexpr size_t // with null, or forreading constant ,see`eadBarrierOption
LocationSummary :(
invoke, copy_threshold, kInitialNumTemps) _ movl(temp1, Address(src, class_offset));
if (locations != nullptr) {
// And we need some temporaries. We will use REP MOVS{B,W,L}, so we need fixed registers.
locations->AddTemp(Locationcheck_non_primitive_array_class CpuRegisterTMP)
-(ocation:CoreRegisterRDI)
locations->AddTemp(Locationjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
template <typename LhsType>
static void / constantlength:needtoemitthe atalljava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
:type=DataType::;
Location rhs,
constint32_telement_size=DataType::izetype;
static_assert(std:: const uint32_t data_offsetmirror::(element_size.(;
if
int32_t rhs_constant // Don't enter copy loop if `length == 0`.
_cmpllhs,(hs_constant)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
} else {
_cmpll,rhsAsCoreRegisterCpuRegister()
}
_jkLess ;
}
static void java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
// source address in `temp1`, `temp2` and `temp3java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 67
Location assembler dest,dest_pos
* =nullptrjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
SlowPathCodeslow_pathjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
CpuRegister temp,
bool length_is_array_length,
bool position_sign_checked) {
// Where is the length in the Array?
/ lfence;// Load fence or artificial data dependency to prevent load-load reordering
if (pos.IsConstant// // Slow-path copy.
/ {
if (pos_const == 0) {
if (!length_is_array_length // *dest_ptr++ = MaybePoison(ReadBarrier::Mark(MaybeUnpoison(*src_ptr++)));
EmitCmplJLess(assembler, Address(array, length_offset), java.lang.StringIndexOutOfBoundsException: Range [0, 70) out of bounds for length 21
}
} // *dest_ptr++ = *src_ptr++;
// Calculate length(array) - pos.
// Both operands are known to be non-negative `int32_t`, so the difference cannot underflow
// as `int32_t`. If the result is negative, the JL below shall go to the slow path.
__ movl(temp, Address(array, length_offset)); static_assertReadBarrier:)= ," -rayto have value 0"java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
_temp p);
// Check that (length(array) - pos) >= length.
EmitCmplJLess(assembler, temp, length, uint32_tgray_byte_position=LockWord: kBitsPerByte
}
} else if (length_is_array_length) {
onlywaythe copy java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 59
CpuRegister pos_reg = // if (rb_state == ReadBarrier::GrayState())
__ j(kNotEqual /java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
_ A(,monitor_offset+gray_byte_position (test_value)
// Check that pos >= 0.
CpuRegister pos_reg = pos. // Load fence to prevent load-load
if // Note that this is a no-op, thanks to the x86-64 memory model.
__ testl( >(emBarrierKind:;
__ j(kLess, slow_path-> // Slow path used to copy array when isgray.
}
// Calculate length(array) - pos.
new(>())java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 46
(->java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 64
_movl a
__ subl(temp, pos_reg_ testlargument ;
// Check that (length(array) - pos) >= length.
EmitCmplJLess(assembler, temp, length, slow_path->GetEntryLabel()) -AddSlowPath(slow_pathjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
}
static void __ Bind(slow_pathjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 37
X86_64Assembler* void IntrinsicLocationsBuilderX86_64::VisitStringEquals(HInvoke* invoke
SlowPathCodeslow_path
CpuRegister src,
l-( :()
Location src_pos,locations>(1 Location:equiresCoreRegister)
//
Location locations>ddTempLocation:()java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
SystemArrayCopyOptimizations optimizations/
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
// For overlapping arrays we can only guarantee correctness if `src_pos >= dst_pos`, otherwise
/
if (!optimizations.GetSourcePositionIsDestinationPosition(
end return_truereturn_false
int32_t src_pos_constant
if (dest_pos. // Get offsets of count CanDoImplicitNullCheckOn>())java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
int32_tdest_pos_constant=dest_posGetConstant(-(-GetValue)
if (optimizations.GetDestinationIsSource
// Checked when building locations.
DCHECK_GE(rc_pos_constant dest_pos_constant
} else if (src_pos_constant_ jkEqual &eturn_false;
_cmpls )
__ j(
}
}{
if (!optimizations.GetDestinationIsSource()) {
__ cmpl(src, dest/java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
__ j(kNotEqual, &conditions_on_positions_validated
}
__
__ j(kGreater, slow_path->java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 6
}
} else/java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
if!.(){
__ cmpl(src, dest);
__ j(kNotEqual, &conditions_on_positions_validated // Also, because we use the loaded class references only to compare them, we
}
CpuRegister src_pos_reg)
EmitCmplJLess(assembler, src_pos_reg, dest_pos, java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
_kEqual &return_true)
if (!optimizations.GetSourceIsNotNull()/ length flag ofreceiverstring
// Bail out if the source is null.rcx s,count_offset;
__ testlsrc src;
__ j(kEqual, slow_path->GetEntryLabel());
}//Twoidentical alwayshavesamecompressionstylesince
(optimizationsGetDestinationIsNotNull)& optimizationsGetDestinationIsSource)
// Bail out if the destination is null.
_ testldest, dest;
__ j(kEqual, slow_path->GetEntryLabel());
}
// If the length is negative, bail out.
// We have already checked in the LocationsBuilder for the constant case.
sConstant &
!optimizations. NearLabel string_uncompressed
!optimizations.GetCountIsDestinationLength
__ testl(length. // Different compression style is cut above.
__ k -GetEntryLabel)
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
staticvoidSystemArrayCopyPrimitive invoke
X86_64Assembler* assembler,
CodeGeneratorX86_64* java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 31
DataType }
LocationSummary*locations=-GetLocations);
CpuRegister src = locations->InAt(0) _lealrsi str ));
Location src_pos = locations-a/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
CpuRegister dest = locations->InAt(2_ ( ()java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
Location/java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
Location // or 8 characters
// Temporaries that we need for MOVSB/W/L.
CpuRegister static_assertIsAligned8(," is ";
DCHECK_EQ(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
CpuRegister dest_base = locations->GetTemp(1).AsCoreRegister<java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 18
/ inreturningfalse return truejava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
CpuRegister count = locations _movlr Immediate1);
_jmp(&end)
SlowPathCode* slow_path
codegen->AddSlowPath(slow_path);
// Check that source and position are different, or if they are the same check that copy__xorlrsi ;
CheckSystemArrayCopyNullOrOverlap(
invoke slow_path ,,src_pos ,length;
// Check that source position is within bounds. Use src_base as a temporary register.
CheckSystemArrayCopyPosition(assembler,
allocator,
src_pos,
length,LocationSummarylocations=
slow_path,
src_base,
/*length_is_array_length=*/ false,
/*position_sign_checked=*/ false);
// Check that destination position is within bounds. Use src_base as a temporary register.
CheckSystemArrayCopyPosition(assembler locations->etInAt(,Location:oreRegisterRDI)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
dest,
dest_pos,
length,
slow_pathjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
src_base,
/*length_is_array_length=*/ false,
/*position_sign_checked=*/ false);
// We need the count in RCX.
if (length.IsConstant()) {
__ movl(count, Immediate(java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 3
} else {
(count,length.sCoreRegisterCpuRegister()java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
scaswusesRCXas counter
/java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
// Check assumption that sizeof(Char) is 2 (used in scaling below).
const size_t data_sizelocations-AddTemp(ocation:RequiresCoreRegister)
uint32_t data_offset=mirror::DataOffset(data_size).)
GenArrayAddress(assembler, src_base, src, src_posstatic void GenerateStringIndexOfHInvoke*,
GenArrayAddress(assembler, dest_base, dest, dest_pos, type, data_offset);
// Do the move.
switch (type) {
case DataType::Type::kInt8:
__ rep_movsb();
break;
case DataType::Type::kUint16:
__ rep_movsw();
break;
case DataType::Type::kInt32:
_rep_movsl)
break;
default:
LOG(ATAL)< Unexpected datatypeforintrinsic;
}
());
}
void IntrinsicLocationsBuilderX86_64CpuRegisterstring_obj=-()AsCoreRegisterCpuRegisterjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
CreateSystemArrayCopyLocations(invoke); counter >()AsCoreRegisterCpuRegister(;
}
void::(Invoke ){
X86_64Assembler* assembler = GetAssembler();
SystemArrayCopyPrimitive CpuRegisterout =locations>(.AsCoreRegister<puRegister>)
}
java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
X86_64Assembler* assembler = GetAssembler();
DCHECK_EQstring_objAsRegister) RDI;
}
void IntrinsicLocationsBuilderX86_64::VisitSystemArrayCopyByte(HInvoke* invoke) {
CreateSystemArrayCopyLocationsinvoke)
}
void IntrinsicCodeGeneratorX86_64::java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
X86_64Assembler* assembler = GetAssembler();
SystemArrayCopyPrimitive(invoke, assembler, codegen_, DataType::Type: SlowPathCode =nullptrjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
}
8664::isitSystemArrayCopyIntHInvoke*invoke)java.lang.StringIndexOutOfBoundsException: Range [80, 81) out of bounds for length 80
(invoke)
}
void // Always needs the slow-java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
ier supportingthe
// SystemArrayCopy intrinsic is the Baker-style read barriers.
if() java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44
return;
}
constexpr int32_t kLengthThreshold = -()
constexprsize_tkInitialNumTemps=0u; / We shall allocate temps explicitly.
LocationSummary* locations LocationSummary* locations
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
if (locations != nullptr) {
// Add temporaries. We will use REP MOVSL, so we need fixed registers.
DCHECK_EQ(locations-java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
->ddTempLocation:CoreRegister();
locations->AddTemp(Location::CoreRegister(RCX));
}
}
void IntrinsicCodeGeneratorX86_64::__ movl(string_length, Address(string_obj, count_offset
// The only read barrier implementation supporting the
// SystemArrayCopy intrinsic is the Baker-style read barriers.
DCHECK_IMPLIES(java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
__ testl,string_length;
LocationSummary*java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
:ClassS.(;
uint32_t component_offset = mirror::Class::ComponentTypeOffset().Int32Value();
uint32_t primitive_offset = mirror::_ kGreaterEqual, ¬_found_label);
uint32_t monitor_offset = mirror::Object
CpuRegister src = locations->InAt(0).AsCoreRegister<CpuRegister>();
Location src_pos = locations->InAt}elsejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
Location dest_pos = locations->InAt(3);
Location length locations-InAt(4)
Location temp1_loc _ counter (tring_length ,ScaleFactor:, 0);
CpuRegister temp1 = temp1_loc.AsCoreRegister<CpuRegister>();
Location temp2_loc = locations->java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
CpuRegister temp2 = NearLabeluncompressed_string_comparison
Location=java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 45
CpuRegister temp3 = temp3_loc.AsCoreRegister<java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
&)
new (codegen_- /Everything isset for scaswjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
codegen_>()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
// Check that source and position are different, or if they are the same check that copyLocationSummaryk )java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
/
CheckSystemArrayCopyNullOrOverlap(
src,,src_pos dest_pos )
SystemArrayCopyOptimizations optimizations>java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 85
// Check that source position is within bounds.
CheckSystemArrayCopyPosition(assembler,
,
src_pos,
length,
intrinsic_slow_path,
temp1,
optimizations. -InAt(0).AsCoreRegisterCpuRegister>(java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
// Check that destination position is within bounds.
bool locations->SetOut:java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 49
dest,
,
length,
intrinsic_slow_path,
// java.lang.StringFactory.newStr( offset, charCount char]data)
optimizations.GetCountIsDestinationLength(
dest_position_sign_checked);
auto check_non_primitive_array_class =CheckEntrypointTypes, * int32_t ,void>)
// with null, or for reading a constant primitive value, see `ReadBarrierOption`.
// /* HeapReference<Class> */ temp = klass->component_type_
_movltemp (,component_offset)
__ MaybeUnpoisonHeapReference(temp);
// Check that the component type is not null.
__ testl(temp, LocationSummary :(
__ j(kEqual, intrinsic_slow_path->GetEntryLabel());
)IntrinsicSlowPathX86_64invoke);
__ cmpw(Address(temp, primitive_offset), Immediate(Primitive::kPrimNot));
-AddSlowPathslow_path;
};
if (!optimizations.GetDoesNotNeedTypeCheck()) {
// Check whether all elements of the source array are assignable to the component
classes arethe same,
// or the destination is Object[]. If none of these checks succeed, we go to the
// slow path.
if (codegen_->EmitBakerReadBarrier( __Bindslow_path-GetExitLabel
// /* HeapReference<Class> */ temp1 = dest->klass_
codegen_->GenerateFieldLoadWithBakerReadBarrier(
,temp1_loc dest,, *needs_null_check *false;
// Register `temp1` is not trashed by the read barrier emitted
// by GenerateFieldLoadWithBakerReadBarrier below, as that
// method produces a call to a ReadBarrierMarkRegX entry point,
java.lang.StringIndexOutOfBoundsException: Range [41, 6) out of bounds for length 62
// temporaries such a `temp1`.
// /* HeapReference<Class> */ temp2 = src->klass_
(
invoke, temp2_loc, src, class_offset > :()
enabled beenunpoisoned
// by the previous calls to GenerateFieldLoadWithBakerReadBarrier.
// And we need some temporaries. We will use REP MOVSW, so we need fixed registers.
// /* HeapReference<Class> */ temp1 = dest->klass_
_temp1 (est );
__ MaybeUnpoisonHeapReference(temp1);
// /* HeapReference<Class> */ temp2 = src->klass_
_movl,Addresssrc );
__ MaybeUnpoisonHeapReference(temp2);
}
__ cmpl(temp1, temp2);
if (optimizations
DCHECK(optimizations.
NearLabel void IntrinsicCodeGeneratorX86_64::VisitStringGetCharsNoCheck(HInvoke* invoke) {
// For class match, we can skip the source type check regardless of the optimization flag.
_ (Equal do_copy;
// No read barrier is needed for reading a chain of constant references
// for comparing with null, see `ReadBarrierOption`.size_tchar_component_size:Size(ataType:::)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
<Class> */ temp1 = temp1->component_type_
_ .
__ const uint32_t value_offset = mirror:().(;
// No need to unpoison the following heap reference load, as
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
_ A(emp1 super_offset, Immediate0);
__ j(kNotEqualLocation srcBegin = locations>nAt();
// Bail out if the source is not a non primitive array.
=
check_non_primitive_array_class(temp2, CpuRegister(TMP));
}
__ Bind(&do_copy);
} else {
DCHECK(!optimizations.GetDestinationIsTypedObjectArray()); -InAt3.<)
=locations->InAt(4).AsCoreRegister<CpuRegister>();
// and destination is known to be a non primitive array, otherwise one check is enough.
__ j(kNotEqual, intrinsic_slow_path->GetEntryLabel());
() &&
!optimizations.GetSourceIsNonPrimitiveArray(DCHECK_EQchar_size u;
check_non_primitive_array_class(temp2, CpuRegister(TMP));
}
}
} else // Compthenumberofmovejava.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49
()
// Bail out if the source is not a non primitive array.
forjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 89
// /* HeapReference<Class> */ temp1 = src->klass_
t (rc lass_offset)
__ MaybeUnpoisonHeapReference(temp1);
check_non_primitive_array_classt,CpuRegister;
}
if if (length.
// Null constant length: not need to emit the loop code at all. :VisitMemoryPeekShortNative ) {
(-GetLocations,DataType::ype:kInt16 GetAssembler);
const DataType::Type type = DataType::Type::kReference;
const int32_t element_size = DataType::Size(type);
const uint32_tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Don't enter copy loop if `length == 0`.
NearLabelskip_copy_and_write_barrier
if (!length.IsConstant()) {
_ testll.sCoreRegisterCpuRegister(,length<>()
__ j(kEqual, &skip_copy_and_write_barrier);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// Compute base source address, base destination address, and end
// source address in `temp1`, `temp2` and `temp3` respectively.
CpuRegister address>0.sCoreRegister<>)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
GenArrayAddress(assembler, temp2, dest, dest_pos, type, // x86 allows unaligned access. We do not have to check the input specific instructions
SlowPathCode* read_barrier_slow_path = nullptr;
if(-() java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
// SystemArrayCopy implementation for Baker read barriers (see
f(.sConstant) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
// if (src_ptr != end_ptr) {
// uint32_t rb_state = Lockword(src->monitor_).ReadBarrierState();
/lfence /Loadfence datadependency -reordering
// bool is_gray = (rb_state == ReadBarrier::GrayState());
// if (is_gray) {
// do {
case::kInt16
// } while (src_ptr != end_ptr)
// } else {
/ - .
// do {
// } while (src_ptr != end_ptr)
// }
// }
// Given the numeric representation, it's enough to check the low bit of the rb_state.
{
static_assert(ReadBarrier::GrayState() == _movwAddressaddress ) valueAsCoreRegisterCpuRegister()java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
constexprcase:T::
constexpr v.sConstant){
constexpr int32_t test_value = static_cast<int8_t>(1 << gray_bit_position_movl(Address(,0)
// if (rb_state == ReadBarrier::GrayState())
// goto slow_path;
// At this point, just do the "if" and make sure that flags are preserved until the branch.
__ testb(Address(src ;
// Load fence to prevent load-load reordering.
// Note that this is a no-op, thanks to the x86-64 memory model.
codegen_->GenerateMemoryBarrier(MemBarrierKind::kLoadAnyint64_t value.etConstant)>()->GetValue)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
// Slow path used to copy array when `src` is gray.
read_barrier_slow_pathjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
new (codegen_->GetScopedAllocator()_ (ddress(,,valueAsCoreRegisterCpuRegister();
codegen_}
// We have done the "if" of the gray bit check above, now branch based on the flags.
__ (FATAL < "Type notrecognized poke:" <size;
}
if (length.IsConstant()) {
__ movl(temp3, Immediate}
} else {
__ movl(temp3, length.AsCoreRegistervoid IntrinsicLocationsBuilderX86_64V(*){
}
// Iterate over the arrays and do a raw copy of the objects. We don't need to poison/unpoison.
DCHECK_EQ(temp1.AsRegister(), RSI
IntrinsicCodeGeneratorX86_64VisitMemoryPokeByte(HInvoke*invoke){
GenPoke(invoke( :Type:,GetAssembler);
__ rep_movsl();
if (read_barrier_slow_path != nullptr) {
(-EmitBakerReadBarrier);
__ Bind(CreateIntIntToVoidLocations,invoke)
}
// We only need one card marking on the destination array.
(temp1 , dest)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
__ java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
}
_(,invoke;
}
voidIntrinsicLocationsBuilderX86_64::VisitStringCompareTo(HInvoke* invoke) {
LocationSummary* locations = LocationSummary::Create(
allocator_, invoke, LocationSummary::kCallOnMainAndSlowPath, void IntrinsicCodeGeneratorX86_64::VisitMemoryPokeLongNative(HInvoke*
GenPoke(invoke->GetLocations) DataType::::Int64,GetAssembler);
locations->SetInAt(0, Location::CoreRegister(calling_convention.GetRegisterAt(0void IntrinsicLocationsBuilderX86_64:VisitMemoryPokeShortNative(HInvoke* invoke) {
locations->SetInAt(1, Location::CoreRegister(calling_convention.java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 50
locations->SetOut(Location::}
}
void IntrinsicCodeGeneratorX86_64::VisitStringCompareTo(HInvoke* invoke) {
X86_64Assembler* GetAssembler();
LocationSummary* locations = invoke->GetLocations();
// Note that the null check must have been done earlier.
DCHECK!invoke-CanDoImplicitNullCheckOn(-())
CpuRegister argument = locations->InAt(1).AsCoreRegister<void IntrinsicLocationsBuilderX86_64::VisitThreadCurrentThread(HInvoke{
__ testl(argument, argument);
lowPathCode* ()(nvoke;
codegen_->AddSlowPath(slow_path);
__ (kEqual slow_path>();
codegen_->InvokeRuntime(kQuickStringCompareTo, invoke, slow_pathjava.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
_ Bind(low_path-GetExitLabel);
}
void IntrinsicLocationsBuilderX86_64::VisitStringEquals(HInvoke* invoke) {
ocations=LocationSummary:CreateNoCallallocator_, invoke, kIntrinsified)
locations->SetInAt(0, Address:Absolute(Thread:CurrentPeerOffsetkX86_64PointerSize>)
locations/* no_rip=* );
// Request temporary registers, RCX and RDI needed for repe_cmpsq instruction.
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
locations->AddTemp(Location::CoreRegister(RDI));
// Set output, RSI needed for repe_cmpsq instruction anyways.
:kOutputOverlap;
}
voidIntrinsicCodeGeneratorX86_64:VisitStringEqualsHInvoke*invoke){
X86_64Assembler* assembler = GetAssembler();
LocationSummary*locations invoke-GetLocations)java.lang.StringIndexOutOfBoundsException: Range [54, 55) out of bounds for length 54
CpuRegister str = base_loc =locations-InAt1);
CpuRegister arg = locations->InAt(1).AsCoreRegister<CpuRegister>();
java.lang.StringIndexOutOfBoundsException: Range [56, 2) out of bounds for length 72
CpuRegister rdiloc=locations>(2)
CpuRegister CpuRegister offsetoffset_locAsCoreRegister<CpuRegister>();
NearLabel end, return_true, return_false;
// Get offsets of count, value, and class fields within a string object.
constuint32_tcount_offset mirror::String:CountOffset(.Uint32Value)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
const uint32_t value_offset = mirror switch(ype {
const caseDataType:Type::
/java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
DCHECK(!invokebreak;
StringEqualsOptimizations optimizations(invoke);
!optimizations.etArgumentNotNull) {
// Check if input is null, return false if it is.
__ testl(arg, arg);
__ j(kEqual, &return_false);
}
if (!optimizations.GetArgumentIsString :Type::: {
checkfor bycomparingclassfields.
// All string objects must have the same type since String cannot be subclassed.
// Receiver must be a string object, so its class field is equal to all strings' class fields.
// If the argument is a string object, its class field must be equal to receiver's class field.
//
// As the String class is expected to be non-movable, we can read the class
/ fromStringe'arguments .
AssertNonMovableStringClass();
// Also, because we use the loaded class references only to compare them, we
// /* HeapReference<Class> */ rcx = str->klass_
__ movl(rcx, Address(str, class_offset));
/ r =/* HeapReference<Class> */ arg->klass_) return false
__ j(kNotEqual, &return_false);
}
// Reference equality check, return true if same reference.
__ cmpl(str, arg);
__ j(kEqual, &return_true);
// Load length and compression flag of receiver string.
__ movl(rcx, Address(str, count_offset));
// Check if lengths and compressiond flags are equal, return false if they're not.
// Two identical strings will always have same compression style since
// compression style is decided on alloc.
__ cmpl(rcx, Address(arg, count_offset));
__ j(kNotEqual, &return_false);
// Return true if both strings are empty. Even with string compression `count == 0` means empty.
static_assert(static_cast<uint32_t>(mirror::StringCompressionFlag::kCompressed) == 0u,
"Expecting 0=compressed, 1=uncompressed");
__ jrcxz(&return_true);
if (mirror::kUseStringCompression) {
NearLabel string_uncompressed;
// Extract length and differentiate between both compressed or both uncompressed.
// Different compression style is cut above.
__ shrl(rcx, Immediate(1));
__ j(kCarrySet, &string_uncompressed);
// Divide string length by 2, rounding up, and continue as if uncompressed.
// Merge clearing the compression flag with +1 for rounding.
__ addl(rcx, Immediate(1));
__shrl, Immediate(1);
__ Bind(&string_uncompressed);
}
// Load starting addresses of string values into RSI/RDI as required for repe_cmpsq instruction.
__ leal(rsi, Address(str, value_offset
__ IntrinsicLocationsBuilderX86_64:VisitUnsafeGetAbsolute(HInvoke*invoke){
/ Divide string length by 4 and adjust for lengths not divisible by 4.
__ addl(rcx, Immediate(3));
__ shrl(rcx, Immediate(2));
// Assertions that must hold in order to compare strings 4 characters (uncompressed) :VisitUnsafeGetVolatileHInvoke invoke java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
/ or characters (ompressed)a a time.
DCHECK_ALIGNED(value_offset, 8);
static_assert( VisitJdkUnsafeGetLongjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 32
fourcharacters at a the beginning of the stringjava.lang.StringIndexOutOfBoundsException: Range [95, 96) out of bounds for length 95
__ repe_cmpsq();}
// If strings are not equal, zero flag will be cleared.
__ j(kNotEqual, &return_false);
// Return true and exit the function.
// If loop does not result in returning false, we return true.
);
__ movl(rsi, Immediate(1));
__ jmp(&end);
// Return false and exit the function.
_);
__ xorl(rsi, rsiinvokejava.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
__ Bind(&end);
}
java.lang.StringIndexOutOfBoundsException: Range [40, 6) out of bounds for length 57
ArenaAllocator* allocator,
boolstart_at_zero){
LocationSummary* locations =
CreateIntIntToIntLocations(allocator_, invoke);
in RDI for scasw.So request that the stringis there anyways.
locations->SetInAt(0, Location::CoreRegister(RDI));
// If we look for a constant char, we'll still have to copy it into RAX. So just request the
// allocator to do that, anyways. We can still do the constant check by checking the parameter
// of the instruction explicitly.
// Note: This works as we don't clobber RAX anywhere.
locations->SetInAt(1, Location::CoreRegister(RAX));
if (!start_at_zero) {
locations->SetInAt(2, Location::RequiresCoreRegister()); // The starting index.
}
// As we clobber RDI during execution anyways, also use it as the output.
locations->SetOut(Location::SameAsFirstInput());
// repne scasw uses RCX as the counter.
locations->AddTemp(Location::CoreRegister(RCX));
// Need another temporary to be able to compute the result.
locations->AddTemp(Location::RequiresCoreRegister());
}
static(HInvoke* invoke,
X86_64Assembler* assembler,
CodeGeneratorX86_64* codegen,
bool start_at_zero) {
LocationSummary* locations = invoke->GetLocations();
// Note that the null check must have been done earlier.
DCHECK(!invoke-IntrinsicLocationsBuilderX86_64:(*
CpuRegister string_obj = locations->InAt(0).AsCoreRegister<CpuRegister>();
CpuRegister search_value = locations->InAt(1).AsCoreRegister<CpuRegistervoid IntrinsicLocationsBuilderX86_64::VisitJdkUnsafeGetLongAcquire(HInvoke* invoke) {
CpuRegister counter = locations->GetTemp(0) CreateIntIntIntToIntLocations(allocator_, invoke, codegen_);
CpuRegister string_length = locations->GetTemp(1).java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 1
locations>(.AsCoreRegister<CpuRegister()java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
// Check our assumptions for registers.
DCHECK_EQ(string_obj.AsRegister(), RDI);
DCHECK_EQ(search_value.AsRegister(), RAX);
DCHECK_EQ(counter.AsRegister(), RCX);
DCHECK_EQ(out.AsRegister(), RDI);
// Check for code points > 0xFFFF. Either a slow-path check when we don't know statically,
// or directly dispatch for a large constant, or omit slow-path for a small constant or a char.
SlowPathCode* slow_path = nullptr;
HInstruction* code_point = invoke->InputAt(1);
if (code_point->IsIntConstant()) {
if (static_cast<uint32_t>(code_point->AsIntConstant()->GetValue()) >
std::numeric_limits<uint16_t>::max()) {
// Always needs the slow-path. We could directly dispatch to it, but this case should be
// rare, so for simplicity just put the full slow-path down and branch unconditionally.
slow_path = new (codegen->GetScopedAllocator()) IntrinsicSlowPathX86_64(invoke);
codegen->AddSlowPath(slow_path);
__ jmp(slow_path->GetEntryLabel());
__ Bind(slow_path->GetExitLabel());
return;
}
} else if (code_point->GetType() != DataType::Type::kUint16) {
__ cmpl(search_value, Immediate(std::numeric_limits<uint16_t>::max()));
slow_path = new (codegen->GetScopedAllocator()) IntrinsicSlowPathX86_64(invoke);
codegen->AddSlowPath(slow_path);
__ j(kAbove, slow_path->GetEntryLabel());
}
// From here down, we know that we are looking for a char that fits in
// 16 bits (uncompressed) or 8 bits (compressed).
// Location of reference to data array within the String object.
int32_t value_offset = mirror::String::ValueOffset().Int32Value();
// Location of count within the String object.
int32_t count_offset = mirror::String::CountOffset().Int32Value();
// Load the count field of the string containing the length and compression flag.
__ movl(string_length, Address(string_obj, count_offset));
// Do a zero-length check. Even with string compression `count == 0` means empty.
// TODO: Support jecxz.
NearLabel not_found_label;
__ testl(string_length, string_length);
__ j(kEqual, ¬_found_label);
if (mirror::kUseStringCompression) {
// Use TMP to keep string_length_flagged.
__ movl(CpuRegister(TMP), string_length);
// Mask out first bit used as compression flag.
__ shrl(string_length, Immediate(1));
}
if (start_at_zero) {
// Number of chars to scan is the same as the string length.
__ movl(counter, string_length);
// Move to the start of the string.
__ addq(string_obj, Immediate(value_offset));
} else {
CpuRegister start_index = locations->InAt(2).AsCoreRegister<CpuRegister>();
// Do a start_index check.
__ cmpl(start_index, string_length);
__ j(kGreaterEqual, ¬_found_label);
// Ensure we have a start index >= 0;
__ xorl(counter, counter);
__ cmpl(start_index, Immediate(0));
__ cmov(kGreater, counter, start_index, /* is64bit= */ false); // 32-bit copy is enough.
if (mirror::kUseStringCompression) {
NearLabel modify_counter, offset_uncompressed_label;
__ testl(CpuRegister(TMP), Immediate(1));
__ j(kNotZero, &offset_uncompressed_label);
__ leaq(string_obj, Address(string_obj, counter, ScaleFactor::TIMES_1, value_offset));
__ jmp(&modify_counter);
// Move to the start of the string: string_obj + value_offset + 2 * start_index.
__ Bind(&offset_uncompressed_label);
__ leaq(string_obj, Address(string_obj, counter, ScaleFactor::TIMES_2, value_offset));
__ Bind(&modify_counter);
} else {
__ leaq(string_obj, Address(string_obj, counter, ScaleFactor::TIMES_2, value_offset));
}
// Now update ecx, the work counter: it's gonna be string.length - start_index.
__ negq(counter); // Needs to be 64-bit negation, as the address computation is 64-bit.
__ leaq(counter, Address(string_length, counter, ScaleFactor::TIMES_1, 0));
}
if (mirror::kUseStringCompression) {
NearLabel uncompressed_string_comparison;
NearLabel comparison_done;
__ testl(CpuRegister(TMP), Immediate(1));
__ j(kNotZero, &uncompressed_string_comparison);
// Check if RAX (search_value) is ASCII.
__ cmpl(search_value, Immediate(127));
__ j(kGreater, ¬_found_label);
// Comparing byte-per-byte.
__ repne_scasb();
__ jmp(&comparison_done);
// Everything is set up for repne scasw:
// * Comparison address in RDI.
// * Counter in ECX.
__ Bind(&uncompressed_string_comparison);
__ repne_scasw();
__ Bind(&comparison_done);
} else {
__ repne_scasw();
}
// Did we find a match?
__ j(kNotEqual, ¬_found_label);
// Yes, we matched. Compute the index of the result.
__ subl(string_length, counter);
__ leal(out, Address(string_length, -1));
NearLabel done;
__ jmp(&done);
// Failed to match; return -1.
__ Bind(¬_found_label);
__ movl(out, Immediate(-1));
// And join up at the end.
__ Bind(&done);
if (slow_path != nullptr) {
__ Bind(slow_path->GetExitLabel());
}
}
void IntrinsicLocationsBuilderX86_64::VisitStringIndexOf(HInvoke* invoke) {
CreateStringIndexOfLocations(invoke, allocator_, /* start_at_zero= */ true);
}
void IntrinsicCodeGeneratorX86_64::VisitStringIndexOf(HInvoke* invoke) {
GenerateStringIndexOf(invoke, GetAssembler(), codegen_, /* start_at_zero= */ true);
}
void IntrinsicLocationsBuilderX86_64::VisitStringIndexOfAfter(HInvoke* invoke) {
CreateStringIndexOfLocations(invoke, allocator_, /* start_at_zero= */ false);
}
void IntrinsicCodeGeneratorX86_64::VisitStringIndexOfAfter(HInvoke* invoke) {
GenerateStringIndexOf(invoke, GetAssembler(), codegen_, /* start_at_zero= */ false);
}
void IntrinsicLocationsBuilderX86_64::VisitStringNewStringFromBytes(HInvoke* invoke) {
LocationSummary* locations = LocationSummary::Create(
allocator_, invoke, LocationSummary::kCallOnMainAndSlowPath, kIntrinsified);
InvokeRuntimeCallingConvention calling_convention;
locations->SetInAt(0, Location::CoreRegister(calling_convention.GetRegisterAt(0)));
locations->SetInAt(1, Location::CoreRegister(calling_convention.GetRegisterAt(1)));
locations->SetInAt(2, Location::CoreRegister(calling_convention.GetRegisterAt(2)));
locations->SetInAt(3, Location::CoreRegister(calling_convention.GetRegisterAt(3)));
locations->SetOut(Location::CoreRegister(RAX));
}
void IntrinsicCodeGeneratorX86_64::VisitStringNewStringFromBytes(HInvoke* invoke) {
X86_64Assembler* assembler = GetAssembler();
LocationSummary* locations = invoke->GetLocations();
CpuRegister byte_array = locations->InAt(0).AsCoreRegister<CpuRegister>();
__ testl(byte_array, byte_array);
SlowPathCode* slow_path = new (codegen_->GetScopedAllocator()) IntrinsicSlowPathX86_64(invoke);
codegen_->AddSlowPath(slow_path);
__ j(kEqual, slow_path->GetEntryLabel());
codegen_->InvokeRuntime(kQuickAllocStringFromBytes, invoke);
CheckEntrypointTypes<kQuickAllocStringFromBytes, void*, void*, int32_t, int32_t, int32_t>();
__ Bind(slow_path->GetExitLabel());
}
void IntrinsicLocationsBuilderX86_64::VisitStringNewStringFromChars(HInvoke* invoke) {
LocationSummary* locations =
LocationSummary::Create(allocator_, invoke, LocationSummary::kCallOnMainOnly, kIntrinsified);
InvokeRuntimeCallingConvention calling_convention;
locations->SetInAt(0, Location::CoreRegister(calling_convention.GetRegisterAt(0)));
locations->SetInAt(1, Location::CoreRegister(calling_convention.GetRegisterAt(1)));
locations->SetInAt(2, Location::CoreRegister(calling_convention.GetRegisterAt(2)));
locations->SetOut(Location::CoreRegister(RAX));
}
void IntrinsicCodeGeneratorX86_64::VisitStringNewStringFromChars(HInvoke* invoke) {
// No need to emit code checking whether `locations->InAt(2)` is a null
// pointer, as callers of the native method
//
// java.lang.StringFactory.newStringFromChars(int offset, int charCount, char[] data)
//
// all include a null check on `data` before calling that method.
codegen_->InvokeRuntime(kQuickAllocStringFromChars, invoke);
CheckEntrypointTypes<kQuickAllocStringFromChars, void*, int32_t, int32_t, void*>();
}
void IntrinsicLocationsBuilderX86_64::VisitStringNewStringFromString(HInvoke* invoke) {
LocationSummary* locations = LocationSummary::Create(
allocator_, invoke, LocationSummary::kCallOnMainAndSlowPath, kIntrinsified);
InvokeRuntimeCallingConventionvoidIntrinsicLocationsBuilderX86_64::VisitJdkUnsafeGetReferenceAcquire(HInvoke* invoke) {
locations->SetInAt(0, Location::CoreRegister(calling_convention.GetRegisterAt(0)));
locations->SetOut(Location::CoreRegister(RAX));
}
void IntrinsicCodeGeneratorX86_64::VisitStringNewStringFromString(HInvoke* invoke) {
X86_64Assembler* assembler = GetAssembler();
LocationSummary* locations = invoke->GetLocations();
CpuRegister CreateIntIntIntToIntLocations ,codegen_;
__ testl(java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
SlowPathCode* slow_path = new (codegen_->GetScopedAllocator()) VisitJdkUnsafeGet(invoke)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
codegen_->AddSlowPath(slow_path);
__ j(kEqual, slow_path->GetEntryLabel());
codegen_-InvokeRuntime(kQuickAllocStringFromString;
CheckEntrypointTypes<kQuickAllocStringFromString,
__ Bind(slow_path->GetExitLabel());
}
void IntrinsicLocationsBuilderX86_64::VisitStringGetCharsNoCheckVisitJdkUnsafeGetVolatile(invoke);
// public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin);
LocationSummary* locations = LocationSummary::CreateNoCall(allocator_, invoke, kIntrinsified);
locations->SetInAt(0, Location::RequiresCoreRegister());
locations->SetInAt(1, Location:void IntrinsicCodeGeneratorX86_64::VisitUnsafeGetLong(HInvoke* invoke) {
locations->SetInAt(2, Location::RequiresCoreRegister());
locations->SetInAt(3, Location::RequiresCoreRegister());
locations->SetInAt(4, Location::RequiresCoreRegister());
/ weneed some temporaries.Wewill REPMOVSW, so need fixed registers.
(::();
locations->AddTemp(Location::CoreRegister(RDI));
locations->AddTemp(Location::CoreRegister(RCX));
atorX86_64:VisitStringGetCharsNoCheck(HInvoke*invoke) {
X86_64Assembler* assembler = GetAssembler();
LocationSummary* locations = invoke->GetLocations();
size_t char_component_size = DataTypeIntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGet(HInvoke invoke){
// Location of data in char array buffer.
constuint32_tdata_offset = mirror::Array::DataOffset(char_component_size).Uint32Value();
// Location of char array data in string.
const uint32_t value_offset = mirror::String::ValueOffsetvoid IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetAbsolute(HInvoke* invoke) {
/ public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin);
CpuRegister obj }
IntrinsicCodeGeneratorX86_64:V(*){
int srcBegin_value =
tant) ?srcBegin.GetConstant()>AsIntConstant 0;
CpuRegister srcEnd = locations->InAt(2).AsCoreRegister<CpuRegister>();
CpuRegister dst = locations->InAt(3).AsCoreRegister<CpuRegister>();
CpuRegister dstBegin = locations->InAt(4).AsCoreRegister<CpuRegister>();
// Check assumption that sizeof(Char) is 2 (used in scaling below).
constsize_t char_size =DataType:Size(ataType::Type:kUint16);
DCHECK_EQ(char_size, 2u);
NearLabel done;
// Compute the number of chars (words) to move.
__ movl(CpuRegister(RCX), srcEnd);
if(.IsConstant() {
__ subl(CpuRegister(RCX), Immediate(srcBegin_value));
} else {
DCHECK(srcBegin.IsCoreRegister())v IntrinsicCodeGeneratorX86_64:isitJdkUnsafeGetLongVolatileHInvoke*invoke java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
__ subl(CpuRegister(RCX), srcBegin.AsCoreRegister<CpuRegister>());
}
if (mirror::kUseStringCompression) {
NearLabel copy_uncompressed, copy_loop GenUnsafeGet(invoke,DataType::Type::kInt64, /*is_volatile=*/ true, codegen_);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
DCHECK_EQ(c_char_size, 1u);
in string.
const uint32_t java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 1
__ testl(Address(obj, count_offset), Immediate(1));
static_assert(static_cast<uint32_t>(mirror::StringCompressionFlag::kCompressed) == 0u,
, 1=ncompressed";
_ j(kNotZero,©_uncompressed);
// Compute the address of the source string by adding the number of chars from
__ leaq(CpuRegister(RSI),
A(bj,,TIMES_1,);
// Start the loop to copy String's value to Array of Char.(,DataType:Type:kInt8,/
__ leaq}
__ Bindstatic CreateIntIntIntToVoidPlusTempsLocations(ArenaAllocator ,
&)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
rom RSItoword.
// TODO: Selecting RAX as the temporary and using LODSB/STOSW.
(RSI), 0));
__ movw(Address(CpuRegister(RDI), 0), CpuRegister(TMP));
__ leaq locations-SetInAt(, Location:NoLocation(); // Unused receiver.
erR)Address(CpuRegister(RSI), c_char_size));
// TODO: Add support for LOOP to X86_64Assembler.
(puRegister(RCX) ();
__ jmp(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(ArenaAllocator allocator,
_ Bind(c);
}
__ leaq(CpuRegister(RSI),
CodeGeneratorX86_64::ArrayAddress(obj, srcBegin, TIMES_2, value_offset));
/ address buffer.
__ leaq(SetInAt2 :()
// Do the move.
_rep_movsw(;
_ (done)
}
static void GenPeek(LocationSummary* locations, locations->ddTemp(Location:();
address locations-InAt().sCoreRegisterCpuRegister>)
CpuRegister out = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 3
// x86 allows unaligned access. We do not have to check the input or use specific instructions
// to avoid a SIGBUS.
switch (size) {
case DataType::Type::kInt8:
__ movsxb(out, Address(address, 0));
break;
case DataType::Type::kInt16:
__ movsxw(out, Address(address, 0));
break;
case DataType::Type::kInt32:
__ movl(out, Address(address, 0));
break;
case DataType::Type::kInt64:
__ movq(out, Address(address, 0));
break;
default:
LOG(FATAL) << "Type not recognized for peek: " << size;
UNREACHABLE();
}
}
void IntrinsicLocationsBuilderX86_64::VisitMemoryPeekByte(HInvoke* invoke) {
CreateIntToIntLocations(allocator_, invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitMemoryPeekByte(HInvoke* invoke) {
GenPeek(invoke->GetLocations(), DataType::Type::kInt8, GetAssembler());
}
void IntrinsicLocationsBuilderX86_64::VisitMemoryPeekIntNative(HInvoke* invoke) {
CreateIntToIntLocations(allocator_, invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitMemoryPeekIntNative(HInvoke* invoke) {
GenPeek(invoke->GetLocations(), DataType::Type::kInt32, GetAssembler());
}
void IntrinsicLocationsBuilderX86_64::VisitMemoryPeekLongNative(HInvoke* invoke) {
CreateIntToIntLocations(allocator_, invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitMemoryPeekLongNative(HInvoke* invoke) {
GenPeek(invoke->GetLocations(), DataType::Type::kInt64, GetAssembler());
}
void IntrinsicLocationsBuilderX86_64::VisitMemoryPeekShortNative(HInvoke* invoke) {
CreateIntToIntLocations(allocator_, invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitMemoryPeekShortNative(HInvoke* invoke) {
GenPeek(invoke->GetLocations(), DataType::Type::kInt16, GetAssembler());
}
static void CreateIntIntToVoidLocations(ArenaAllocator* allocator, HInvoke* invoke) {
LocationSummary* locations = LocationSummary::CreateNoCall(allocator, invoke, kIntrinsified);
locations->SetInAt(0, Location::RequiresCoreRegister());
locations->SetInAt(1, Location::RegisterOrInt32Constant(invoke->InputAt(1)));
}
static void GenPoke(LocationSummary* locations, DataType::Type size, X86_64Assembler* assembler) {
CpuRegister address = locations->InAt(0).AsCoreRegister<CpuRegister>();
Location value = locations->InAt(1);
// x86 allows unaligned access. We do not have to check the input or use specific instructions
// to avoid a SIGBUS.
switch (size) {
case DataType::Type::kInt8:
if (value.IsConstant()) {
__ movb(Address(address, 0), Immediate(CodeGenerator::GetInt8ValueOf(value.GetConstant())));
} else {
__ movb(Address(address, 0), value.AsCoreRegister<CpuRegister>());
}
break;
case DataType::Type::kInt16:
if (value.IsConstant()) {
__ movw(Address(address, 0),
Immediate(CodeGenerator::GetInt16ValueOf(value.GetConstant())));
} else {
__ movw(Address(address, 0), value.AsCoreRegister<CpuRegister>());
}
break;
case DataType::Type::kInt32:
if (value.IsConstant()) {
__ movl(Address(address, 0),
Immediate(CodeGenerator::GetInt32ValueOf(value.GetConstant())));
} else {
__ movl(Address(address, 0), value.AsCoreRegister<CpuRegister>());
}
break;
case DataType::Type::kInt64:
if (value.IsConstant()) {
int64_t v = value.GetConstant()->AsLongConstant()->GetValue();
DCHECK(IsInt<32>(v));
int32_t v_32 = v;
__ movq(Address(address, 0), Immediate(v_32));
} else {
__ movq(Address(address, 0), value.AsCoreRegister<CpuRegister>());
}
break;
default:
LOG(FATAL) << "Type not recognized for poke: " << size;
UNREACHABLE();
}
}
void IntrinsicLocationsBuilderX86_64::VisitMemoryPokeByte(HInvoke* invoke) {
CreateIntIntToVoidLocations(allocator_, invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitMemoryPokeByte(HInvoke* invoke) {
GenPoke(invoke->GetLocations(), DataType::Type::kInt8, GetAssembler());
}
void IntrinsicLocationsBuilderX86_64::VisitMemoryPokeIntNative(HInvoke* invoke) {
CreateIntIntToVoidLocations(allocator_, invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitMemoryPokeIntNative(HInvoke* invoke) {
GenPoke(invoke->GetLocations(), DataType::Type::kInt32, GetAssembler());
}
void IntrinsicLocationsBuilderX86_64::VisitMemoryPokeLongNative(HInvoke* invoke) {
CreateIntIntToVoidLocations(allocator_, invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitMemoryPokeLongNative(HInvoke* invoke) {
GenPoke(invoke->GetLocations(), DataType::Type::kInt64, GetAssembler());
}
void IntrinsicLocationsBuilderX86_64::VisitMemoryPokeShortNative(HInvoke* invoke) {
CreateIntIntToVoidLocations(allocator_, invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitMemoryPokeShortNative(HInvoke* invoke) {
GenPoke(invoke->GetLocations(), DataType::Type::kInt16, GetAssembler());
}
void IntrinsicLocationsBuilderX86_64::VisitThreadCurrentThread(HInvoke* invoke) {
LocationSummary* locations = LocationSummary::CreateNoCall(allocator_, invoke, kIntrinsified);
locations->SetOut(Location::RequiresCoreRegister());
}
void IntrinsicCodeGeneratorX86_64::VisitThreadCurrentThread(HInvoke* invoke) {
CpuRegister out = invoke->GetLocations()->Out().AsCoreRegister<CpuRegister>();
GetAssembler()->gs()->movl(out,
Address::Absolute(Thread::CurrentPeerOffset<kX86_64PointerSize>(),
/* no_rip= */ true));
}
static void GenUnsafeGet(HInvoke* invoke,
DataType::Type type,
[[maybe_unused]] bool is_volatile,
CodeGeneratorX86_64* codegen) {
X86_64Assembler* assembler = down_cast<X86_64Assembler*>(codegen->GetAssembler());
LocationSummary* locations = invoke->GetLocations();
Location base_loc = locations->InAt(1);
CpuRegister base = base_loc.AsCoreRegister<CpuRegister>();
Location offset_loc = locations->InAt(2);
CpuRegister offset = offset_loc.AsCoreRegister<CpuRegister>();
Location output_loc = locations->Out();
CpuRegister output = output_loc.AsCoreRegister<CpuRegister>();
switch (type) {
case DataType::Type::kInt8:
__ movsxb(output, Address(base, offset, ScaleFactor::TIMES_1, 0));
break;
case DataType::Type::kInt32:
__ movl(output, Address(base, offset, ScaleFactor::TIMES_1, 0));
break;
case DataType::Type::kReference: {
if (codegen->EmitReadBarrier()) {
if (kUseBakerReadBarrier) {
Address src(base, offset, ScaleFactor::TIMES_1, 0);
codegen->GenerateReferenceLoadWithBakerReadBarrier(
invoke, output_loc, base, src, /* needs_null_check= */ false);
} else {
__ movl(output, Address(base, offset, ScaleFactor::TIMES_1, 0));
codegen->GenerateReadBarrierSlow(
invoke, output_loc, output_loc, base_loc, 0U, offset_loc);
}
} else {
__ movl(output, Address(base, offset, ScaleFactor::TIMES_1, 0));
__ MaybeUnpoisonHeapReference(output);
}
break;
}
case DataType::Type::kInt64:
__ movq(output, Address(base, offset, ScaleFactor::TIMES_1, 0));
break;
default:
LOG(FATAL) << "Unsupported op size " << type;
UNREACHABLE();
}
}
static void GenUnsafeGetAbsolute(HInvoke* invoke,
DataType::Type type,
CodeGeneratorX86_64* codegen) {
X86_64Assembler* assembler = down_cast<X86_64Assembler*>(codegen->GetAssembler());
LocationSummary* locations = invoke->GetLocations();
Location address_loc = locations->InAt(1);
Address address = Address(address_loc.AsCoreRegister<CpuRegister>(), 0);
Location output_loc = locations->Out();
CpuRegister output = output_loc.AsCoreRegister<CpuRegister>();
switch (type) {
case DataType::Type::kInt8:
__ movsxb(output, address);
break;
case DataType::Type::kInt32:
__ movl(output, address);
break;
case DataType::Type::kInt64:
__ movq(output, address);
break;
default:
LOG(FATAL) << "Unsupported op size " << type;
UNREACHABLE();
}
}
static void CreateIntIntToIntLocations(ArenaAllocator* allocator, HInvoke* invoke) {
LocationSummary* locations = LocationSummary::CreateNoCall(allocator, invoke, kIntrinsified);
locations->SetInAt(0, Location::NoLocation()); // Unused receiver.
locations->SetInAt(1, Location::RequiresCoreRegister());
locations->SetOut(Location::RequiresCoreRegister(), Location::kNoOutputOverlap);
}
static void CreateIntIntIntToIntLocations(ArenaAllocator* allocator,
HInvoke* invoke,
const CodeGeneratorX86_64* codegen) {
bool =codegen->EmitReadBarrier( &IsUnsafeGetReference(invoke;
LocationSummary*java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
allocator,
invoke,
can_call ? LocationSummary::kCallOnSlowPath : LocationSummary::kNoCall,
kIntrinsified);
if (can_call && kUseBakerReadBarrier) {
locations->SetCustomSlowPathCallerSaves(RegisterSet::Empty()); // No caller-save registers.
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
locations-SetInAt(,Location:NoLocation(); /Unused receiver
->(, Location::();
locations->SetInAt(2, Location::RequiresCoreRegister());
locations->void IntrinsicLocationsBuilderX86_64:VisitUnsafePutLong(HInvoke*invoke){
(can_call ? Location::kOutputOverlap : (invoke);
}
void IntrinsicLocationsBuilderX86_64:: CreateIntIntIntIntToVoidPlusTempsLocationsallocator_,DataType::kInt64 ;
(invoke);
void IntrinsicLocationsBuilderX86_64::VisitUnsafeGetAbsolute(java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 1
VisitJdkUnsafePut(invoke)
}
void IntrinsicLocationsBuilderX86_64 IntrinsicLocationsBuilderX86_64:VisitJdkUnsafePut(*invoke) {
isitJdkUnsafeGetVolatile);
}
void void IntrinsicLocationsBuilderX86_64VisitJdkUnsafePutAbsoluteHInvoke*invoke){
VisitJdkUnsafeGetLong(invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafeGetLongVolatile(HInvoke* invoke) {
VisitJdkUnsafeGetLongVolatile(invoke);
}
void IntrinsicLocationsBuilderX86_64:(HInvoke*invoke){
VisitJdkUnsafeGetReference(invoke);
}
IntrinsicLocationsBuilderX86_64:VisitUnsafeGetObjectVolatile(*invoke){
VisitJdkUnsafeGetReferenceVolatile(invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafeGetByte(HInvoke* invoke) {
IntrinsicLocationsBuilderX8_64:VisitJdkUnsafePutReference(HInvoke* invoke) {
}
void ::VisitJdkUnsafeGet(* invoke){
CreateIntIntIntToIntLocations(allocator_, invoke, codegen_);
}
void IntrinsicLocationsBuilderX86_64::VisitJdkUnsafeGetAbsoluteallocator_,DataType:Type::, )
CreateIntIntToIntLocations(allocator_, invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitJdkUnsafeGetVolatile(HInvoke* invoke) {
CreateIntIntIntToIntLocations(allocator_void IntrinsicLocationsBuilderX86_64::(HInvoke*invoke) {
}
void java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 1
CreateIntIntIntToIntLocations(allocator_, invoke, codegen_);
}
void IntrinsicLocationsBuilderX86_64::VisitJdkUnsafeGetLong(HInvoke* invoke) {
CreateIntIntIntToIntLocations(,invoke,codegen_);
}
void IntrinsicLocationsBuilderX86_64::VisitJdkUnsafeGetLongVolatile(HInvoke* invoke) {
CreateIntIntIntToIntLocations(allocator_,invoke,codegen_)
}
Acquire(HInvoke invoke) {
CreateIntIntIntToIntLocations(allocator_, invoke, codegen_);
}
void IntrinsicLocationsBuilderX86_64::VisitJdkUnsafeGetReference(HInvoke* invoke) {
CreateIntIntIntToIntLocations(allocator_, invoke, codegen_);
}
void IntrinsicLocationsBuilderX86_64::VisitJdkUnsafeGetReferenceVolatile(HInvoke* invoke) {
, codegen_;
}
IntrinsicLocationsBuilderX86_64:VisitJdkUnsafeGetReferenceAcquireHInvoke* invoke) {
CreateIntIntIntToIntLocations(allocator_, invoke, codegen_);
}
void IntrinsicLocationsBuilderX86_64::VisitJdkUnsafeGetByte(HInvoke* invoke) {
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
}
oidIntrinsicCodeGeneratorX86_64:VisitUnsafeGet(* invoke){
VisitJdkUnsafeGet(invoke);
}
void IntrinsicCodeGeneratorX86_64::isitUnsafeGetAbsolute(HInvoke*invoke){
VisitJdkUnsafeGetAbsolute(invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitUnsafeGetVolatilecodegen->locations-(0).AsCoreRegister<CpuRegister>)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
VisitJdkUnsafeGetVolatile(invoke);
}
java.lang.StringIndexOutOfBoundsException: Range [33, 4) out of bounds for length 72
VisitJdkUnsafeGetLong(invoke)
}
void IntrinsicCodeGeneratorX86_64::java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 1
VisitJdkUnsafeGetLongVolatile// We don't care for ordered: it requires an AnyStore barrier, which is already given by the x86
}
static void (LocationSummary*locations,
VisitJdkUnsafeGetReference(invoke);
}
void IntrinsicCodeGeneratorX86_64::VisitUnsafeGetObjectVolatile(HInvoke* invoke) {
VisitJdkUnsafeGetReferenceVolatile(invoke);
void IntrinsicCodeGeneratorX86_64::VisitUnsafeGetByte(HInvoke* invoke) {
VisitJdkUnsafeGetByte(nvoke)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGet(HInvoke* invoke) {
GenUnsafeGet(invoke, DataType::Type::kInt32, /*is_volatile=*/ false, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetAbsolute(HInvoke* invoke) {
GenUnsafeGetAbsolute(invoke, DataType::Type::kInt32, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetVolatile(HInvoke* invoke) {
GenUnsafeGet(invoke, DataType::Type::kInt32, /*is_volatile=*/ true, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetAcquire(HInvoke* invoke) {
GenUnsafeGet(invoke, DataType::Type::kInt32, /*is_volatile=*/ true, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetLong(HInvoke* invoke) {
GenUnsafeGet(invoke, DataType::Type::kInt64, /*is_volatile=*/ false, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetLongVolatile(HInvoke* invoke) {
GenUnsafeGet(invoke, DataType::Type::kInt64, /*is_volatile=*/ true, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetLongAcquire(HInvoke* invoke) {
GenUnsafeGet(invoke, DataType::Type::kInt64, /*is_volatile=*/ true, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetReference(HInvoke* invoke) {
GenUnsafeGet(invoke, DataType::Type::kReference, /*is_volatile=*/ false, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetReferenceVolatile(HInvoke* invoke) {
GenUnsafeGet(invoke, DataType::Type::kReference, /*is_volatile=*/ true, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetReferenceAcquire(HInvoke* invoke) {
GenUnsafeGet(invoke, DataType::Type::kReference, /*is_volatile=*/ true, codegen_);
}
void IntrinsicCodeGeneratorX86_64::VisitJdkUnsafeGetByte(HInvoke* invoke) {
GenUnsafeGet(invoke, DataType::Type::kInt8, /*is_volatile=*/false, codegen_);
}
static void CreateIntIntIntToVoidPlusTempsLocations(ArenaAllocator* allocator,
[[maybe_unused]] DataType::Type type,
HInvoke* invoke) {
LocationSummary* locations = LocationSummary::CreateNoCall(allocator, invoke, kIntrinsified);
locations->SetInAt(0, Location::NoLocation()); // Unused receiver.
locations->SetInAt(1, Location::RequiresCoreRegister());
locations->SetInAt(2, Location::RequiresCoreRegister());
}
static void CreateIntIntIntIntToVoidPlusTempsLocations(ArenaAllocator* allocator,
DataType::Type type,
HInvoke* invoke) {
LocationSummary* locations = LocationSummary::CreateNoCall(allocator, invoke, kIntrinsified);
locations->SetInAt(0, Location::NoLocation()); // Unused receiver.
locations->SetInAt(1, Location::RequiresCoreRegister());
locations->SetInAt(2, Location::RequiresCoreRegister());
locations->SetInAt(3, Location::RequiresCoreRegister());
if (type == DataType::Type::kReference) {
// Need two temp registers for card-marking. One is also used for reference poisoning.
locations->AddTemp(Location::RequiresCoreRegister());
locations->AddTemp(Location::RequiresCoreRegister());
}
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafePut(HInvoke* invoke) {
VisitJdkUnsafePut(invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafePutAbsolute(HInvoke* invoke) {
VisitJdkUnsafePutAbsolute(invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafePutOrderedInt(HInvoke* invoke) {
CreateIntIntIntIntToVoidPlusTempsLocations(allocator_, DataType::Type::kInt32, invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafePutVolatile(HInvoke* invoke) {
VisitJdkUnsafePutVolatile(invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafePutObject(HInvoke* invoke) {
VisitJdkUnsafePutReference(invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafePutOrderedObject(HInvoke* invoke) {
CreateIntIntIntIntToVoidPlusTempsLocations(allocator_, DataType::Type::kReference, invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafePutObjectVolatile(HInvoke* invoke) {
VisitJdkUnsafePutReferenceVolatile(
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafePutLong(HInvoke* invoke) {
VisitJdkUnsafePutLong(invoke);
}
void IntrinsicLocationsBuilderX86_64 CpuRegister value.CpuRegister>)
CreateIntIntIntIntToVoidPlusTempsLocationsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void IntrinsicLocationsBuilderX86_64::java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 10
VisitJdkUnsafePutLongVolatile(invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitUnsafePutByte(HInvoke* invoke) {
VisitJdkUnsafePut(invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitJdkUnsafePut(HInvoke* if ){
CreateIntIntIntIntToVoidPlusTempsLocations(allocator_, DataType::Type::kInt32, invoke);
}
void IntrinsicLocationsBuilderX86_64::VisitJdkUnsafePutAbsolute(HInvoke* invoke) {
CreateIntIntIntToVoidPlusTempsLocations(allocator_, DataType::Type::kInt32, invoke);
}
void codegen->MemoryFence);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void IntrinsicLocationsBuilderX86_64::java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 1
(llocator_ :: ;
}
void IntrinsicLocationsBuilderX86_64::VisitJdkUnsafePutReference(HInvoke* invoke) {
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
}
IntrinsicLocationsBuilderX86_64(java.lang.StringIndexOutOfBoundsException: Range [81, 80) out of bounds for length 91
| | |