Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/src/hotspot/share/classfile/vmIntrinsics.hpp b/src/hotspot/share/classfile/vmIntrinsics.hpp
index 0035dc20dde..24cfbfb1ac2 100644
--- a/src/hotspot/share/classfile/vmIntrinsics.hpp
+++ b/src/hotspot/share/classfile/vmIntrinsics.hpp
@@ -809,140 +809,278 @@ class methodHandle;
/* Vector API intrinsification support */ \
\
do_intrinsic(_VectorUnaryOp, jdk_internal_vm_vector_VectorSupport, vector_unary_op_name, vector_unary_op_sig, F_S) \
- do_signature(vector_unary_op_sig, "(ILjava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;ILjdk/internal/vm/vector/VectorSupport$Vector;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorMask;Ljdk/internal/vm/vector/VectorSupport$UnaryOperation;)"\
+ do_signature(vector_unary_op_sig, "(I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljdk/internal/vm/vector/VectorSupport$UnaryOperation;)" \
"Ljdk/internal/vm/vector/VectorSupport$Vector;") \
do_name(vector_unary_op_name, "unaryOp") \
\
do_intrinsic(_VectorBinaryOp, jdk_internal_vm_vector_VectorSupport, vector_binary_op_name, vector_binary_op_sig, F_S) \
- do_signature(vector_binary_op_sig, "(ILjava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;ILjava/lang/Object;Ljava/lang/Object;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorMask;Ljdk/internal/vm/vector/VectorSupport$BinaryOperation;)Ljava/lang/Object;") \
+ do_signature(vector_binary_op_sig, "(I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorPayload;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorPayload;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljdk/internal/vm/vector/VectorSupport$BinaryOperation;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorPayload;") \
do_name(vector_binary_op_name, "binaryOp") \
\
do_intrinsic(_VectorTernaryOp, jdk_internal_vm_vector_VectorSupport, vector_ternary_op_name, vector_ternary_op_sig, F_S) \
- do_signature(vector_ternary_op_sig, "(ILjava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;ILjdk/internal/vm/vector/VectorSupport$Vector;" \
- "Ljdk/internal/vm/vector/VectorSupport$Vector;Ljdk/internal/vm/vector/VectorSupport$Vector;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorMask;Ljdk/internal/vm/vector/VectorSupport$TernaryOperation;)" \
+ do_signature(vector_ternary_op_sig, "(I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljdk/internal/vm/vector/VectorSupport$TernaryOperation;)" \
"Ljdk/internal/vm/vector/VectorSupport$Vector;") \
do_name(vector_ternary_op_name, "ternaryOp") \
\
do_intrinsic(_VectorBroadcastCoerced, jdk_internal_vm_vector_VectorSupport, vector_broadcast_coerced_name, vector_broadcast_coerced_sig, F_S)\
- do_signature(vector_broadcast_coerced_sig, "(Ljava/lang/Class;Ljava/lang/Class;IJLjdk/internal/vm/vector/VectorSupport$VectorSpecies;" \
- "Ljdk/internal/vm/vector/VectorSupport$BroadcastOperation;)Ljava/lang/Object;") \
+ do_signature(vector_broadcast_coerced_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "J" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorSpecies;" \
+ "Ljdk/internal/vm/vector/VectorSupport$BroadcastOperation;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorPayload;") \
do_name(vector_broadcast_coerced_name, "broadcastCoerced") \
\
do_intrinsic(_VectorShuffleIota, jdk_internal_vm_vector_VectorSupport, vector_shuffle_step_iota_name, vector_shuffle_step_iota_sig, F_S) \
- do_signature(vector_shuffle_step_iota_sig, "(Ljava/lang/Class;Ljava/lang/Class;Ljdk/internal/vm/vector/VectorSupport$VectorSpecies;" \
- "IIIILjdk/internal/vm/vector/VectorSupport$ShuffleIotaOperation;)Ljdk/internal/vm/vector/VectorSupport$VectorShuffle;") \
+ do_signature(vector_shuffle_step_iota_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorSpecies;" \
+ "IIII" \
+ "Ljdk/internal/vm/vector/VectorSupport$ShuffleIotaOperation;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorShuffle;") \
do_name(vector_shuffle_step_iota_name, "shuffleIota") \
\
do_intrinsic(_VectorShuffleToVector, jdk_internal_vm_vector_VectorSupport, vector_shuffle_to_vector_name, vector_shuffle_to_vector_sig, F_S) \
- do_signature(vector_shuffle_to_vector_sig, "(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljdk/internal/vm/vector/VectorSupport$VectorShuffle;" \
- "ILjdk/internal/vm/vector/VectorSupport$ShuffleToVectorOperation;)Ljava/lang/Object;") \
+ do_signature(vector_shuffle_to_vector_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorShuffle;" \
+ "ILjdk/internal/vm/vector/VectorSupport$ShuffleToVectorOperation;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;") \
do_name(vector_shuffle_to_vector_name, "shuffleToVector") \
\
do_intrinsic(_VectorLoadOp, jdk_internal_vm_vector_VectorSupport, vector_load_op_name, vector_load_op_sig, F_S) \
- do_signature(vector_load_op_sig, "(Ljava/lang/Class;Ljava/lang/Class;ILjava/lang/Object;JLjava/lang/Object;" \
- "ILjdk/internal/vm/vector/VectorSupport$VectorSpecies;Ljdk/internal/vm/vector/VectorSupport$LoadOperation;)Ljava/lang/Object;") \
+ do_signature(vector_load_op_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljava/lang/Object;" \
+ "J" \
+ "Ljava/lang/Object;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorSpecies;" \
+ "Ljdk/internal/vm/vector/VectorSupport$LoadOperation;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorPayload;") \
do_name(vector_load_op_name, "load") \
\
do_intrinsic(_VectorLoadMaskedOp, jdk_internal_vm_vector_VectorSupport, vector_load_masked_op_name, vector_load_masked_op_sig, F_S) \
- do_signature(vector_load_masked_op_sig, "(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;ILjava/lang/Object;JLjdk/internal/vm/vector/VectorSupport$VectorMask;" \
- "Ljava/lang/Object;ILjdk/internal/vm/vector/VectorSupport$VectorSpecies;" \
- "Ljdk/internal/vm/vector/VectorSupport$LoadVectorMaskedOperation;)Ljdk/internal/vm/vector/VectorSupport$Vector;") \
+ do_signature(vector_load_masked_op_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljava/lang/Object;" \
+ "J" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljava/lang/Object;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorSpecies;" \
+ "Ljdk/internal/vm/vector/VectorSupport$LoadVectorMaskedOperation;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;") \
do_name(vector_load_masked_op_name, "loadMasked") \
\
do_intrinsic(_VectorStoreOp, jdk_internal_vm_vector_VectorSupport, vector_store_op_name, vector_store_op_sig, F_S) \
- do_signature(vector_store_op_sig, "(Ljava/lang/Class;Ljava/lang/Class;ILjava/lang/Object;JLjdk/internal/vm/vector/VectorSupport$Vector;" \
- "Ljava/lang/Object;ILjdk/internal/vm/vector/VectorSupport$StoreVectorOperation;)V") \
+ do_signature(vector_store_op_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljava/lang/Object;" \
+ "J" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljava/lang/Object;ILjdk/internal/vm/vector/VectorSupport$StoreVectorOperation;)" \
+ "V") \
do_name(vector_store_op_name, "store") \
\
do_intrinsic(_VectorStoreMaskedOp, jdk_internal_vm_vector_VectorSupport, vector_store_masked_op_name, vector_store_masked_op_sig, F_S) \
- do_signature(vector_store_masked_op_sig, "(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;ILjava/lang/Object;JLjdk/internal/vm/vector/VectorSupport$Vector;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorMask;Ljava/lang/Object;I" \
- "Ljdk/internal/vm/vector/VectorSupport$StoreVectorMaskedOperation;)V") \
+ do_signature(vector_store_masked_op_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljava/lang/Object;" \
+ "J" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljava/lang/Object;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$StoreVectorMaskedOperation;)" \
+ "V") \
do_name(vector_store_masked_op_name, "storeMasked") \
\
do_intrinsic(_VectorReductionCoerced, jdk_internal_vm_vector_VectorSupport, vector_reduction_coerced_name, vector_reduction_coerced_sig, F_S)\
- do_signature(vector_reduction_coerced_sig, "(ILjava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;ILjdk/internal/vm/vector/VectorSupport$Vector;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorMask;Ljdk/internal/vm/vector/VectorSupport$ReductionOperation;)J") \
+ do_signature(vector_reduction_coerced_sig, "(I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljdk/internal/vm/vector/VectorSupport$ReductionOperation;)" \
+ "J") \
do_name(vector_reduction_coerced_name, "reductionCoerced") \
\
do_intrinsic(_VectorTest, jdk_internal_vm_vector_VectorSupport, vector_test_name, vector_test_sig, F_S) \
- do_signature(vector_test_sig, "(ILjava/lang/Class;Ljava/lang/Class;ILjava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Z") \
+ do_signature(vector_test_sig, "(I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljava/util/function/BiFunction;)" \
+ "Z") \
do_name(vector_test_name, "test") \
\
do_intrinsic(_VectorBlend, jdk_internal_vm_vector_VectorSupport, vector_blend_name, vector_blend_sig, F_S) \
- do_signature(vector_blend_sig, "(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;I" \
- "Ljdk/internal/vm/vector/VectorSupport$Vector;Ljdk/internal/vm/vector/VectorSupport$Vector;Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorBlendOp;)Ljdk/internal/vm/vector/VectorSupport$Vector;") \
+ do_signature(vector_blend_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorBlendOp;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;") \
do_name(vector_blend_name, "blend") \
\
do_intrinsic(_VectorCompare, jdk_internal_vm_vector_VectorSupport, vector_compare_name, vector_compare_sig, F_S) \
- do_signature(vector_compare_sig, "(ILjava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;I" \
- "Ljdk/internal/vm/vector/VectorSupport$Vector;" "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ do_signature(vector_compare_sig, "(I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
"Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorCompareOp;" ")" "Ljdk/internal/vm/vector/VectorSupport$VectorMask;") \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorCompareOp;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;") \
do_name(vector_compare_name, "compare") \
\
do_intrinsic(_VectorRearrange, jdk_internal_vm_vector_VectorSupport, vector_rearrange_name, vector_rearrange_sig, F_S) \
- do_signature(vector_rearrange_sig, "(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;I" \
- "Ljdk/internal/vm/vector/VectorSupport$Vector;Ljdk/internal/vm/vector/VectorSupport$VectorShuffle;" \
+ do_signature(vector_rearrange_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorShuffle;" \
"Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorRearrangeOp;)Ljdk/internal/vm/vector/VectorSupport$Vector;") \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorRearrangeOp;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;") \
do_name(vector_rearrange_name, "rearrangeOp") \
\
do_intrinsic(_VectorExtract, jdk_internal_vm_vector_VectorSupport, vector_extract_name, vector_extract_sig, F_S) \
- do_signature(vector_extract_sig, "(Ljava/lang/Class;Ljava/lang/Class;I" \
- "Ljdk/internal/vm/vector/VectorSupport$Vector;I" \
- "Ljdk/internal/vm/vector/VectorSupport$VecExtractOp;)J") \
+ do_signature(vector_extract_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$VecExtractOp;)" \
+ "J") \
do_name(vector_extract_name, "extract") \
\
do_intrinsic(_VectorInsert, jdk_internal_vm_vector_VectorSupport, vector_insert_name, vector_insert_sig, F_S) \
- do_signature(vector_insert_sig, "(Ljava/lang/Class;Ljava/lang/Class;I" \
- "Ljdk/internal/vm/vector/VectorSupport$Vector;IJ" \
- "Ljdk/internal/vm/vector/VectorSupport$VecInsertOp;)Ljdk/internal/vm/vector/VectorSupport$Vector;") \
+ do_signature(vector_insert_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "IJ" \
+ "Ljdk/internal/vm/vector/VectorSupport$VecInsertOp;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;") \
do_name(vector_insert_name, "insert") \
\
do_intrinsic(_VectorBroadcastInt, jdk_internal_vm_vector_VectorSupport, vector_broadcast_int_name, vector_broadcast_int_sig, F_S) \
- do_signature(vector_broadcast_int_sig, "(ILjava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;I" \
- "Ljdk/internal/vm/vector/VectorSupport$Vector;ILjdk/internal/vm/vector/VectorSupport$VectorMask;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorBroadcastIntOp;)Ljdk/internal/vm/vector/VectorSupport$Vector;") \
+ do_signature(vector_broadcast_int_sig, "(I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorBroadcastIntOp;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;") \
do_name(vector_broadcast_int_name, "broadcastInt") \
\
do_intrinsic(_VectorConvert, jdk_internal_vm_vector_VectorSupport, vector_convert_name, vector_convert_sig, F_S) \
- do_signature(vector_convert_sig, "(ILjava/lang/Class;Ljava/lang/Class;I" \
- "Ljava/lang/Class;Ljava/lang/Class;I" \
+ do_signature(vector_convert_sig, "(I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
"Ljdk/internal/vm/vector/VectorSupport$VectorPayload;" \
"Ljdk/internal/vm/vector/VectorSupport$VectorSpecies;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorConvertOp;)Ljdk/internal/vm/vector/VectorSupport$VectorPayload;") \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorConvertOp;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorPayload;") \
do_name(vector_convert_name, "convert") \
\
do_intrinsic(_VectorGatherOp, jdk_internal_vm_vector_VectorSupport, vector_gather_name, vector_gather_sig, F_S) \
- do_signature(vector_gather_sig, "(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;ILjava/lang/Class;" \
- "Ljava/lang/Object;J" \
+ do_signature(vector_gather_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Object;" \
+ "J" \
"Ljdk/internal/vm/vector/VectorSupport$Vector;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorMask;Ljava/lang/Object;I[II" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljava/lang/Object;" \
+ "I[II" \
"Ljdk/internal/vm/vector/VectorSupport$VectorSpecies;" \
"Ljdk/internal/vm/vector/VectorSupport$LoadVectorOperationWithMap;)" \
"Ljdk/internal/vm/vector/VectorSupport$Vector;") \
do_name(vector_gather_name, "loadWithMap") \
\
do_intrinsic(_VectorScatterOp, jdk_internal_vm_vector_VectorSupport, vector_scatter_name, vector_scatter_sig, F_S) \
- do_signature(vector_scatter_sig, "(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;ILjava/lang/Class;" \
- "Ljava/lang/Object;J" \
- "Ljdk/internal/vm/vector/VectorSupport$Vector;Ljdk/internal/vm/vector/VectorSupport$Vector;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorMask;Ljava/lang/Object;I[II" \
- "Ljdk/internal/vm/vector/VectorSupport$StoreVectorOperationWithMap;)V") \
+ do_signature(vector_scatter_sig, "(Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Object;" \
+ "J" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$Vector;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;Ljava/lang/Object;" \
+ "I[II" \
+ "Ljdk/internal/vm/vector/VectorSupport$StoreVectorOperationWithMap;)" \
+ "V") \
do_name(vector_scatter_name, "storeWithMap") \
\
do_intrinsic(_VectorRebox, jdk_internal_vm_vector_VectorSupport, vector_rebox_name, vector_rebox_sig, F_S) \
- do_alias(vector_rebox_sig, object_object_signature) \
+ do_signature(vector_rebox_sig, "(Ljdk/internal/vm/vector/VectorSupport$VectorPayload;)" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorPayload;") \
do_name(vector_rebox_name, "maybeRebox") \
\
do_intrinsic(_VectorMaskOp, jdk_internal_vm_vector_VectorSupport, vector_mask_oper_name, vector_mask_oper_sig, F_S) \
- do_signature(vector_mask_oper_sig, "(ILjava/lang/Class;Ljava/lang/Class;ILjava/lang/Object;" \
- "Ljdk/internal/vm/vector/VectorSupport$VectorMaskOp;)I") \
+ do_signature(vector_mask_oper_sig, "(I" \
+ "Ljava/lang/Class;" \
+ "Ljava/lang/Class;" \
+ "I" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMask;" \
+ "Ljdk/internal/vm/vector/VectorSupport$VectorMaskOp;)" \
+ "I") \
do_name(vector_mask_oper_name, "maskReductionCoerced") \
\
/* (2) Bytecode intrinsics */ \
diff --git a/src/java.base/share/classes/jdk/internal/misc/X-ScopedMemoryAccess.java.template b/src/java.base/share/classes/jdk/internal/misc/X-ScopedMemoryAccess.java.template
index 837e11ecad5..e4cf2f5b2ed 100644
--- a/src/java.base/share/classes/jdk/internal/misc/X-ScopedMemoryAccess.java.template
+++ b/src/java.base/share/classes/jdk/internal/misc/X-ScopedMemoryAccess.java.template
@@ -387,7 +387,7 @@ public class ScopedMemoryAccess {
V loadFromByteBuffer(Class<? extends V> vmClass, Class<E> e, int length,
ByteBuffer bb, int offset,
S s,
- VectorSupport.LoadOperation<ByteBuffer, V, E, S> defaultImpl) {
+ VectorSupport.LoadOperation<ByteBuffer, V, S> defaultImpl) {
try {
return loadFromByteBufferScoped(
BufferAccess.scope(bb),
@@ -408,7 +408,7 @@ public class ScopedMemoryAccess {
Class<? extends V> vmClass, Class<E> e, int length,
ByteBuffer bb, int offset,
S s,
- VectorSupport.LoadOperation<ByteBuffer, V, E, S> defaultImpl) {
+ VectorSupport.LoadOperation<ByteBuffer, V, S> defaultImpl) {
try {
if (scope != null) {
scope.checkValidState();
@@ -431,7 +431,7 @@ public class ScopedMemoryAccess {
M extends VectorSupport.VectorMask<E>>
V loadFromByteBufferMasked(Class<? extends V> vmClass, Class<M> maskClass, Class<E> e,
int length, ByteBuffer bb, int offset, M m, S s,
- VectorSupport.LoadVectorMaskedOperation<ByteBuffer, V, E, S, M> defaultImpl) {
+ VectorSupport.LoadVectorMaskedOperation<ByteBuffer, V, S, M> defaultImpl) {
try {
return loadFromByteBufferMaskedScoped(
BufferAccess.scope(bb),
@@ -453,7 +453,7 @@ public class ScopedMemoryAccess {
Class<M> maskClass, Class<E> e, int length,
ByteBuffer bb, int offset, M m,
S s,
- VectorSupport.LoadVectorMaskedOperation<ByteBuffer, V, E, S, M> defaultImpl) {
+ VectorSupport.LoadVectorMaskedOperation<ByteBuffer, V, S, M> defaultImpl) {
try {
if (scope != null) {
scope.checkValidState();
@@ -519,7 +519,7 @@ public class ScopedMemoryAccess {
void storeIntoByteBufferMasked(Class<? extends V> vmClass, Class<M> maskClass, Class<E> e,
int length, V v, M m,
ByteBuffer bb, int offset,
- VectorSupport.StoreVectorMaskedOperation<ByteBuffer, V, M, E> defaultImpl) {
+ VectorSupport.StoreVectorMaskedOperation<ByteBuffer, V, M> defaultImpl) {
try {
storeIntoByteBufferMaskedScoped(
BufferAccess.scope(bb),
@@ -540,7 +540,7 @@ public class ScopedMemoryAccess {
Class<? extends V> vmClass, Class<M> maskClass,
Class<E> e, int length, V v, M m,
ByteBuffer bb, int offset,
- VectorSupport.StoreVectorMaskedOperation<ByteBuffer, V, M, E> defaultImpl) {
+ VectorSupport.StoreVectorMaskedOperation<ByteBuffer, V, M> defaultImpl) {
try {
if (scope != null) {
scope.checkValidState();
diff --git a/src/java.base/share/classes/jdk/internal/vm/vector/VectorSupport.java b/src/java.base/share/classes/jdk/internal/vm/vector/VectorSupport.java
index c7c350e4297..5243ac2b98f 100644
--- a/src/java.base/share/classes/jdk/internal/vm/vector/VectorSupport.java
+++ b/src/java.base/share/classes/jdk/internal/vm/vector/VectorSupport.java
@@ -156,73 +156,84 @@ public class VectorSupport {
}
/* ============================================================================ */
- public interface BroadcastOperation<M, E, S extends VectorSpecies<E>> {
- M broadcast(long l, S s);
+ public interface BroadcastOperation<VM extends VectorPayload,
+ S extends VectorSpecies<?>> {
+ VM broadcast(long l, S s);
}
@IntrinsicCandidate
public static
- <M,
+ <VM extends VectorPayload,
S extends VectorSpecies<E>,
E>
- M broadcastCoerced(Class<? extends M> vmClass, Class<E> elementType, int length,
- long bits, S s,
- BroadcastOperation<M, E, S> defaultImpl) {
+ VM broadcastCoerced(Class<? extends VM> vmClass, Class<E> eClass,
+ int length,
+ long bits, S s,
+ BroadcastOperation<VM, S> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.broadcast(bits, s);
}
/* ============================================================================ */
- public interface ShuffleIotaOperation<E, S extends VectorSpecies<E>> {
- VectorShuffle<E> apply(int length, int start, int step, S s);
+ public interface ShuffleIotaOperation<S extends VectorSpecies<?>,
+ SH extends VectorShuffle<?>> {
+ SH apply(int length, int start, int step, S s);
}
@IntrinsicCandidate
public static
<E,
S extends VectorSpecies<E>,
- Sh extends VectorShuffle<E>>
- VectorShuffle<E> shuffleIota(Class<E> elementType, Class<? extends Sh> shuffleClass, S s, int length,
- int start, int step, int wrap, ShuffleIotaOperation<E, S> defaultImpl) {
+ SH extends VectorShuffle<E>>
+ SH shuffleIota(Class<E> eClass, Class<? extends SH> shClass, S s,
+ int length,
+ int start, int step, int wrap,
+ ShuffleIotaOperation<S, SH> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.apply(length, start, step, s);
}
- public interface ShuffleToVectorOperation<V, Sh extends VectorShuffle<E>, E> {
- V apply(Sh s);
+ public interface ShuffleToVectorOperation<V extends Vector<?>,
+ SH extends VectorShuffle<?>> {
+ V apply(SH sh);
}
@IntrinsicCandidate
public static
- <V,
- Sh extends VectorShuffle<E>,
+ <V extends Vector<E>,
+ SH extends VectorShuffle<E>,
E>
- V shuffleToVector(Class<? extends Vector<E>> vclass, Class<E> elementType,
- Class<? extends Sh> shuffleClass, Sh s, int length,
- ShuffleToVectorOperation<V, Sh, E> defaultImpl) {
+ V shuffleToVector(Class<? extends Vector<E>> vClass, Class<E> eClass, Class<? extends SH> shClass, SH sh,
+ int length,
+ ShuffleToVectorOperation<V, SH> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
- return defaultImpl.apply(s);
+ return defaultImpl.apply(sh);
}
/* ============================================================================ */
- public interface IndexOperation<V extends Vector<E>, E, S extends VectorSpecies<E>> {
+ public interface IndexOperation<V extends Vector<?>,
+ S extends VectorSpecies<?>> {
V index(V v, int step, S s);
}
//FIXME @IntrinsicCandidate
public static
- <V extends Vector<E>, E, S extends VectorSpecies<E>>
- V indexVector(Class<? extends V> vClass, Class<E> E, int length,
+ <V extends Vector<E>,
+ E,
+ S extends VectorSpecies<E>>
+ V indexVector(Class<? extends V> vClass, Class<E> eClass,
+ int length,
V v, int step, S s,
- IndexOperation<V, E, S> defaultImpl) {
+ IndexOperation<V, S> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.index(v, step, s);
}
/* ============================================================================ */
- public interface ReductionOperation<V extends Vector<?>, M extends VectorMask<?>> {
- long apply(V v, M mask);
+ public interface ReductionOperation<V extends Vector<?>,
+ M extends VectorMask<?>> {
+ long apply(V v, M m);
}
@IntrinsicCandidate
@@ -230,8 +241,10 @@ public class VectorSupport {
<V extends Vector<E>,
M extends VectorMask<E>,
E>
- long reductionCoerced(int oprId, Class<? extends V> vectorClass, Class<? extends M> maskClass,
- Class<E> elementType, int length, V v, M m,
+ long reductionCoerced(int oprId,
+ Class<? extends V> vClass, Class<? extends M> mClass, Class<E> eClass,
+ int length,
+ V v, M m,
ReductionOperation<V, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.apply(v, m);
@@ -240,119 +253,134 @@ public class VectorSupport {
/* ============================================================================ */
- public interface VecExtractOp<V> {
- long apply(V v1, int idx);
+ public interface VecExtractOp<V extends Vector<?>> {
+ long apply(V v, int i);
}
@IntrinsicCandidate
public static
<V extends Vector<E>,
E>
- long extract(Class<? extends V> vectorClass, Class<E> elementType, int vlen,
- V vec, int ix,
+ long extract(Class<? extends V> vClass, Class<E> eClass,
+ int length,
+ V v, int i,
VecExtractOp<V> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
- return defaultImpl.apply(vec, ix);
+ return defaultImpl.apply(v, i);
}
/* ============================================================================ */
- public interface VecInsertOp<V> {
- V apply(V v1, int idx, long val);
+ public interface VecInsertOp<V extends Vector<?>> {
+ V apply(V v, int i, long val);
}
@IntrinsicCandidate
public static
<V extends Vector<E>,
E>
- V insert(Class<? extends V> vectorClass, Class<E> elementType, int vlen,
- V vec, int ix, long val,
+ V insert(Class<? extends V> vClass, Class<E> eClass,
+ int length,
+ V v, int i, long val,
VecInsertOp<V> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
- return defaultImpl.apply(vec, ix, val);
+ return defaultImpl.apply(v, i, val);
}
/* ============================================================================ */
+ public interface UnaryOperation<V extends Vector<?>,
+ M extends VectorMask<?>> {
+ V apply(V v, M m);
+ }
+
@IntrinsicCandidate
public static
<V extends Vector<E>,
M extends VectorMask<E>,
E>
- V unaryOp(int oprId, Class<? extends V> vmClass, Class<? extends M> maskClass,
- Class<E> elementType, int length, V v, M m,
+ V unaryOp(int oprId,
+ Class<? extends V> vClass, Class<? extends M> mClass, Class<E> eClass,
+ int length,
+ V v, M m,
UnaryOperation<V, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.apply(v, m);
}
- public interface UnaryOperation<V extends Vector<?>, M extends VectorMask<?>> {
- V apply(V v, M mask);
- }
-
/* ============================================================================ */
+ public interface BinaryOperation<VM extends VectorPayload,
+ M extends VectorMask<?>> {
+ VM apply(VM v1, VM v2, M m);
+ }
+
@IntrinsicCandidate
public static
- <V,
+ <VM extends VectorPayload,
M extends VectorMask<E>,
E>
- V binaryOp(int oprId, Class<? extends V> vmClass, Class<? extends M> maskClass,
- Class<E> elementType, int length, V v1, V v2, M m,
- BinaryOperation<V, M> defaultImpl) {
+ VM binaryOp(int oprId,
+ Class<? extends VM> vmClass, Class<? extends M> mClass, Class<E> eClass,
+ int length,
+ VM v1, VM v2, M m,
+ BinaryOperation<VM, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.apply(v1, v2, m);
}
- public interface BinaryOperation<V, M extends VectorMask<?>> {
- V apply(V v1, V v2, M mask);
- }
-
/* ============================================================================ */
+ public interface TernaryOperation<V extends Vector<?>,
+ M extends VectorMask<?>> {
+ V apply(V v1, V v2, V v3, M m);
+ }
+
@IntrinsicCandidate
public static
<V extends Vector<E>,
M extends VectorMask<E>,
E>
- V ternaryOp(int oprId, Class<? extends V> vmClass, Class<? extends M> maskClass,
- Class<E> elementType, int length, V v1, V v2, V v3, M m,
+ V ternaryOp(int oprId,
+ Class<? extends V> vClass, Class<? extends M> mClass, Class<E> eClass,
+ int length,
+ V v1, V v2, V v3, M m,
TernaryOperation<V, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.apply(v1, v2, v3, m);
}
- public interface TernaryOperation<V extends Vector<?>, M extends VectorMask<?>> {
- V apply(V v1, V v2, V v3, M mask);
- }
-
/* ============================================================================ */
// Memory operations
- public interface LoadOperation<C, V, E, S extends VectorSpecies<E>> {
- V load(C container, int index, S s);
+ public interface LoadOperation<C,
+ VM extends VectorPayload,
+ S extends VectorSpecies<?>> {
+ VM load(C container, int index, S s);
}
@IntrinsicCandidate
public static
<C,
- V,
+ VM extends VectorPayload,
E,
S extends VectorSpecies<E>>
- V load(Class<? extends V> vClass, Class<E> elementType, int length,
- Object base, long offset, // Unsafe addressing
- C container, int index, S s, // Arguments for default implementation
- LoadOperation<C, V, E, S> defaultImpl) {
+ VM load(Class<? extends VM> vmClass, Class<E> eClass,
+ int length,
+ Object base, long offset,
+ C container, int index, S s,
+ LoadOperation<C, VM, S> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.load(container, index, s);
}
/* ============================================================================ */
- public interface LoadVectorMaskedOperation<C, V extends Vector<?>, E,
- S extends VectorSpecies<E>,
- M extends VectorMask<E>> {
+ public interface LoadVectorMaskedOperation<C,
+ V extends Vector<?>,
+ S extends VectorSpecies<?>,
+ M extends VectorMask<?>> {
V load(C container, int index, S s, M m);
}
@@ -363,18 +391,21 @@ public class VectorSupport {
E,
S extends VectorSpecies<E>,
M extends VectorMask<E>>
- V loadMasked(Class<? extends V> vectorClass, Class<M> maskClass, Class<E> elementType,
- int length, Object base, long offset, M m,
- C container, int index, S s, // Arguments for default implementation
- LoadVectorMaskedOperation<C, V, E, S, M> defaultImpl) {
+ V loadMasked(Class<? extends V> vClass, Class<M> mClass, Class<E> eClass,
+ int length,
+ Object base, long offset,
+ M m, C container, int index, S s,
+ LoadVectorMaskedOperation<C, V, S, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.load(container, index, s, m);
}
/* ============================================================================ */
- public interface LoadVectorOperationWithMap<C, V extends Vector<?>, E, S extends VectorSpecies<E>,
- M extends VectorMask<E>> {
+ public interface LoadVectorOperationWithMap<C,
+ V extends Vector<?>,
+ S extends VectorSpecies<?>,
+ M extends VectorMask<?>> {
V loadWithMap(C container, int index, int[] indexMap, int indexM, S s, M m);
}
@@ -386,19 +417,21 @@ public class VectorSupport {
S extends VectorSpecies<E>,
M extends VectorMask<E>,
E>
- V loadWithMap(Class<? extends V> vectorClass, Class<M> maskClass, Class<E> elementType, int length,
+ V loadWithMap(Class<? extends V> vClass, Class<M> mClass, Class<E> eClass,
+ int length,
Class<? extends Vector<Integer>> vectorIndexClass,
- Object base, long offset, // Unsafe addressing
- W index_vector, M m,
- C container, int index, int[] indexMap, int indexM, S s, // Arguments for default implementation
- LoadVectorOperationWithMap<C, V, E, S, M> defaultImpl) {
+ Object base, long offset,
+ W index_vector,
+ M m, C container, int index, int[] indexMap, int indexM, S s,
+ LoadVectorOperationWithMap<C, V, S, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.loadWithMap(container, index, indexMap, indexM, s, m);
}
/* ============================================================================ */
- public interface StoreVectorOperation<C, V extends Vector<?>> {
+ public interface StoreVectorOperation<C,
+ V extends Vector<?>> {
void store(C container, int index, V v);
}
@@ -406,16 +439,18 @@ public class VectorSupport {
public static
<C,
V extends Vector<?>>
- void store(Class<?> vectorClass, Class<?> elementType, int length,
- Object base, long offset, // Unsafe addressing
- V v,
- C container, int index, // Arguments for default implementation
+ void store(Class<?> vClass, Class<?> eClass,
+ int length,
+ Object base, long offset,
+ V v, C container, int index,
StoreVectorOperation<C, V> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
defaultImpl.store(container, index, v);
}
- public interface StoreVectorMaskedOperation<C, V extends Vector<E>, M extends VectorMask<E>, E> {
+ public interface StoreVectorMaskedOperation<C,
+ V extends Vector<?>,
+ M extends VectorMask<?>> {
void store(C container, int index, V v, M m);
}
@@ -425,18 +460,20 @@ public class VectorSupport {
V extends Vector<E>,
M extends VectorMask<E>,
E>
- void storeMasked(Class<? extends V> vectorClass, Class<M> maskClass, Class<E> elementType,
- int length, Object base, long offset, // Unsafe addressing
- V v, M m,
- C container, int index, // Arguments for default implementation
- StoreVectorMaskedOperation<C, V, M, E> defaultImpl) {
+ void storeMasked(Class<? extends V> vClass, Class<M> mClass, Class<E> eClass,
+ int length,
+ Object base, long offset,
+ V v, M m, C container, int index,
+ StoreVectorMaskedOperation<C, V, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
defaultImpl.store(container, index, v, m);
}
/* ============================================================================ */
- public interface StoreVectorOperationWithMap<C, V extends Vector<E>, M extends VectorMask<E>, E> {
+ public interface StoreVectorOperationWithMap<C,
+ V extends Vector<?>,
+ M extends VectorMask<?>> {
void storeWithMap(C container, int index, V v, int[] indexMap, int indexM, M m);
}
@@ -447,11 +484,13 @@ public class VectorSupport {
W extends Vector<Integer>,
M extends VectorMask<E>,
E>
- void storeWithMap(Class<? extends V> vectorClass, Class<M> maskClass, Class<E> elementType,
- int length, Class<? extends Vector<Integer>> vectorIndexClass, Object base, long offset, // Unsafe addressing
- W index_vector, V v, M m,
- C container, int index, int[] indexMap, int indexM, // Arguments for default implementation
- StoreVectorOperationWithMap<C, V, M, E> defaultImpl) {
+ void storeWithMap(Class<? extends V> vClass, Class<M> mClass, Class<E> eClass,
+ int length,
+ Class<? extends Vector<Integer>> vectorIndexClass,
+ Object base, long offset,
+ W index_vector,
+ V v, M m, C container, int index, int[] indexMap, int indexM,
+ StoreVectorOperationWithMap<C, V, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
defaultImpl.storeWithMap(container, index, v, indexMap, indexM, m);
}
@@ -460,17 +499,21 @@ public class VectorSupport {
@IntrinsicCandidate
public static
- <VM>
- boolean test(int cond, Class<?> vmClass, Class<?> elementType, int length,
- VM vm1, VM vm2,
- BiFunction<VM, VM, Boolean> defaultImpl) {
+ <M extends VectorMask<E>,
+ E>
+ boolean test(int cond,
+ Class<?> mClass, Class<?> eClass,
+ int length,
+ M m1, M m2,
+ BiFunction<M, M, Boolean> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
- return defaultImpl.apply(vm1, vm2);
+ return defaultImpl.apply(m1, m2);
}
/* ============================================================================ */
- public interface VectorCompareOp<V,M> {
+ public interface VectorCompareOp<V extends Vector<?>,
+ M extends VectorMask<?>> {
M apply(int cond, V v1, V v2, M m);
}
@@ -479,38 +522,41 @@ public class VectorSupport {
<V extends Vector<E>,
M extends VectorMask<E>,
E>
- M compare(int cond, Class<? extends V> vectorClass, Class<M> maskClass, Class<E> elementType, int length,
+ M compare(int cond,
+ Class<? extends V> vectorClass, Class<M> mClass, Class<E> eClass,
+ int length,
V v1, V v2, M m,
- VectorCompareOp<V,M> defaultImpl) {
+ VectorCompareOp<V, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.apply(cond, v1, v2, m);
}
/* ============================================================================ */
- public interface VectorRearrangeOp<V extends Vector<E>, Sh extends VectorShuffle<E>,
- M extends VectorMask<E>, E> {
- V apply(V v1, Sh shuffle, M mask);
+ public interface VectorRearrangeOp<V extends Vector<?>,
+ SH extends VectorShuffle<?>,
+ M extends VectorMask<?>> {
+ V apply(V v, SH sh, M m);
}
@IntrinsicCandidate
public static
<V extends Vector<E>,
- Sh extends VectorShuffle<E>,
+ SH extends VectorShuffle<E>,
M extends VectorMask<E>,
E>
- V rearrangeOp(Class<? extends V> vectorClass, Class<Sh> shuffleClass, Class<M> maskClass, Class<E> elementType, int vlen,
- V v1, Sh sh, M m,
- VectorRearrangeOp<V, Sh, M, E> defaultImpl) {
+ V rearrangeOp(Class<? extends V> vClass, Class<SH> shClass, Class<M> mClass, Class<E> eClass,
+ int length,
+ V v, SH sh, M m,
+ VectorRearrangeOp<V, SH, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
- return defaultImpl.apply(v1, sh, m);
+ return defaultImpl.apply(v, sh, m);
}
/* ============================================================================ */
- public interface VectorBlendOp<V extends Vector<E>,
- M extends VectorMask<E>,
- E> {
- V apply(V v1, V v2, M mask);
+ public interface VectorBlendOp<V extends Vector<?>,
+ M extends VectorMask<?>> {
+ V apply(V v1, V v2, M m);
}
@IntrinsicCandidate
@@ -518,16 +564,18 @@ public class VectorSupport {
<V extends Vector<E>,
M extends VectorMask<E>,
E>
- V blend(Class<? extends V> vectorClass, Class<M> maskClass, Class<E> elementType, int length,
+ V blend(Class<? extends V> vClass, Class<M> mClass, Class<E> eClass,
+ int length,
V v1, V v2, M m,
- VectorBlendOp<V, M, E> defaultImpl) {
+ VectorBlendOp<V, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.apply(v1, v2, m);
}
/* ============================================================================ */
- public interface VectorBroadcastIntOp<V extends Vector<?>, M extends VectorMask<?>> {
+ public interface VectorBroadcastIntOp<V extends Vector<?>,
+ M extends VectorMask<?>> {
V apply(V v, int n, M m);
}
@@ -536,8 +584,9 @@ public class VectorSupport {
<V extends Vector<E>,
M extends VectorMask<E>,
E>
- V broadcastInt(int opr, Class<? extends V> vectorClass, Class<? extends M> maskClass,
- Class<E> elementType, int length,
+ V broadcastInt(int opr,
+ Class<? extends V> vClass, Class<? extends M> mClass, Class<E> eClass,
+ int length,
V v, int n, M m,
VectorBroadcastIntOp<V, M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
@@ -546,8 +595,10 @@ public class VectorSupport {
/* ============================================================================ */
- public interface VectorConvertOp<VOUT, VIN, S> {
- VOUT apply(VIN v, S species);
+ public interface VectorConvertOp<VOUT extends VectorPayload,
+ VIN extends VectorPayload,
+ S extends VectorSpecies<?>> {
+ VOUT apply(VIN v, S s);
}
// Users of this intrinsic assume that it respects
@@ -559,8 +610,8 @@ public class VectorSupport {
VIN extends VectorPayload,
S extends VectorSpecies<?>>
VOUT convert(int oprId,
- Class<?> fromVectorClass, Class<?> fromElementType, int fromVLen,
- Class<?> toVectorClass, Class<?> toElementType, int toVLen,
+ Class<?> fromVectorClass, Class<?> fromeClass, int fromVLen,
+ Class<?> toVectorClass, Class<?> toeClass, int toVLen,
VIN v, S s,
VectorConvertOp<VOUT, VIN, S> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
@@ -570,7 +621,9 @@ public class VectorSupport {
/* ============================================================================ */
@IntrinsicCandidate
- public static <V> V maybeRebox(V v) {
+ public static
+ <VP extends VectorPayload>
+ VP maybeRebox(VP v) {
// The fence is added here to avoid memory aliasing problems in C2 between scalar & vector accesses.
// TODO: move the fence generation into C2. Generate only when reboxing is taking place.
U.loadFence();
@@ -578,14 +631,18 @@ public class VectorSupport {
}
/* ============================================================================ */
- public interface VectorMaskOp<M> {
+ public interface VectorMaskOp<M extends VectorMask<?>> {
int apply(M m);
}
@IntrinsicCandidate
public static
- <E, M>
- int maskReductionCoerced(int oper, Class<? extends M> maskClass, Class<?> elemClass, int length, M m,
+ <M extends VectorMask<E>,
+ E>
+ int maskReductionCoerced(int oper,
+ Class<? extends M> mClass, Class<?> eClass,
+ int length,
+ M m,
VectorMaskOp<M> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.apply(m);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment