@@ -625,16 +625,20 @@ public enum ASIMDInstruction {
625
625
CMLT_ZERO (0b01010 << 12 ),
626
626
ABS (0b01011 << 12 ),
627
627
XTN (0b10010 << 12 ),
628
+ SQXTN (0b10100 << 12 ),
629
+ UQXTN (UBit | 0b10100 << 12 ),
628
630
/* size 0x */
629
631
FCVTN (0b10110 << 12 ),
630
632
FCVTL (0b10111 << 12 ),
631
633
SCVTF (0b11101 << 12 ),
634
+ UCVTF (UBit | 0b11101 << 12 ),
632
635
/* size 1x */
633
636
FCMGT_ZERO (0b01100 << 12 ),
634
637
FCMEQ_ZERO (0b01101 << 12 ),
635
638
FCMLT_ZERO (0b01110 << 12 ),
636
639
FABS (0b01111 << 12 ),
637
640
FCVTZS (0b11011 << 12 ),
641
+ FCVTZU (UBit | 0b11011 << 12 ),
638
642
/* UBit 1, size xx */
639
643
REV32 (UBit | 0b00000 << 12 ),
640
644
CMGE_ZERO (UBit | 0b01000 << 12 ),
@@ -1979,6 +1983,25 @@ public void fcvtzsVV(ASIMDSize size, ElementSize eSize, Register dst, Register s
1979
1983
twoRegMiscEncoding (ASIMDInstruction .FCVTZS , size , elemSize1X (eSize ), dst , src );
1980
1984
}
1981
1985
1986
+ /**
1987
+ * Floating-point convert to unsigned integer, rounding toward zero.<br>
1988
+ *
1989
+ * @param size register size.
1990
+ * @param eSize source element size. Must be ElementSize.Word or ElementSize.DoubleWord.
1991
+ * ElementSize.DoubleWord is only applicable when size is 128 (i.e. the operation is
1992
+ * performed on more than one element).
1993
+ * @param dst SIMD register.
1994
+ * @param src SIMD register.
1995
+ */
1996
+ public void fcvtzuVV (ASIMDSize size , ElementSize eSize , Register dst , Register src ) {
1997
+ assert usesMultipleLanes (size , eSize ) : "Must use multiple lanes " + size + " " + eSize ;
1998
+ assert dst .getRegisterCategory ().equals (SIMD ) : dst ;
1999
+ assert src .getRegisterCategory ().equals (SIMD ) : src ;
2000
+ assert eSize == ElementSize .Word || eSize == ElementSize .DoubleWord : eSize ;
2001
+
2002
+ twoRegMiscEncoding (ASIMDInstruction .FCVTZU , size , elemSize1X (eSize ), dst , src );
2003
+ }
2004
+
1982
2005
/**
1983
2006
* C7.2.97 floating point divide vector.<br>
1984
2007
*
@@ -2734,6 +2757,25 @@ public void scvtfVV(ASIMDSize size, ElementSize eSize, Register dst, Register sr
2734
2757
twoRegMiscEncoding (ASIMDInstruction .SCVTF , size , elemSize0X (eSize ), dst , src );
2735
2758
}
2736
2759
2760
+ /**
2761
+ * Unsigned integer convert to floating-point.<br>
2762
+ *
2763
+ * @param size register size.
2764
+ * @param eSize source element size. Must be ElementSize.Word or ElementSize.DoubleWord.
2765
+ * ElementSize.DoubleWord is only applicable when size is 128 (i.e. the operation is
2766
+ * performed on more than one element).
2767
+ * @param dst SIMD register.
2768
+ * @param src SIMD register.
2769
+ */
2770
+ public void ucvtfVV (ASIMDSize size , ElementSize eSize , Register dst , Register src ) {
2771
+ assert usesMultipleLanes (size , eSize ) : "Must use multiple lanes " + size + " " + eSize ;
2772
+ assert dst .getRegisterCategory ().equals (SIMD ) : dst ;
2773
+ assert src .getRegisterCategory ().equals (SIMD ) : src ;
2774
+ assert eSize == ElementSize .Word || eSize == ElementSize .DoubleWord : eSize ;
2775
+
2776
+ twoRegMiscEncoding (ASIMDInstruction .UCVTF , size , elemSize0X (eSize ), dst , src );
2777
+ }
2778
+
2737
2779
/**
2738
2780
* C7.2.239 SHA1 hash update.<br>
2739
2781
*
@@ -4096,6 +4138,48 @@ public void xtn2VV(ElementSize dstESize, Register dst, Register src) {
4096
4138
twoRegMiscEncoding (ASIMDInstruction .XTN , true , elemSizeXX (dstESize ), dst , src );
4097
4139
}
4098
4140
4141
+ /**
4142
+ * Signed saturating extract Narrow.<br>
4143
+ * <p>
4144
+ * From the manual: "This instruction reads each vector element from the source SIMD register,
4145
+ * saturates each value to half the original width, places the result into a vector, and writes
4146
+ * the vector to the destination SIMD register. All the values in this instruction are signed
4147
+ * integer values."
4148
+ *
4149
+ * @param dstESize destination element size. Cannot be ElementSize.DoubleWord. The source
4150
+ * element size is twice this width.
4151
+ * @param dst SIMD register.
4152
+ * @param src SIMD register.
4153
+ */
4154
+ public void sqxtnVV (ElementSize dstESize , Register dst , Register src ) {
4155
+ assert dst .getRegisterCategory ().equals (SIMD ) : dst ;
4156
+ assert src .getRegisterCategory ().equals (SIMD ) : src ;
4157
+ assert dstESize != ElementSize .DoubleWord : dstESize ;
4158
+
4159
+ twoRegMiscEncoding (ASIMDInstruction .SQXTN , false , elemSizeXX (dstESize ), dst , src );
4160
+ }
4161
+
4162
+ /**
4163
+ * Unsigned saturating extract Narrow.<br>
4164
+ * <p>
4165
+ * From the manual: "This instruction reads each vector element from the source SIMD register,
4166
+ * saturates each value to half the original width, places the result into a vector, and writes
4167
+ * the vector to the destination SIMD register. All the values in this instruction are unsigned
4168
+ * integer values."
4169
+ *
4170
+ * @param dstESize destination element size. Cannot be ElementSize.DoubleWord. The source
4171
+ * element size is twice this width.
4172
+ * @param dst SIMD register.
4173
+ * @param src SIMD register.
4174
+ */
4175
+ public void uqxtnVV (ElementSize dstESize , Register dst , Register src ) {
4176
+ assert dst .getRegisterCategory ().equals (SIMD ) : dst ;
4177
+ assert src .getRegisterCategory ().equals (SIMD ) : src ;
4178
+ assert dstESize != ElementSize .DoubleWord : dstESize ;
4179
+
4180
+ twoRegMiscEncoding (ASIMDInstruction .UQXTN , false , elemSizeXX (dstESize ), dst , src );
4181
+ }
4182
+
4099
4183
/**
4100
4184
* C7.2.403 Zip vectors (primary).
4101
4185
* <p>
0 commit comments