Skip to content

Commit f63acae

Browse files
author
duke
committed
Automatic merge of jdk:master into master
2 parents e51a68b + a7422ac commit f63acae

File tree

30 files changed

+893
-51
lines changed

30 files changed

+893
-51
lines changed

src/hotspot/cpu/aarch64/aarch64.ad

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8860,6 +8860,17 @@ instruct castII(iRegI dst)
88608860
ins_pipe(pipe_class_empty);
88618861
%}
88628862

8863+
instruct castLL(iRegL dst)
8864+
%{
8865+
match(Set dst (CastLL dst));
8866+
8867+
size(0);
8868+
format %{ "# castLL of $dst" %}
8869+
ins_encode(/* empty encoding */);
8870+
ins_cost(0);
8871+
ins_pipe(pipe_class_empty);
8872+
%}
8873+
88638874
// ============================================================================
88648875
// Atomic operation instructions
88658876
//

src/hotspot/cpu/arm/arm.ad

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5277,6 +5277,14 @@ instruct castII( iRegI dst ) %{
52775277
ins_pipe(empty);
52785278
%}
52795279

5280+
instruct castLL( iRegL dst ) %{
5281+
match(Set dst (CastLL dst));
5282+
format %{ "! castLL of $dst" %}
5283+
ins_encode( /*empty encoding*/ );
5284+
ins_cost(0);
5285+
ins_pipe(empty);
5286+
%}
5287+
52805288
//----------Arithmetic Instructions--------------------------------------------
52815289
// Addition Instructions
52825290
// Register Addition

src/hotspot/cpu/ppc/ppc.ad

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10348,6 +10348,14 @@ instruct castII(iRegIdst dst) %{
1034810348
ins_pipe(pipe_class_default);
1034910349
%}
1035010350

10351+
instruct castLL(iRegLdst dst) %{
10352+
match(Set dst (CastLL dst));
10353+
format %{ " -- \t// castLL of $dst" %}
10354+
size(0);
10355+
ins_encode( /*empty*/ );
10356+
ins_pipe(pipe_class_default);
10357+
%}
10358+
1035110359
instruct checkCastPP(iRegPdst dst) %{
1035210360
match(Set dst (CheckCastPP dst));
1035310361
format %{ " -- \t// checkcastPP of $dst" %}

src/hotspot/cpu/s390/s390.ad

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5345,6 +5345,13 @@ instruct castII(iRegI dst) %{
53455345
ins_pipe(pipe_class_dummy);
53465346
%}
53475347

5348+
instruct castLL(iRegL dst) %{
5349+
match(Set dst (CastLL dst));
5350+
size(0);
5351+
format %{ "# castLL of $dst" %}
5352+
ins_encode(/*empty*/);
5353+
ins_pipe(pipe_class_dummy);
5354+
%}
53485355

53495356
//----------Conditional_store--------------------------------------------------
53505357
// Conditional-store of the updated heap-top.

src/hotspot/cpu/x86/x86_32.ad

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7147,6 +7147,14 @@ instruct castII( rRegI dst ) %{
71477147
ins_pipe( empty );
71487148
%}
71497149

7150+
instruct castLL( eRegL dst ) %{
7151+
match(Set dst (CastLL dst));
7152+
format %{ "#castLL of $dst" %}
7153+
ins_encode( /*empty encoding*/ );
7154+
ins_cost(0);
7155+
ins_pipe( empty );
7156+
%}
7157+
71507158
// Load-locked - same as a regular pointer load when used with compare-swap
71517159
instruct loadPLocked(eRegP dst, memory mem) %{
71527160
match(Set dst (LoadPLocked mem));

src/hotspot/cpu/x86/x86_64.ad

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7445,6 +7445,17 @@ instruct castII(rRegI dst)
74457445
ins_pipe(empty);
74467446
%}
74477447

7448+
instruct castLL(rRegL dst)
7449+
%{
7450+
match(Set dst (CastLL dst));
7451+
7452+
size(0);
7453+
format %{ "# castLL of $dst" %}
7454+
ins_encode(/* empty encoding */);
7455+
ins_cost(0);
7456+
ins_pipe(empty);
7457+
%}
7458+
74487459
// LoadP-locked same as a regular LoadP when used with compare-swap
74497460
instruct loadPLocked(rRegP dst, memory mem)
74507461
%{

src/hotspot/share/classfile/vmIntrinsics.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ class methodHandle;
337337
\
338338
do_intrinsic(_Preconditions_checkIndex, jdk_internal_util_Preconditions, checkIndex_name, Preconditions_checkIndex_signature, F_S) \
339339
do_signature(Preconditions_checkIndex_signature, "(IILjava/util/function/BiFunction;)I") \
340+
do_intrinsic(_Preconditions_checkLongIndex, jdk_internal_util_Preconditions, checkIndex_name, Preconditions_checkLongIndex_signature, F_S) \
341+
do_signature(Preconditions_checkLongIndex_signature, "(JJLjava/util/function/BiFunction;)J") \
340342
\
341343
do_class(java_nio_Buffer, "java/nio/Buffer") \
342344
do_intrinsic(_checkIndex, java_nio_Buffer, checkIndex_name, int_int_signature, F_R) \

src/hotspot/share/opto/c2compiler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virt
649649
case vmIntrinsics::_profileBoolean:
650650
case vmIntrinsics::_isCompileConstant:
651651
case vmIntrinsics::_Preconditions_checkIndex:
652+
case vmIntrinsics::_Preconditions_checkLongIndex:
652653
case vmIntrinsics::_getObjectSize:
653654
break;
654655

src/hotspot/share/opto/castnode.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ Node* ConstraintCastNode::make_cast(int opcode, Node* c, Node *n, const Type *t,
9696
cast->set_req(0, c);
9797
return cast;
9898
}
99+
case Op_CastLL: {
100+
Node* cast = new CastLLNode(n, t, carry_dependency);
101+
cast->set_req(0, c);
102+
return cast;
103+
}
99104
case Op_CastPP: {
100105
Node* cast = new CastPPNode(n, t, carry_dependency);
101106
cast->set_req(0, c);
@@ -108,6 +113,20 @@ Node* ConstraintCastNode::make_cast(int opcode, Node* c, Node *n, const Type *t,
108113
return NULL;
109114
}
110115

116+
Node* ConstraintCastNode::make(Node* c, Node *n, const Type *t, BasicType bt) {
117+
switch(bt) {
118+
case T_INT: {
119+
return make_cast(Op_CastII, c, n, t, false);
120+
}
121+
case T_LONG: {
122+
return make_cast(Op_CastLL, c, n, t, false);
123+
}
124+
default:
125+
fatal("Bad basic type %s", type2name(bt));
126+
}
127+
return NULL;
128+
}
129+
111130
TypeNode* ConstraintCastNode::dominating_cast(PhaseGVN* gvn, PhaseTransform* pt) const {
112131
Node* val = in(1);
113132
Node* ctl = in(0);

src/hotspot/share/opto/castnode.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class ConstraintCastNode: public TypeNode {
5353
bool carry_dependency() const { return _carry_dependency; }
5454
TypeNode* dominating_cast(PhaseGVN* gvn, PhaseTransform* pt) const;
5555
static Node* make_cast(int opcode, Node* c, Node *n, const Type *t, bool carry_dependency);
56+
static Node* make(Node* c, Node *n, const Type *t, BasicType bt);
5657

5758
#ifndef PRODUCT
5859
virtual void dump_spec(outputStream *st) const;
@@ -92,6 +93,16 @@ class CastIINode: public ConstraintCastNode {
9293
#endif
9394
};
9495

96+
class CastLLNode: public ConstraintCastNode {
97+
public:
98+
CastLLNode(Node* n, const Type* t, bool carry_dependency = false)
99+
: ConstraintCastNode(n, t, carry_dependency){
100+
init_class_id(Class_CastLL);
101+
}
102+
virtual int Opcode() const;
103+
virtual uint ideal_reg() const { return Op_RegL; }
104+
};
105+
95106
//------------------------------CastPPNode-------------------------------------
96107
// cast pointer to pointer (different type)
97108
class CastPPNode: public ConstraintCastNode {

0 commit comments

Comments
 (0)