aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorSaurabh Jha <saurabh.jha@arm.com>2024-03-19 15:41:41 +0000
committerNick Clifton <nickc@redhat.com>2024-03-19 15:41:41 +0000
commitf3f34f2b26259dfa7ecd37c8ba079e18f69c6ab5 (patch)
treecd0d1146460074d39b7d36dea59ce58f15ab173b /gas
parent696f6b6660a082a401494b4f499c3acf3ed59c93 (diff)
downloadbinutils-f3f34f2b26259dfa7ecd37c8ba079e18f69c6ab5.zip
binutils-f3f34f2b26259dfa7ecd37c8ba079e18f69c6ab5.tar.gz
binutils-f3f34f2b26259dfa7ecd37c8ba079e18f69c6ab5.tar.bz2
gas, aarch64: Add faminmax extension
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-aarch64.c1
-rw-r--r--gas/testsuite/gas/aarch64/advsimd-faminmax-bad.d3
-rw-r--r--gas/testsuite/gas/aarch64/advsimd-faminmax-bad.l51
-rw-r--r--gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.d3
-rw-r--r--gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.l87
-rw-r--r--gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.s51
-rw-r--r--gas/testsuite/gas/aarch64/advsimd-faminmax.d60
-rw-r--r--gas/testsuite/gas/aarch64/advsimd-faminmax.s67
-rw-r--r--gas/testsuite/gas/aarch64/sme2-faminmax-bad.d3
-rw-r--r--gas/testsuite/gas/aarch64/sme2-faminmax-bad.l49
-rw-r--r--gas/testsuite/gas/aarch64/sme2-faminmax-illegal.d3
-rw-r--r--gas/testsuite/gas/aarch64/sme2-faminmax-illegal.l87
-rw-r--r--gas/testsuite/gas/aarch64/sme2-faminmax-illegal.s63
-rw-r--r--gas/testsuite/gas/aarch64/sme2-faminmax.d58
-rw-r--r--gas/testsuite/gas/aarch64/sme2-faminmax.s67
-rw-r--r--gas/testsuite/gas/aarch64/sve2-faminmax-bad.d3
-rw-r--r--gas/testsuite/gas/aarch64/sve2-faminmax-bad.l81
-rw-r--r--gas/testsuite/gas/aarch64/sve2-faminmax-illegal.d3
-rw-r--r--gas/testsuite/gas/aarch64/sve2-faminmax-illegal.l123
-rw-r--r--gas/testsuite/gas/aarch64/sve2-faminmax-illegal.s71
-rw-r--r--gas/testsuite/gas/aarch64/sve2-faminmax-warning.s0
-rw-r--r--gas/testsuite/gas/aarch64/sve2-faminmax.d90
-rw-r--r--gas/testsuite/gas/aarch64/sve2-faminmax.s95
23 files changed, 1119 insertions, 0 deletions
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index d6dab86..6ad4fae 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -10476,6 +10476,7 @@ static const struct aarch64_option_cpu_value_table aarch64_features[] = {
{"sve2p1", AARCH64_FEATURE (SVE2p1), AARCH64_FEATURE (SVE2)},
{"rcpc3", AARCH64_FEATURE (RCPC3), AARCH64_FEATURE (RCPC2)},
{"cpa", AARCH64_FEATURE (CPA), AARCH64_NO_FEATURES},
+ {"faminmax", AARCH64_FEATURE (FAMINMAX), AARCH64_FEATURE (SIMD)},
{NULL, AARCH64_NO_FEATURES, AARCH64_NO_FEATURES},
};
diff --git a/gas/testsuite/gas/aarch64/advsimd-faminmax-bad.d b/gas/testsuite/gas/aarch64/advsimd-faminmax-bad.d
new file mode 100644
index 0000000..fcf64e0
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/advsimd-faminmax-bad.d
@@ -0,0 +1,3 @@
+#as:
+#source: advsimd-faminmax.s
+#error_output: advsimd-faminmax-bad.l \ No newline at end of file
diff --git a/gas/testsuite/gas/aarch64/advsimd-faminmax-bad.l b/gas/testsuite/gas/aarch64/advsimd-faminmax-bad.l
new file mode 100644
index 0000000..9492c67
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/advsimd-faminmax-bad.l
@@ -0,0 +1,51 @@
+[^ :]+: Assembler messages:
+.*: Error: selected processor does not support `famax v0.4h,v0.4h,v0.4h'
+.*: Error: selected processor does not support `famax v31.4h,v0.4h,v0.4h'
+.*: Error: selected processor does not support `famax v0.4h,v31.4h,v0.4h'
+.*: Error: selected processor does not support `famax v0.4h,v0.4h,v31.4h'
+.*: Error: selected processor does not support `famax v17.4h,v21.4h,v27.4h'
+.*: Error: selected processor does not support `famax v0.8h,v0.8h,v0.8h'
+.*: Error: selected processor does not support `famax v31.8h,v0.8h,v0.8h'
+.*: Error: selected processor does not support `famax v0.8h,v31.8h,v0.8h'
+.*: Error: selected processor does not support `famax v0.8h,v0.8h,v31.8h'
+.*: Error: selected processor does not support `famax v2.8h,v7.8h,v4.8h'
+.*: Error: selected processor does not support `famax v0.2s,v0.2s,v0.2s'
+.*: Error: selected processor does not support `famax v31.2s,v0.2s,v0.2s'
+.*: Error: selected processor does not support `famax v0.2s,v31.2s,v0.2s'
+.*: Error: selected processor does not support `famax v0.2s,v0.2s,v31.2s'
+.*: Error: selected processor does not support `famax v3.2s,v1.2s,v19.2s'
+.*: Error: selected processor does not support `famax v0.4s,v0.4s,v0.4s'
+.*: Error: selected processor does not support `famax v31.4s,v0.4s,v0.4s'
+.*: Error: selected processor does not support `famax v0.4s,v31.4s,v0.4s'
+.*: Error: selected processor does not support `famax v0.4s,v0.4s,v31.4s'
+.*: Error: selected processor does not support `famax v9.4s,v8.4s,v7.4s'
+.*: Error: selected processor does not support `famax v0.2d,v0.2d,v0.2d'
+.*: Error: selected processor does not support `famax v31.2d,v0.2d,v0.2d'
+.*: Error: selected processor does not support `famax v0.2d,v31.2d,v0.2d'
+.*: Error: selected processor does not support `famax v0.2d,v0.2d,v31.2d'
+.*: Error: selected processor does not support `famax v18.2d,v14.2d,v16.2d'
+.*: Error: selected processor does not support `famin v0.4h,v0.4h,v0.4h'
+.*: Error: selected processor does not support `famin v31.4h,v0.4h,v0.4h'
+.*: Error: selected processor does not support `famin v0.4h,v31.4h,v0.4h'
+.*: Error: selected processor does not support `famin v0.4h,v0.4h,v31.4h'
+.*: Error: selected processor does not support `famin v17.4h,v21.4h,v27.4h'
+.*: Error: selected processor does not support `famin v0.8h,v0.8h,v0.8h'
+.*: Error: selected processor does not support `famin v31.8h,v0.8h,v0.8h'
+.*: Error: selected processor does not support `famin v0.8h,v31.8h,v0.8h'
+.*: Error: selected processor does not support `famin v0.8h,v0.8h,v31.8h'
+.*: Error: selected processor does not support `famin v2.8h,v7.8h,v4.8h'
+.*: Error: selected processor does not support `famin v0.2s,v0.2s,v0.2s'
+.*: Error: selected processor does not support `famin v31.2s,v0.2s,v0.2s'
+.*: Error: selected processor does not support `famin v0.2s,v31.2s,v0.2s'
+.*: Error: selected processor does not support `famin v0.2s,v0.2s,v31.2s'
+.*: Error: selected processor does not support `famin v3.2s,v1.2s,v19.2s'
+.*: Error: selected processor does not support `famin v0.4s,v0.4s,v0.4s'
+.*: Error: selected processor does not support `famin v31.4s,v0.4s,v0.4s'
+.*: Error: selected processor does not support `famin v0.4s,v31.4s,v0.4s'
+.*: Error: selected processor does not support `famin v0.4s,v0.4s,v31.4s'
+.*: Error: selected processor does not support `famin v9.4s,v8.4s,v7.4s'
+.*: Error: selected processor does not support `famin v0.2d,v0.2d,v0.2d'
+.*: Error: selected processor does not support `famin v31.2d,v0.2d,v0.2d'
+.*: Error: selected processor does not support `famin v0.2d,v31.2d,v0.2d'
+.*: Error: selected processor does not support `famin v0.2d,v0.2d,v31.2d'
+.*: Error: selected processor does not support `famin v18.2d,v14.2d,v16.2d'
diff --git a/gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.d b/gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.d
new file mode 100644
index 0000000..8cce8fe
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.d
@@ -0,0 +1,3 @@
+#as: -march=armv8-a+faminmax
+#source: advsimd-faminmax-illegal.s
+#error_output: advsimd-faminmax-illegal.l \ No newline at end of file
diff --git a/gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.l b/gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.l
new file mode 100644
index 0000000..29340d6
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.l
@@ -0,0 +1,87 @@
+[^ :]+: Assembler messages:
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax v0.4s,v1.4h,v2.4h'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax v0\.4h, v1\.4h, v2\.4h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax v0\.8h, v1\.8h, v2\.8h
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax v31.8h,v30.8h,v29.2s'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax v31\.8h, v30\.8h, v29\.8h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax v31\.4h, v30\.4h, v29\.4h
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax v15.2s,v16.2d,v17.2s'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax v15\.2s, v16\.2s, v17\.2s
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax v15\.4s, v16\.4s, v17\.4s
+[^ :]+:[0-9]+: Info: famax v15\.2d, v16\.2d, v17\.2d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin v0.4s,v1.4h,v2.4h'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin v0\.4h, v1\.4h, v2\.4h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin v0\.8h, v1\.8h, v2\.8h
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin v31.8h,v30.8h,v29.2s'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin v31\.8h, v30\.8h, v29\.8h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin v31\.4h, v30\.4h, v29\.4h
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin v15.2s,v16.2d,v17.2s'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin v15\.2s, v16\.2s, v17\.2s
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin v15\.4s, v16\.4s, v17\.4s
+[^ :]+:[0-9]+: Info: famin v15\.2d, v16\.2d, v17\.2d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax v0\.8b,v1\.4b,v2\.4b'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax v0\.2s, v1\.2s, v2\.2s
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax v0\.4s, v1\.4s, v2\.4s
+[^ :]+:[0-9]+: Info: famax v0\.2d, v1\.2d, v2\.2d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax v10\.16b,v9\.16b,v8\.16b'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax v10\.2s, v9\.2s, v8\.2s
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax v10\.4s, v9\.4s, v8\.4s
+[^ :]+:[0-9]+: Info: famax v10\.2d, v9\.2d, v8\.2d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin v0\.8b,v1\.4b,v2\.4b'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin v0\.2s, v1\.2s, v2\.2s
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin v0\.4s, v1\.4s, v2\.4s
+[^ :]+:[0-9]+: Info: famin v0\.2d, v1\.2d, v2\.2d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin v10\.16b,v9\.16b,v8\.16b'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin v10\.2s, v9\.2s, v8\.2s
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin v10\.4s, v9\.4s, v8\.4s
+[^ :]+:[0-9]+: Info: famin v10\.2d, v9\.2d, v8\.2d
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 2 -- `famax v0.4h'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 3 -- `famax v0.4h,v1.4h'
+[^ :]+:[0-9]+: Error: unexpected characters following instruction at operand 3 -- `famax v0.4h,v1.4h,v2.4h,v3.4h'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 2 -- `famin v0.4h'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 3 -- `famin v0.4h,v1.4h'
+[^ :]+:[0-9]+: Error: unexpected characters following instruction at operand 3 -- `famin v0.4h,v1.4h,v2.4h,v3.4h'
+[^ :]+:[0-9]+: Error: unexpected character `x' in element size at operand 3 -- `famax v0.4h,v1.4h,v2.4x'
+[^ :]+:[0-9]+: Error: unexpected character `a' in element size at operand 2 -- `famax v0.2h,v2.2a,v1.2h'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 1 -- `famax v2.2t,v0.2d,v1.2d'
+[^ :]+:[0-9]+: Error: unexpected character `x' in element size at operand 3 -- `famin v0.4h,v1.4h,v2.4x'
+[^ :]+:[0-9]+: Error: unexpected character `a' in element size at operand 2 -- `famin v0.2h,v2.2a,v1.2h'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 1 -- `famin v2.2t,v0.2d,v1.2d'
+[^ :]+:[0-9]+: Error: expected an Advanced SIMD vector register at operand 2 -- `famax v19.2d,20.2d,v21.2d'
+[^ :]+:[0-9]+: Error: expected a register or register list at operand 1 -- `famax 19.4d,v20.4d,v21.4d'
+[^ :]+:[0-9]+: Error: expected an Advanced SIMD vector register at operand 3 -- `famax v19.2s,v20.2s,21.2s'
+[^ :]+:[0-9]+: Error: invalid use of vector register at operand 1 -- `famax v19,v20.2d,v21.2d'
+[^ :]+:[0-9]+: Error: invalid use of vector register at operand 2 -- `famax v19.2d,v20,v21.2d'
+[^ :]+:[0-9]+: Error: invalid use of vector register at operand 3 -- `famax v19.2d,v20.2d,v21'
+[^ :]+:[0-9]+: Error: expected an Advanced SIMD vector register at operand 2 -- `famin v19.2d,20.2d,v21.2d'
+[^ :]+:[0-9]+: Error: expected a register or register list at operand 1 -- `famin 19.4d,v20.4d,v21.4d'
+[^ :]+:[0-9]+: Error: expected an Advanced SIMD vector register at operand 3 -- `famin v19.2s,v20.2s,21.2s'
+[^ :]+:[0-9]+: Error: invalid use of vector register at operand 1 -- `famin v19,v20.2d,v21.2d'
+[^ :]+:[0-9]+: Error: invalid use of vector register at operand 2 -- `famin v19.2d,v20,v21.2d'
+[^ :]+:[0-9]+: Error: invalid use of vector register at operand 3 -- `famin v19.2d,v20.2d,v21'
+[^ :]+:[0-9]+: Error: expected a register or register list at operand 1 -- `famax v35.4d,v30.4d,v29.4d'
+[^ :]+:[0-9]+: Error: expected an Advanced SIMD vector register at operand 2 -- `famax v30.2s,v35.2s,v29.2s'
+[^ :]+:[0-9]+: Error: expected an Advanced SIMD vector register at operand 3 -- `famax v30.4s,v29.4s,v35.4s'
+[^ :]+:[0-9]+: Error: expected a register or register list at operand 1 -- `famin v35.4d,v30.4d,v29.4d'
+[^ :]+:[0-9]+: Error: expected an Advanced SIMD vector register at operand 2 -- `famin v30.2s,v35.2s,v29.2s'
+[^ :]+:[0-9]+: Error: expected an Advanced SIMD vector register at operand 3 -- `famin v30.4s,v29.4s,v35.4s'
diff --git a/gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.s b/gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.s
new file mode 100644
index 0000000..c52a469
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/advsimd-faminmax-illegal.s
@@ -0,0 +1,51 @@
+// Operand mismatch
+famax v0.4s, v1.4h, v2.4h
+famax v31.8h, v30.8h, v29.2s
+famax v15.2s, v16.2d, v17.2s
+famin v0.4s, v1.4h, v2.4h
+famin v31.8h, v30.8h, v29.2s
+famin v15.2s, v16.2d, v17.2s
+
+// Disallowed types
+famax v0.8b, v1.4b, v2.4b
+famax v10.16b, v9.16b, v8.16b
+famin v0.8b, v1.4b, v2.4b
+famin v10.16b, v9.16b, v8.16b
+
+// Incorrect number of arguments
+famax v0.4h
+famax v0.4h, v1.4h
+famax v0.4h, v1.4h, v2.4h, v3.4h
+famin v0.4h
+famin v0.4h, v1.4h
+famin v0.4h, v1.4h, v2.4h, v3.4h
+
+// Spelling mistakes
+famax v0.4h, v1.4h, v2.4x
+famax v0.2h, v2.2a, v1.2h
+famax v2.2t, v0.2d, v1.2d
+famin v0.4h, v1.4h, v2.4x
+famin v0.2h, v2.2a, v1.2h
+famin v2.2t, v0.2d, v1.2d
+
+// Missing qualifiers
+famax v19.2d, 20.2d, v21.2d
+famax 19.4d, v20.4d, v21.4d
+famax v19.2s, v20.2s, 21.2s
+famax v19, v20.2d, v21.2d
+famax v19.2d, v20, v21.2d
+famax v19.2d, v20.2d, v21
+famin v19.2d, 20.2d, v21.2d
+famin 19.4d, v20.4d, v21.4d
+famin v19.2s, v20.2s, 21.2s
+famin v19, v20.2d, v21.2d
+famin v19.2d, v20, v21.2d
+famin v19.2d, v20.2d, v21
+
+// Out of range numbers
+famax v35.4d, v30.4d, v29.4d
+famax v30.2s, v35.2s, v29.2s
+famax v30.4s, v29.4s, v35.4s
+famin v35.4d, v30.4d, v29.4d
+famin v30.2s, v35.2s, v29.2s
+famin v30.4s, v29.4s, v35.4s
diff --git a/gas/testsuite/gas/aarch64/advsimd-faminmax.d b/gas/testsuite/gas/aarch64/advsimd-faminmax.d
new file mode 100644
index 0000000..7be96b5
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/advsimd-faminmax.d
@@ -0,0 +1,60 @@
+#objdump: -dr
+#as: -march=armv8-a+faminmax
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+ <.*>:
+ 0: 0ec01c00 famax v0.4h, v0.4h, v0.4h
+ 4: 0ec01c1f famax v31.4h, v0.4h, v0.4h
+ 8: 0ec01fe0 famax v0.4h, v31.4h, v0.4h
+ c: 0edf1c00 famax v0.4h, v0.4h, v31.4h
+ 10: 0edb1eb1 famax v17.4h, v21.4h, v27.4h
+ 14: 4ec01c00 famax v0.8h, v0.8h, v0.8h
+ 18: 4ec01c1f famax v31.8h, v0.8h, v0.8h
+ 1c: 4ec01fe0 famax v0.8h, v31.8h, v0.8h
+ 20: 4edf1c00 famax v0.8h, v0.8h, v31.8h
+ 24: 4ec41ce2 famax v2.8h, v7.8h, v4.8h
+ 28: 0ea0dc00 famax v0.2s, v0.2s, v0.2s
+ 2c: 0ea0dc1f famax v31.2s, v0.2s, v0.2s
+ 30: 0ea0dfe0 famax v0.2s, v31.2s, v0.2s
+ 34: 0ebfdc00 famax v0.2s, v0.2s, v31.2s
+ 38: 0eb3dc23 famax v3.2s, v1.2s, v19.2s
+ 3c: 4ea0dc00 famax v0.4s, v0.4s, v0.4s
+ 40: 4ea0dc1f famax v31.4s, v0.4s, v0.4s
+ 44: 4ea0dfe0 famax v0.4s, v31.4s, v0.4s
+ 48: 4ebfdc00 famax v0.4s, v0.4s, v31.4s
+ 4c: 4ea7dd09 famax v9.4s, v8.4s, v7.4s
+ 50: 4ee0dc00 famax v0.2d, v0.2d, v0.2d
+ 54: 4ee0dc1f famax v31.2d, v0.2d, v0.2d
+ 58: 4ee0dfe0 famax v0.2d, v31.2d, v0.2d
+ 5c: 4effdc00 famax v0.2d, v0.2d, v31.2d
+ 60: 4ef0ddd2 famax v18.2d, v14.2d, v16.2d
+ 64: 0ef3dc23 .inst 0x0ef3dc23 ; undefined
+ 68: 2ec01c00 famin v0.4h, v0.4h, v0.4h
+ 6c: 2ec01c1f famin v31.4h, v0.4h, v0.4h
+ 70: 2ec01fe0 famin v0.4h, v31.4h, v0.4h
+ 74: 2edf1c00 famin v0.4h, v0.4h, v31.4h
+ 78: 2edb1eb1 famin v17.4h, v21.4h, v27.4h
+ 7c: 6ec01c00 famin v0.8h, v0.8h, v0.8h
+ 80: 6ec01c1f famin v31.8h, v0.8h, v0.8h
+ 84: 6ec01fe0 famin v0.8h, v31.8h, v0.8h
+ 88: 6edf1c00 famin v0.8h, v0.8h, v31.8h
+ 8c: 6ec41ce2 famin v2.8h, v7.8h, v4.8h
+ 90: 2ea0dc00 famin v0.2s, v0.2s, v0.2s
+ 94: 2ea0dc1f famin v31.2s, v0.2s, v0.2s
+ 98: 2ea0dfe0 famin v0.2s, v31.2s, v0.2s
+ 9c: 2ebfdc00 famin v0.2s, v0.2s, v31.2s
+ a0: 2eb3dc23 famin v3.2s, v1.2s, v19.2s
+ a4: 6ea0dc00 famin v0.4s, v0.4s, v0.4s
+ a8: 6ea0dc1f famin v31.4s, v0.4s, v0.4s
+ ac: 6ea0dfe0 famin v0.4s, v31.4s, v0.4s
+ b0: 6ebfdc00 famin v0.4s, v0.4s, v31.4s
+ b4: 6ea7dd09 famin v9.4s, v8.4s, v7.4s
+ b8: 6ee0dc00 famin v0.2d, v0.2d, v0.2d
+ bc: 6ee0dc1f famin v31.2d, v0.2d, v0.2d
+ c0: 6ee0dfe0 famin v0.2d, v31.2d, v0.2d
+ c4: 6effdc00 famin v0.2d, v0.2d, v31.2d
+ c8: 6ef0ddd2 famin v18.2d, v14.2d, v16.2d
+ cc: 2ef3dc23 .inst 0x2ef3dc23 ; undefined \ No newline at end of file
diff --git a/gas/testsuite/gas/aarch64/advsimd-faminmax.s b/gas/testsuite/gas/aarch64/advsimd-faminmax.s
new file mode 100644
index 0000000..91bc9b5
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/advsimd-faminmax.s
@@ -0,0 +1,67 @@
+// Valid instructions
+famax v0.4h, v0.4h, v0.4h
+famax v31.4h, v0.4h, v0.4h
+famax v0.4h, v31.4h, v0.4h
+famax v0.4h, v0.4h, v31.4h
+famax v17.4h, v21.4h, v27.4h
+
+famax v0.8h, v0.8h, v0.8h
+famax v31.8h, v0.8h, v0.8h
+famax v0.8h, v31.8h, v0.8h
+famax v0.8h, v0.8h, v31.8h
+famax v2.8h, v7.8h, v4.8h
+
+famax v0.2s, v0.2s, v0.2s
+famax v31.2s, v0.2s, v0.2s
+famax v0.2s, v31.2s, v0.2s
+famax v0.2s, v0.2s, v31.2s
+famax v3.2s, v1.2s, v19.2s
+
+famax v0.4s, v0.4s, v0.4s
+famax v31.4s, v0.4s, v0.4s
+famax v0.4s, v31.4s, v0.4s
+famax v0.4s, v0.4s, v31.4s
+famax v9.4s, v8.4s, v7.4s
+
+famax v0.2d, v0.2d, v0.2d
+famax v31.2d, v0.2d, v0.2d
+famax v0.2d, v31.2d, v0.2d
+famax v0.2d, v0.2d, v31.2d
+famax v18.2d, v14.2d, v16.2d
+
+// Invalid instruction because Q = 0 and sz = 1 which is reserved
+.inst 0xef3dc23
+
+// Valid instructions
+famin v0.4h, v0.4h, v0.4h
+famin v31.4h, v0.4h, v0.4h
+famin v0.4h, v31.4h, v0.4h
+famin v0.4h, v0.4h, v31.4h
+famin v17.4h, v21.4h, v27.4h
+
+famin v0.8h, v0.8h, v0.8h
+famin v31.8h, v0.8h, v0.8h
+famin v0.8h, v31.8h, v0.8h
+famin v0.8h, v0.8h, v31.8h
+famin v2.8h, v7.8h, v4.8h
+
+famin v0.2s, v0.2s, v0.2s
+famin v31.2s, v0.2s, v0.2s
+famin v0.2s, v31.2s, v0.2s
+famin v0.2s, v0.2s, v31.2s
+famin v3.2s, v1.2s, v19.2s
+
+famin v0.4s, v0.4s, v0.4s
+famin v31.4s, v0.4s, v0.4s
+famin v0.4s, v31.4s, v0.4s
+famin v0.4s, v0.4s, v31.4s
+famin v9.4s, v8.4s, v7.4s
+
+famin v0.2d, v0.2d, v0.2d
+famin v31.2d, v0.2d, v0.2d
+famin v0.2d, v31.2d, v0.2d
+famin v0.2d, v0.2d, v31.2d
+famin v18.2d, v14.2d, v16.2d
+
+// Invalid instruction because Q = 0 and sz = 1 which is reserved
+.inst 0x2ef3dc23
diff --git a/gas/testsuite/gas/aarch64/sme2-faminmax-bad.d b/gas/testsuite/gas/aarch64/sme2-faminmax-bad.d
new file mode 100644
index 0000000..dac2d47
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sme2-faminmax-bad.d
@@ -0,0 +1,3 @@
+#as: -march=armv8-a+faminmax
+#source: sme2-faminmax.s
+#error_output: sme2-faminmax-bad.l \ No newline at end of file
diff --git a/gas/testsuite/gas/aarch64/sme2-faminmax-bad.l b/gas/testsuite/gas/aarch64/sme2-faminmax-bad.l
new file mode 100644
index 0000000..513b430
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sme2-faminmax-bad.l
@@ -0,0 +1,49 @@
+[^ :]+: Assembler messages:
+.*: Error: selected processor does not support `famax {z0.h-z1.h},{z0.h-z1.h},{z0.h-z1.h}'
+.*: Error: selected processor does not support `famax {z30.h-z31.h},{z30.h-z31.h},{z0.h-z1.h}'
+.*: Error: selected processor does not support `famax {z0.h-z1.h},{z0.h-z1.h},{z30.h-z31.h}'
+.*: Error: selected processor does not support `famax {z18.h-z19.h},{z18.h-z19.h},{z26.h-z27.h}'
+.*: Error: selected processor does not support `famax {z0.s-z1.s},{z0.s-z1.s},{z0.s-z1.s}'
+.*: Error: selected processor does not support `famax {z30.s-z31.s},{z30.s-z31.s},{z0.s-z1.s}'
+.*: Error: selected processor does not support `famax {z0.s-z1.s},{z0.s-z1.s},{z30.s-z31.s}'
+.*: Error: selected processor does not support `famax {z4.s-z5.s},{z4.s-z5.s},{z10.s-z11.s}'
+.*: Error: selected processor does not support `famax {z0.d-z1.d},{z0.d-z1.d},{z0.d-z1.d}'
+.*: Error: selected processor does not support `famax {z30.d-z31.d},{z30.d-z31.d},{z0.d-z1.d}'
+.*: Error: selected processor does not support `famax {z0.d-z1.d},{z0.d-z1.d},{z30.d-z31.d}'
+.*: Error: selected processor does not support `famax {z28.d-z29.d},{z28.d-z29.d},{z8.d-z9.d}'
+.*: Error: selected processor does not support `famax {z0.h-z3.h},{z0.h-z3.h},{z0.h-z3.h}'
+.*: Error: selected processor does not support `famax {z28.h-z31.h},{z28.h-z31.h},{z0.h-z3.h}'
+.*: Error: selected processor does not support `famax {z0.h-z3.h},{z0.h-z3.h},{z28.h-z31.h}'
+.*: Error: selected processor does not support `famax {z16.h-z19.h},{z16.h-z19.h},{z20.h-z23.h}'
+.*: Error: selected processor does not support `famax {z0.s-z3.s},{z0.s-z3.s},{z0.s-z3.s}'
+.*: Error: selected processor does not support `famax {z28.s-z31.s},{z28.s-z31.s},{z0.s-z3.s}'
+.*: Error: selected processor does not support `famax {z0.s-z3.s},{z0.s-z3.s},{z28.s-z31.s}'
+.*: Error: selected processor does not support `famax {z24.s-z27.s},{z24.s-z27.s},{z4.s-z7.s}'
+.*: Error: selected processor does not support `famax {z0.d-z3.d},{z0.d-z3.d},{z0.d-z3.d}'
+.*: Error: selected processor does not support `famax {z28.d-z31.d},{z28.d-z31.d},{z0.d-z3.d}'
+.*: Error: selected processor does not support `famax {z0.d-z3.d},{z0.d-z3.d},{z28.d-z31.d}'
+.*: Error: selected processor does not support `famax {z12.d-z15.d},{z12.d-z15.d},{z8.d-z11.d}'
+.*: Error: selected processor does not support `famin {z0.h-z1.h},{z0.h-z1.h},{z0.h-z1.h}'
+.*: Error: selected processor does not support `famin {z30.h-z31.h},{z30.h-z31.h},{z0.h-z1.h}'
+.*: Error: selected processor does not support `famin {z0.h-z1.h},{z0.h-z1.h},{z30.h-z31.h}'
+.*: Error: selected processor does not support `famin {z18.h-z19.h},{z18.h-z19.h},{z26.h-z27.h}'
+.*: Error: selected processor does not support `famin {z0.s-z1.s},{z0.s-z1.s},{z0.s-z1.s}'
+.*: Error: selected processor does not support `famin {z30.s-z31.s},{z30.s-z31.s},{z0.s-z1.s}'
+.*: Error: selected processor does not support `famin {z0.s-z1.s},{z0.s-z1.s},{z30.s-z31.s}'
+.*: Error: selected processor does not support `famin {z4.s-z5.s},{z4.s-z5.s},{z10.s-z11.s}'
+.*: Error: selected processor does not support `famin {z0.d-z1.d},{z0.d-z1.d},{z0.d-z1.d}'
+.*: Error: selected processor does not support `famin {z30.d-z31.d},{z30.d-z31.d},{z0.d-z1.d}'
+.*: Error: selected processor does not support `famin {z0.d-z1.d},{z0.d-z1.d},{z30.d-z31.d}'
+.*: Error: selected processor does not support `famin {z28.d-z29.d},{z28.d-z29.d},{z8.d-z9.d}'
+.*: Error: selected processor does not support `famin {z0.h-z3.h},{z0.h-z3.h},{z0.h-z3.h}'
+.*: Error: selected processor does not support `famin {z28.h-z31.h},{z28.h-z31.h},{z0.h-z3.h}'
+.*: Error: selected processor does not support `famin {z0.h-z3.h},{z0.h-z3.h},{z28.h-z31.h}'
+.*: Error: selected processor does not support `famin {z16.h-z19.h},{z16.h-z19.h},{z20.h-z23.h}'
+.*: Error: selected processor does not support `famin {z0.s-z3.s},{z0.s-z3.s},{z0.s-z3.s}'
+.*: Error: selected processor does not support `famin {z28.s-z31.s},{z28.s-z31.s},{z0.s-z3.s}'
+.*: Error: selected processor does not support `famin {z0.s-z3.s},{z0.s-z3.s},{z28.s-z31.s}'
+.*: Error: selected processor does not support `famin {z24.s-z27.s},{z24.s-z27.s},{z4.s-z7.s}'
+.*: Error: selected processor does not support `famin {z0.d-z3.d},{z0.d-z3.d},{z0.d-z3.d}'
+.*: Error: selected processor does not support `famin {z28.d-z31.d},{z28.d-z31.d},{z0.d-z3.d}'
+.*: Error: selected processor does not support `famin {z0.d-z3.d},{z0.d-z3.d},{z28.d-z31.d}'
+.*: Error: selected processor does not support `famin {z12.d-z15.d},{z12.d-z15.d},{z8.d-z11.d}'
diff --git a/gas/testsuite/gas/aarch64/sme2-faminmax-illegal.d b/gas/testsuite/gas/aarch64/sme2-faminmax-illegal.d
new file mode 100644
index 0000000..d6ac360
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sme2-faminmax-illegal.d
@@ -0,0 +1,3 @@
+#as: -march=armv8-a+faminmax+sme2
+#source: sme2-faminmax-illegal.s
+#error_output: sme2-faminmax-illegal.l
diff --git a/gas/testsuite/gas/aarch64/sme2-faminmax-illegal.l b/gas/testsuite/gas/aarch64/sme2-faminmax-illegal.l
new file mode 100644
index 0000000..6eb0a00
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sme2-faminmax-illegal.l
@@ -0,0 +1,87 @@
+[^ :]+: Assembler messages:
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax {z18\.h-z19\.h},{z18\.h-z19\.h},{z30\.s-z31\.s}'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax {z18\.h-z19\.h}, {z18\.h-z19\.h}, {z30\.h-z31\.h}
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax {z18\.s-z19\.s}, {z18\.s-z19\.s}, {z30\.s-z31\.s}
+[^ :]+:[0-9]+: Info: famax {z18\.d-z19\.d}, {z18\.d-z19\.d}, {z30\.d-z31\.d}
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax {z30\.s-z31\.s},{z30\.s-z31\.s},{z18\.h-z19\.h}'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax {z30\.s-z31\.s}, {z30\.s-z31\.s}, {z18\.s-z19\.s}
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax {z30\.h-z31\.h}, {z30\.h-z31\.h}, {z18\.h-z19\.h}
+[^ :]+:[0-9]+: Info: famax {z30\.d-z31\.d}, {z30\.d-z31\.d}, {z18\.d-z19\.d}
+[^ :]+:[0-9]+: Error: expected a list of 4 registers at operand 3 -- `famax {z24\.s-z27\.s},{z24\.s-z27\.s},{z30\.s-z31\.s}'
+[^ :]+:[0-9]+: Error: expected a list of 2 registers at operand 3 -- `famax {z30\.h-z31\.h},{z30\.h-z31\.h},{z24\.h-z27\.h}'
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin {z18\.h-z19\.h},{z18\.h-z19\.h},{z30\.s-z31\.s}'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin {z18\.h-z19\.h}, {z18\.h-z19\.h}, {z30\.h-z31\.h}
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin {z18\.s-z19\.s}, {z18\.s-z19\.s}, {z30\.s-z31\.s}
+[^ :]+:[0-9]+: Info: famin {z18\.d-z19\.d}, {z18\.d-z19\.d}, {z30\.d-z31\.d}
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin {z30\.s-z31\.s},{z30\.s-z31\.s},{z18\.h-z19\.h}'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin {z30\.s-z31\.s}, {z30\.s-z31\.s}, {z18\.s-z19\.s}
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin {z30\.h-z31\.h}, {z30\.h-z31\.h}, {z18\.h-z19\.h}
+[^ :]+:[0-9]+: Info: famin {z30\.d-z31\.d}, {z30\.d-z31\.d}, {z18\.d-z19\.d}
+[^ :]+:[0-9]+: Error: expected a list of 4 registers at operand 3 -- `famin {z24\.s-z27\.s},{z24\.s-z27\.s},{z30\.s-z31\.s}'
+[^ :]+:[0-9]+: Error: expected a list of 2 registers at operand 3 -- `famin {z30\.h-z31\.h},{z30\.h-z31\.h},{z24\.h-z27\.h}'
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax {z18\.b-z19\.b},{z18\.b-z19\.b},{z30\.b-z31\.b}'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax {z18\.h-z19\.h}, {z18\.h-z19\.h}, {z30\.h-z31\.h}
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax {z18\.s-z19\.s}, {z18\.s-z19\.s}, {z30\.s-z31\.s}
+[^ :]+:[0-9]+: Info: famax {z18\.d-z19\.d}, {z18\.d-z19\.d}, {z30\.d-z31\.d}
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax {z24\.b-z27\.b},{z24\.b-z27\.b},{z19\.b-z22\.b}'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax {z24\.h-z27\.h}, {z24\.h-z27\.h}, {z19\.h-z22\.h}
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax {z24\.s-z27\.s}, {z24\.s-z27\.s}, {z19\.s-z22\.s}
+[^ :]+:[0-9]+: Info: famax {z24\.d-z27\.d}, {z24\.d-z27\.d}, {z19\.d-z22\.d}
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin {z18\.b-z19\.b},{z18\.b-z19\.b},{z30\.b-z31\.b}'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin {z18\.h-z19\.h}, {z18\.h-z19\.h}, {z30\.h-z31\.h}
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin {z18\.s-z19\.s}, {z18\.s-z19\.s}, {z30\.s-z31\.s}
+[^ :]+:[0-9]+: Info: famin {z18\.d-z19\.d}, {z18\.d-z19\.d}, {z30\.d-z31\.d}
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin {z24\.b-z27\.b},{z24\.b-z27\.b},{z19\.b-z22\.b}'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin {z24\.h-z27\.h}, {z24\.h-z27\.h}, {z19\.h-z22\.h}
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin {z24\.s-z27\.s}, {z24\.s-z27\.s}, {z19\.s-z22\.s}
+[^ :]+:[0-9]+: Info: famin {z24\.d-z27\.d}, {z24\.d-z27\.d}, {z19\.d-z22\.d}
+[^ :]+:[0-9]+: Error: expected a list of 2 or 4 registers at operand 1 -- `famax {z18\.h-z20\.h},{z18\.h-z20\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: too many registers in vector register list at operand 1 -- `famax {z27\.s-z31\.s},{z27\.s-z31\.s},{z16\.s-z20\.s}'
+[^ :]+:[0-9]+: Error: operand 2 must be the same register as operand 1 -- `famax {z27\.s-z28\.s},{z27\.s-z30\.s},{z16\.s-z17\.s}'
+[^ :]+:[0-9]+: Error: expected a list of 2 or 4 registers at operand 1 -- `famin {z18\.h-z20\.h},{z18\.h-z20\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: too many registers in vector register list at operand 1 -- `famin {z27\.s-z31\.s},{z27\.s-z31\.s},{z16\.s-z20\.s}'
+[^ :]+:[0-9]+: Error: operand 2 must be the same register as operand 1 -- `famin {z27\.s-z28\.s},{z27\.s-z30\.s},{z16\.s-z17\.s}'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 2 -- `famax {z18\.h-z19\.h}'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 3 -- `famax {z18\.h-z19\.h},{z18\.h-z19\.h}'
+[^ :]+:[0-9]+: Error: unexpected characters following instruction at operand 3 -- `famax {z18\.h-z19\.h},{z18\.h-z19\.h},{z12\.h-z13\.h},{z12\.h-z13\.h}'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 2 -- `famin {z18\.h-z19\.h}'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 3 -- `famin {z18\.h-z19\.h},{z18\.h-z19\.h}'
+[^ :]+:[0-9]+: Error: unexpected characters following instruction at operand 3 -- `famin {z18\.h-z19\.h},{z18\.h-z19\.h},{z12\.h-z13\.h},{z12\.h-z13\.h}'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 3 -- `famax {z18\.h-z19\.h},{z18\.h-z19\.h},{z30\.t-z31\.t}'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 1 -- `famax {z18\.t-z19\.t},{z18\.h-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 3 -- `famin {z18\.h-z19\.h},{z18\.h-z19\.h},{z30\.t-z31\.t}'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 1 -- `famin {z18\.t-z19\.t},{z18\.h-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: syntax error in register list at operand 3 -- `famax {z18\.h-z19\.h},{z18\.h-z19\.h},\{30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: syntax error in register list at operand 2 -- `famax {z18\.h-z19\.h},\{18\.h-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: syntax error in register list at operand 1 -- `famax {z18\.h-19\.h},{z18\.h-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: missing type suffix at operand 3 -- `famax {z18\.h-z19\.h},{z18\.h-z19\.h},{z30-z31\.h}'
+[^ :]+:[0-9]+: Error: missing type suffix at operand 2 -- `famax {z18\.h-z19\.h},{z18-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: missing type suffix at operand 1 -- `famax {z18-z19\.h},{z18\.h-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: syntax error in register list at operand 3 -- `famin {z18\.h-z19\.h},{z18\.h-z19\.h},\{30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: syntax error in register list at operand 2 -- `famin {z18\.h-z19\.h},\{18\.h-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: syntax error in register list at operand 1 -- `famin {z18\.h-19\.h},{z18\.h-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: missing type suffix at operand 3 -- `famin {z18\.h-z19\.h},{z18\.h-z19\.h},{z30-z31\.h}'
+[^ :]+:[0-9]+: Error: missing type suffix at operand 2 -- `famin {z18\.h-z19\.h},{z18-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: missing type suffix at operand 1 -- `famin {z18-z19\.h},{z18\.h-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 3 -- `famax {z18\.h-z19\.h},{z18\.h-z19\.h},{z34\.h-z35\.h}'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 1 -- `famax {z34\.h-z35\.h},{z34\.h-z35\.h},{z18\.h-z19\.h}'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 3 -- `famin {z18\.h-z19\.h},{z18\.h-z19\.h},{z34\.h-z35\.h}'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 1 -- `famin {z34\.h-z35\.h},{z34\.h-z35\.h},{z18\.h-z19\.h}'
+[^ :]+:[0-9]+: Warning: SVE `movprfx' compatible instruction expected -- `famax {z18\.h-z19\.h},{z18\.h-z19\.h},{z30\.h-z31\.h}'
+[^ :]+:[0-9]+: Warning: SVE `movprfx' compatible instruction expected -- `famin {z18\.h-z19\.h},{z18\.h-z19\.h},{z30\.h-z31\.h}'
diff --git a/gas/testsuite/gas/aarch64/sme2-faminmax-illegal.s b/gas/testsuite/gas/aarch64/sme2-faminmax-illegal.s
new file mode 100644
index 0000000..b104501
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sme2-faminmax-illegal.s
@@ -0,0 +1,63 @@
+// Operand mismatch
+famax { z18.h - z19.h }, { z18.h - z19.h }, { z30.s - z31.s }
+famax { z30.s - z31.s }, { z30.s - z31.s }, { z18.h - z19.h }
+famax { z24.s - z27.s }, { z24.s - z27.s }, { z30.s - z31.s }
+famax { z30.h - z31.h }, { z30.h - z31.h }, { z24.h - z27.h }
+famin { z18.h - z19.h }, { z18.h - z19.h }, { z30.s - z31.s }
+famin { z30.s - z31.s }, { z30.s - z31.s }, { z18.h - z19.h }
+famin { z24.s - z27.s }, { z24.s - z27.s }, { z30.s - z31.s }
+famin { z30.h - z31.h }, { z30.h - z31.h }, { z24.h - z27.h }
+
+// Disallowed types
+famax { z18.b - z19.b }, { z18.b - z19.b }, { z30.b - z31.b }
+famax { z24.b - z27.b }, { z24.b - z27.b }, { z19.b - z22.b }
+famin { z18.b - z19.b }, { z18.b - z19.b }, { z30.b - z31.b }
+famin { z24.b - z27.b }, { z24.b - z27.b }, { z19.b - z22.b }
+
+// Incorrect operands
+famax { z18.h - z20.h }, { z18.h - z20.h }, { z30.h - z31.h }
+famax { z27.s - z31.s }, { z27.s - z31.s }, { z16.s - z20.s }
+famax { z27.s - z28.s }, { z27.s - z30.s }, { z16.s - z17.s }
+famin { z18.h - z20.h }, { z18.h - z20.h }, { z30.h - z31.h }
+famin { z27.s - z31.s }, { z27.s - z31.s }, { z16.s - z20.s }
+famin { z27.s - z28.s }, { z27.s - z30.s }, { z16.s - z17.s }
+
+// Incorrect number of arguments
+famax { z18.h - z19.h }
+famax { z18.h - z19.h }, { z18.h - z19.h }
+famax { z18.h - z19.h }, { z18.h - z19.h }, { z12.h - z13.h }, { z12.h - z13.h }
+famin { z18.h - z19.h }
+famin { z18.h - z19.h }, { z18.h - z19.h }
+famin { z18.h - z19.h }, { z18.h - z19.h }, { z12.h - z13.h }, { z12.h - z13.h }
+
+// Spelling mistakes
+famax { z18.h - z19.h }, { z18.h - z19.h }, { z30.t - z31.t }
+famax { z18.t - z19.t }, { z18.h - z19.h }, { z30.h - z31.h }
+famin { z18.h - z19.h }, { z18.h - z19.h }, { z30.t - z31.t }
+famin { z18.t - z19.t }, { z18.h - z19.h }, { z30.h - z31.h }
+
+// Missing qualifers
+famax { z18.h - z19.h }, { z18.h - z19.h }, { 30.h - z31.h }
+famax { z18.h - z19.h }, { 18.h - z19.h }, { z30.h - z31.h }
+famax { z18.h - 19.h }, { z18.h - z19.h }, { z30.h - z31.h }
+famax { z18.h - z19.h }, { z18.h - z19.h }, { z30 - z31.h }
+famax { z18.h - z19.h }, { z18 - z19.h }, { z30.h - z31.h }
+famax { z18 - z19.h }, { z18.h - z19.h }, { z30.h - z31.h }
+famin { z18.h - z19.h }, { z18.h - z19.h }, { 30.h - z31.h }
+famin { z18.h - z19.h }, { 18.h - z19.h }, { z30.h - z31.h }
+famin { z18.h - 19.h }, { z18.h - z19.h }, { z30.h - z31.h }
+famin { z18.h - z19.h }, { z18.h - z19.h }, { z30 - z31.h }
+famin { z18.h - z19.h }, { z18 - z19.h }, { z30.h - z31.h }
+famin { z18 - z19.h }, { z18.h - z19.h }, { z30.h - z31.h }
+
+// Out of range numbers
+famax { z18.h - z19.h }, { z18.h - z19.h }, { z34.h - z35.h }
+famax { z34.h - z35.h }, { z34.h - z35.h }, { z18.h - z19.h }
+famin { z18.h - z19.h }, { z18.h - z19.h }, { z34.h - z35.h }
+famin { z34.h - z35.h }, { z34.h - z35.h }, { z18.h - z19.h }
+
+// Preceded by movprfx
+movprfx z17, z9
+famax { z18.h - z19.h }, { z18.h - z19.h }, { z30.h - z31.h }
+movprfx z17, z9
+famin { z18.h - z19.h }, { z18.h - z19.h }, { z30.h - z31.h }
diff --git a/gas/testsuite/gas/aarch64/sme2-faminmax.d b/gas/testsuite/gas/aarch64/sme2-faminmax.d
new file mode 100644
index 0000000..9a6d69e
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sme2-faminmax.d
@@ -0,0 +1,58 @@
+#objdump: -dr
+#as: -march=armv8-a+faminmax+sme2
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+ <.*>:
+ 0: c160b140 famax {z0.h-z1.h}, {z0.h-z1.h}, {z0.h-z1.h}
+ 4: c160b15e famax {z30.h-z31.h}, {z30.h-z31.h}, {z0.h-z1.h}
+ 8: c17eb140 famax {z0.h-z1.h}, {z0.h-z1.h}, {z30.h-z31.h}
+ c: c17ab152 famax {z18.h-z19.h}, {z18.h-z19.h}, {z26.h-z27.h}
+ 10: c1a0b140 famax {z0.s-z1.s}, {z0.s-z1.s}, {z0.s-z1.s}
+ 14: c1a0b15e famax {z30.s-z31.s}, {z30.s-z31.s}, {z0.s-z1.s}
+ 18: c1beb140 famax {z0.s-z1.s}, {z0.s-z1.s}, {z30.s-z31.s}
+ 1c: c1aab144 famax {z4.s-z5.s}, {z4.s-z5.s}, {z10.s-z11.s}
+ 20: c1e0b140 famax {z0.d-z1.d}, {z0.d-z1.d}, {z0.d-z1.d}
+ 24: c1e0b15e famax {z30.d-z31.d}, {z30.d-z31.d}, {z0.d-z1.d}
+ 28: c1feb140 famax {z0.d-z1.d}, {z0.d-z1.d}, {z30.d-z31.d}
+ 2c: c1e8b15c famax {z28.d-z29.d}, {z28.d-z29.d}, {z8.d-z9.d}
+ 30: c160b940 famax {z0.h-z3.h}, {z0.h-z3.h}, {z0.h-z3.h}
+ 34: c160b95c famax {z28.h-z31.h}, {z28.h-z31.h}, {z0.h-z3.h}
+ 38: c17cb940 famax {z0.h-z3.h}, {z0.h-z3.h}, {z28.h-z31.h}
+ 3c: c174b950 famax {z16.h-z19.h}, {z16.h-z19.h}, {z20.h-z23.h}
+ 40: c1a0b940 famax {z0.s-z3.s}, {z0.s-z3.s}, {z0.s-z3.s}
+ 44: c1a0b95c famax {z28.s-z31.s}, {z28.s-z31.s}, {z0.s-z3.s}
+ 48: c1bcb940 famax {z0.s-z3.s}, {z0.s-z3.s}, {z28.s-z31.s}
+ 4c: c1a4b958 famax {z24.s-z27.s}, {z24.s-z27.s}, {z4.s-z7.s}
+ 50: c1e0b940 famax {z0.d-z3.d}, {z0.d-z3.d}, {z0.d-z3.d}
+ 54: c1e0b95c famax {z28.d-z31.d}, {z28.d-z31.d}, {z0.d-z3.d}
+ 58: c1fcb940 famax {z0.d-z3.d}, {z0.d-z3.d}, {z28.d-z31.d}
+ 5c: c1e8b94c famax {z12.d-z15.d}, {z12.d-z15.d}, {z8.d-z11.d}
+ 60: c128b94c .inst 0xc128b94c ; undefined
+ 64: c160b141 famin {z0.h-z1.h}, {z0.h-z1.h}, {z0.h-z1.h}
+ 68: c160b15f famin {z30.h-z31.h}, {z30.h-z31.h}, {z0.h-z1.h}
+ 6c: c17eb141 famin {z0.h-z1.h}, {z0.h-z1.h}, {z30.h-z31.h}
+ 70: c17ab153 famin {z18.h-z19.h}, {z18.h-z19.h}, {z26.h-z27.h}
+ 74: c1a0b141 famin {z0.s-z1.s}, {z0.s-z1.s}, {z0.s-z1.s}
+ 78: c1a0b15f famin {z30.s-z31.s}, {z30.s-z31.s}, {z0.s-z1.s}
+ 7c: c1beb141 famin {z0.s-z1.s}, {z0.s-z1.s}, {z30.s-z31.s}
+ 80: c1aab145 famin {z4.s-z5.s}, {z4.s-z5.s}, {z10.s-z11.s}
+ 84: c1e0b141 famin {z0.d-z1.d}, {z0.d-z1.d}, {z0.d-z1.d}
+ 88: c1e0b15f famin {z30.d-z31.d}, {z30.d-z31.d}, {z0.d-z1.d}
+ 8c: c1feb141 famin {z0.d-z1.d}, {z0.d-z1.d}, {z30.d-z31.d}
+ 90: c1e8b15d famin {z28.d-z29.d}, {z28.d-z29.d}, {z8.d-z9.d}
+ 94: c160b941 famin {z0.h-z3.h}, {z0.h-z3.h}, {z0.h-z3.h}
+ 98: c160b95d famin {z28.h-z31.h}, {z28.h-z31.h}, {z0.h-z3.h}
+ 9c: c17cb941 famin {z0.h-z3.h}, {z0.h-z3.h}, {z28.h-z31.h}
+ a0: c174b951 famin {z16.h-z19.h}, {z16.h-z19.h}, {z20.h-z23.h}
+ a4: c1a0b941 famin {z0.s-z3.s}, {z0.s-z3.s}, {z0.s-z3.s}
+ a8: c1a0b95d famin {z28.s-z31.s}, {z28.s-z31.s}, {z0.s-z3.s}
+ ac: c1bcb941 famin {z0.s-z3.s}, {z0.s-z3.s}, {z28.s-z31.s}
+ b0: c1a4b959 famin {z24.s-z27.s}, {z24.s-z27.s}, {z4.s-z7.s}
+ b4: c1e0b941 famin {z0.d-z3.d}, {z0.d-z3.d}, {z0.d-z3.d}
+ b8: c1e0b95d famin {z28.d-z31.d}, {z28.d-z31.d}, {z0.d-z3.d}
+ bc: c1fcb941 famin {z0.d-z3.d}, {z0.d-z3.d}, {z28.d-z31.d}
+ c0: c1e8b94d famin {z12.d-z15.d}, {z12.d-z15.d}, {z8.d-z11.d}
+ c4: c128b94d .inst 0xc128b94d ; undefined
diff --git a/gas/testsuite/gas/aarch64/sme2-faminmax.s b/gas/testsuite/gas/aarch64/sme2-faminmax.s
new file mode 100644
index 0000000..7fdad8c
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sme2-faminmax.s
@@ -0,0 +1,67 @@
+// Valid instructions
+famax { z0.h - z1.h }, { z0.h - z1.h }, { z0.h - z1.h }
+famax { z30.h - z31.h }, { z30.h - z31.h }, { z0.h - z1.h }
+famax { z0.h - z1.h }, { z0.h - z1.h }, { z30.h - z31.h }
+famax { z18.h - z19.h }, { z18.h - z19.h }, { z26.h - z27.h }
+
+famax { z0.s - z1.s }, { z0.s - z1.s }, { z0.s - z1.s }
+famax { z30.s - z31.s }, { z30.s - z31.s }, { z0.s - z1.s }
+famax { z0.s - z1.s }, { z0.s - z1.s }, { z30.s - z31.s }
+famax { z4.s - z5.s }, { z4.s - z5.s }, { z10.s - z11.s }
+
+famax { z0.d - z1.d }, { z0.d - z1.d }, { z0.d - z1.d }
+famax { z30.d - z31.d }, { z30.d - z31.d }, { z0.d - z1.d }
+famax { z0.d - z1.d }, { z0.d - z1.d }, { z30.d - z31.d }
+famax { z28.d - z29.d }, { z28.d - z29.d }, { z8.d - z9.d }
+
+famax { z0.h - z3.h }, { z0.h - z3.h }, { z0.h - z3.h }
+famax { z28.h - z31.h }, { z28.h - z31.h }, { z0.h - z3.h }
+famax { z0.h - z3.h }, { z0.h - z3.h }, { z28.h - z31.h }
+famax { z16.h - z19.h }, { z16.h - z19.h }, { z20.h - z23.h }
+
+famax { z0.s - z3.s }, { z0.s - z3.s }, { z0.s - z3.s }
+famax { z28.s - z31.s }, { z28.s - z31.s }, { z0.s - z3.s }
+famax { z0.s - z3.s }, { z0.s - z3.s }, { z28.s - z31.s }
+famax { z24.s - z27.s }, { z24.s - z27.s }, { z4.s - z7.s }
+
+famax { z0.d - z3.d }, { z0.d - z3.d }, { z0.d - z3.d }
+famax { z28.d - z31.d }, { z28.d - z31.d }, { z0.d - z3.d }
+famax { z0.d - z3.d }, { z0.d - z3.d }, { z28.d - z31.d }
+famax { z12.d - z15.d }, { z12.d - z15.d }, { z8.d - z11.d }
+
+// Invalid instruction because sz is 00 which is invalid
+.inst 0xc128b94c
+
+// Valid instructions
+famin { z0.h - z1.h }, { z0.h - z1.h }, { z0.h - z1.h }
+famin { z30.h - z31.h }, { z30.h - z31.h }, { z0.h - z1.h }
+famin { z0.h - z1.h }, { z0.h - z1.h }, { z30.h - z31.h }
+famin { z18.h - z19.h }, { z18.h - z19.h }, { z26.h - z27.h }
+
+famin { z0.s - z1.s }, { z0.s - z1.s }, { z0.s - z1.s }
+famin { z30.s - z31.s }, { z30.s - z31.s }, { z0.s - z1.s }
+famin { z0.s - z1.s }, { z0.s - z1.s }, { z30.s - z31.s }
+famin { z4.s - z5.s }, { z4.s - z5.s }, { z10.s - z11.s }
+
+famin { z0.d - z1.d }, { z0.d - z1.d }, { z0.d - z1.d }
+famin { z30.d - z31.d }, { z30.d - z31.d }, { z0.d - z1.d }
+famin { z0.d - z1.d }, { z0.d - z1.d }, { z30.d - z31.d }
+famin { z28.d - z29.d }, { z28.d - z29.d }, { z8.d - z9.d }
+
+famin { z0.h - z3.h }, { z0.h - z3.h }, { z0.h - z3.h }
+famin { z28.h - z31.h }, { z28.h - z31.h }, { z0.h - z3.h }
+famin { z0.h - z3.h }, { z0.h - z3.h }, { z28.h - z31.h }
+famin { z16.h - z19.h }, { z16.h - z19.h }, { z20.h - z23.h }
+
+famin { z0.s - z3.s }, { z0.s - z3.s }, { z0.s - z3.s }
+famin { z28.s - z31.s }, { z28.s - z31.s }, { z0.s - z3.s }
+famin { z0.s - z3.s }, { z0.s - z3.s }, { z28.s - z31.s }
+famin { z24.s - z27.s }, { z24.s - z27.s }, { z4.s - z7.s }
+
+famin { z0.d - z3.d }, { z0.d - z3.d }, { z0.d - z3.d }
+famin { z28.d - z31.d }, { z28.d - z31.d }, { z0.d - z3.d }
+famin { z0.d - z3.d }, { z0.d - z3.d }, { z28.d - z31.d }
+famin { z12.d - z15.d }, { z12.d - z15.d }, { z8.d - z11.d }
+
+// Invalid instruction because sz is 00 which is invalid
+.inst 0xc128B94d
diff --git a/gas/testsuite/gas/aarch64/sve2-faminmax-bad.d b/gas/testsuite/gas/aarch64/sve2-faminmax-bad.d
new file mode 100644
index 0000000..9e0de7d
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sve2-faminmax-bad.d
@@ -0,0 +1,3 @@
+#as: -march=armv8-a+faminmax
+#source: sve2-faminmax.s
+#error_output: sve2-faminmax-bad.l \ No newline at end of file
diff --git a/gas/testsuite/gas/aarch64/sve2-faminmax-bad.l b/gas/testsuite/gas/aarch64/sve2-faminmax-bad.l
new file mode 100644
index 0000000..8382dfd
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sve2-faminmax-bad.l
@@ -0,0 +1,81 @@
+[^ :]+: Assembler messages:
+.*: Error: selected processor does not support `famax z0.h,p0/m,z0.h,z0.h'
+.*: Error: selected processor does not support `famax z0.h,p2/m,z0.h,z0.h'
+.*: Error: selected processor does not support `famax z0.h,p7/m,z0.h,z0.h'
+.*: Error: selected processor does not support `famax z31.h,p0/m,z31.h,z0.h'
+.*: Error: selected processor does not support `famax z31.h,p2/m,z31.h,z0.h'
+.*: Error: selected processor does not support `famax z31.h,p7/m,z31.h,z0.h'
+.*: Error: selected processor does not support `famax z0.h,p0/m,z0.h,z31.h'
+.*: Error: selected processor does not support `famax z0.h,p2/m,z0.h,z31.h'
+.*: Error: selected processor does not support `famax z0.h,p7/m,z0.h,z31.h'
+.*: Error: selected processor does not support `famax z5.h,p0/m,z5.h,z7.h'
+.*: Error: selected processor does not support `famax z5.h,p2/m,z5.h,z7.h'
+.*: Error: selected processor does not support `famax z5.h,p7/m,z5.h,z7.h'
+.*: Error: selected processor does not support `famax z0.s,p0/m,z0.s,z0.s'
+.*: Error: selected processor does not support `famax z0.s,p2/m,z0.s,z0.s'
+.*: Error: selected processor does not support `famax z0.s,p7/m,z0.s,z0.s'
+.*: Error: selected processor does not support `famax z31.s,p0/m,z31.s,z0.s'
+.*: Error: selected processor does not support `famax z31.s,p2/m,z31.s,z0.s'
+.*: Error: selected processor does not support `famax z31.s,p7/m,z31.s,z0.s'
+.*: Error: selected processor does not support `famax z0.s,p0/m,z0.s,z31.s'
+.*: Error: selected processor does not support `famax z0.s,p2/m,z0.s,z31.s'
+.*: Error: selected processor does not support `famax z0.s,p7/m,z0.s,z31.s'
+.*: Error: selected processor does not support `famax z5.s,p0/m,z5.s,z7.s'
+.*: Error: selected processor does not support `famax z5.s,p2/m,z5.s,z7.s'
+.*: Error: selected processor does not support `famax z5.s,p7/m,z5.s,z7.s'
+.*: Error: selected processor does not support `famax z0.d,p0/m,z0.d,z0.d'
+.*: Error: selected processor does not support `famax z0.d,p2/m,z0.d,z0.d'
+.*: Error: selected processor does not support `famax z0.d,p7/m,z0.d,z0.d'
+.*: Error: selected processor does not support `famax z31.d,p0/m,z31.d,z0.d'
+.*: Error: selected processor does not support `famax z31.d,p2/m,z31.d,z0.d'
+.*: Error: selected processor does not support `famax z31.d,p7/m,z31.d,z0.d'
+.*: Error: selected processor does not support `famax z0.d,p0/m,z0.d,z31.d'
+.*: Error: selected processor does not support `famax z0.d,p2/m,z0.d,z31.d'
+.*: Error: selected processor does not support `famax z0.d,p7/m,z0.d,z31.d'
+.*: Error: selected processor does not support `famax z5.d,p0/m,z5.d,z7.d'
+.*: Error: selected processor does not support `famax z5.d,p2/m,z5.d,z7.d'
+.*: Error: selected processor does not support `famax z5.d,p7/m,z5.d,z7.d'
+.*: Error: selected processor does not support `movprfx z5,z9'
+.*: Error: selected processor does not support `famax z5.h,p7/m,z5.h,z7.h'
+.*: Error: selected processor does not support `movprfx z5.d,p7/m,z8.d'
+.*: Error: selected processor does not support `famax z5.d,p7/m,z5.d,z9.d'
+.*: Error: selected processor does not support `famin z0.h,p0/m,z0.h,z0.h'
+.*: Error: selected processor does not support `famin z0.h,p2/m,z0.h,z0.h'
+.*: Error: selected processor does not support `famin z0.h,p7/m,z0.h,z0.h'
+.*: Error: selected processor does not support `famin z31.h,p0/m,z31.h,z0.h'
+.*: Error: selected processor does not support `famin z31.h,p2/m,z31.h,z0.h'
+.*: Error: selected processor does not support `famin z31.h,p7/m,z31.h,z0.h'
+.*: Error: selected processor does not support `famin z0.h,p0/m,z0.h,z31.h'
+.*: Error: selected processor does not support `famin z0.h,p2/m,z0.h,z31.h'
+.*: Error: selected processor does not support `famin z0.h,p7/m,z0.h,z31.h'
+.*: Error: selected processor does not support `famin z5.h,p0/m,z5.h,z7.h'
+.*: Error: selected processor does not support `famin z5.h,p2/m,z5.h,z7.h'
+.*: Error: selected processor does not support `famin z5.h,p7/m,z5.h,z7.h'
+.*: Error: selected processor does not support `famin z0.s,p0/m,z0.s,z0.s'
+.*: Error: selected processor does not support `famin z0.s,p2/m,z0.s,z0.s'
+.*: Error: selected processor does not support `famin z0.s,p7/m,z0.s,z0.s'
+.*: Error: selected processor does not support `famin z31.s,p0/m,z31.s,z0.s'
+.*: Error: selected processor does not support `famin z31.s,p2/m,z31.s,z0.s'
+.*: Error: selected processor does not support `famin z31.s,p7/m,z31.s,z0.s'
+.*: Error: selected processor does not support `famin z0.s,p0/m,z0.s,z31.s'
+.*: Error: selected processor does not support `famin z0.s,p2/m,z0.s,z31.s'
+.*: Error: selected processor does not support `famin z0.s,p7/m,z0.s,z31.s'
+.*: Error: selected processor does not support `famin z5.s,p0/m,z5.s,z7.s'
+.*: Error: selected processor does not support `famin z5.s,p2/m,z5.s,z7.s'
+.*: Error: selected processor does not support `famin z5.s,p7/m,z5.s,z7.s'
+.*: Error: selected processor does not support `famin z0.d,p0/m,z0.d,z0.d'
+.*: Error: selected processor does not support `famin z0.d,p2/m,z0.d,z0.d'
+.*: Error: selected processor does not support `famin z0.d,p7/m,z0.d,z0.d'
+.*: Error: selected processor does not support `famin z31.d,p0/m,z31.d,z0.d'
+.*: Error: selected processor does not support `famin z31.d,p2/m,z31.d,z0.d'
+.*: Error: selected processor does not support `famin z31.d,p7/m,z31.d,z0.d'
+.*: Error: selected processor does not support `famin z0.d,p0/m,z0.d,z31.d'
+.*: Error: selected processor does not support `famin z0.d,p2/m,z0.d,z31.d'
+.*: Error: selected processor does not support `famin z0.d,p7/m,z0.d,z31.d'
+.*: Error: selected processor does not support `famin z5.d,p0/m,z5.d,z7.d'
+.*: Error: selected processor does not support `famin z5.d,p2/m,z5.d,z7.d'
+.*: Error: selected processor does not support `famin z5.d,p7/m,z5.d,z7.d'
+.*: Error: selected processor does not support `movprfx z5,z9'
+.*: Error: selected processor does not support `famin z5.h,p7/m,z5.h,z7.h'
+.*: Error: selected processor does not support `movprfx z5.d,p7/m,z8.d'
+.*: Error: selected processor does not support `famin z5.d,p7/m,z5.d,z9.d'
diff --git a/gas/testsuite/gas/aarch64/sve2-faminmax-illegal.d b/gas/testsuite/gas/aarch64/sve2-faminmax-illegal.d
new file mode 100644
index 0000000..e1c6a5d
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sve2-faminmax-illegal.d
@@ -0,0 +1,3 @@
+#as: -march=armv8-a+faminmax+sve2
+#source: sve2-faminmax-illegal.s
+#error_output: sve2-faminmax-illegal.l \ No newline at end of file
diff --git a/gas/testsuite/gas/aarch64/sve2-faminmax-illegal.l b/gas/testsuite/gas/aarch64/sve2-faminmax-illegal.l
new file mode 100644
index 0000000..55ce8e6
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sve2-faminmax-illegal.l
@@ -0,0 +1,123 @@
+[^ :]+: Assembler messages:
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax z5\.h,p0/m,z5\.h,z7\.s'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax z5\.h, p0/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax z5\.s, p0/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: famax z5\.d, p0/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax z5\.s,p2/m,z5\.s,z7\.h'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax z5\.s, p2/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax z5\.h, p2/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: famax z5\.d, p2/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin z5\.h,p0/m,z5\.h,z7\.s'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin z5\.h, p0/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin z5\.s, p0/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: famin z5\.d, p0/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin z5\.s,p2/m,z5\.s,z7\.h'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin z5\.s, p2/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin z5\.h, p2/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: famin z5\.d, p2/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: operand 3 must be the same register as operand 1 -- `famax z5\.h,p0/m,z7\.h,z9\.h'
+[^ :]+:[0-9]+: Error: operand 3 must be the same register as operand 1 -- `famin z5\.h,p0/m,z7\.h,z9\.h'
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax z5\.b,p2/m,z5\.b,z5\.b'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax z5\.h, p2/m, z5\.h, z5\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax z5\.s, p2/m, z5\.s, z5\.s
+[^ :]+:[0-9]+: Info: famax z5\.d, p2/m, z5\.d, z5\.d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin z5\.b,p2/m,z5\.b,z5\.b'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin z5\.h, p2/m, z5\.h, z5\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin z5\.s, p2/m, z5\.s, z5\.s
+[^ :]+:[0-9]+: Info: famin z5\.d, p2/m, z5\.d, z5\.d
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 2 -- `famax z5\.h'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 3 -- `famax z5\.h,p2/m'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 4 -- `famax z5\.h,p2/m,z5\.h'
+[^ :]+:[0-9]+: Error: unexpected characters following instruction at operand 4 -- `famax z5\.h,p2/m,z5\.h,z6\.h,z6\.h'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 2 -- `famin z5\.h'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 3 -- `famin z5\.h,p2/m'
+[^ :]+:[0-9]+: Error: comma expected between operands at operand 4 -- `famin z5\.h,p2/m,z5\.h'
+[^ :]+:[0-9]+: Error: unexpected characters following instruction at operand 4 -- `famin z5\.h,p2/m,z5\.h,z6\.h,z6\.h'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 1 -- `famax z5\.t,p2/m,z5\.s,z7\.s'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 3 -- `famax z5\.s,p2/m,z5\.t,z7\.s'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 4 -- `famax z5\.s,p2/m,z5\.s,z7\.t'
+[^ :]+:[0-9]+: Error: expected an SVE predicate register at operand 2 -- `famax z5\.s,j2/m,z5\.s,z7\.s'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 1 -- `famin z5\.t,p2/m,z5\.s,z7\.s'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 3 -- `famin z5\.s,p2/m,z5\.t,z7\.s'
+[^ :]+:[0-9]+: Error: unexpected character `t' in element size at operand 4 -- `famin z5\.s,p2/m,z5\.s,z7\.t'
+[^ :]+:[0-9]+: Error: expected an SVE predicate register at operand 2 -- `famin z5\.s,j2/m,z5\.s,z7\.s'
+[^ :]+:[0-9]+: Error: expected a register or register list at operand 1 -- `famax 5\.h,p2/m,z5\.h,z7\.h'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 3 -- `famax z5\.h,p2/m,5\.h,z7\.h'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 4 -- `famax z5\.h,p2/m,z5\.h,7\.h'
+[^ :]+:[0-9]+: Error: expected an SVE predicate register at operand 2 -- `famax z5\.h,2/m,z5\.h,z7\.h'
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax z5,p2/m,z5\.h,z7\.h'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax z5\.h, p2/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax z5\.s, p2/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: famax z5\.d, p2/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax z5\.h,p2/m,z5,z7\.h'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax z5\.h, p2/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax z5\.s, p2/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: famax z5\.d, p2/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax z5\.h,p2/m,z5\.h,z7'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax z5\.h, p2/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax z5\.s, p2/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: famax z5\.d, p2/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famax z5\.h,p2,z5\.h,z7\.h'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famax z5\.h, p2/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famax z5\.s, p2/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: famax z5\.d, p2/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: expected a register or register list at operand 1 -- `famin 5\.h,p2/m,z5\.h,z7\.h'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 3 -- `famin z5\.h,p2/m,5\.h,z7\.h'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 4 -- `famin z5\.h,p2/m,z5\.h,7\.h'
+[^ :]+:[0-9]+: Error: expected an SVE predicate register at operand 2 -- `famin z5\.h,2/m,z5\.h,z7\.h'
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin z5,p2/m,z5\.h,z7\.h'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin z5\.h, p2/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin z5\.s, p2/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: famin z5\.d, p2/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin z5\.h,p2/m,z5,z7\.h'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin z5\.h, p2/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin z5\.s, p2/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: famin z5\.d, p2/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin z5\.h,p2/m,z5\.h,z7'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin z5\.h, p2/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin z5\.s, p2/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: famin z5\.d, p2/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: operand mismatch -- `famin z5\.h,p2,z5\.h,z7\.h'
+[^ :]+:[0-9]+: Info: did you mean this\?
+[^ :]+:[0-9]+: Info: famin z5\.h, p2/m, z5\.h, z7\.h
+[^ :]+:[0-9]+: Info: other valid variant\(s\):
+[^ :]+:[0-9]+: Info: famin z5\.s, p2/m, z5\.s, z7\.s
+[^ :]+:[0-9]+: Info: famin z5\.d, p2/m, z5\.d, z7\.d
+[^ :]+:[0-9]+: Error: expected a register or register list at operand 1 -- `famax z35\.s,p2/m,z5\.s,z7\.s'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 3 -- `famax z5\.s,p2/m,z35\.s,z7\.s'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 4 -- `famax z5\.s,p2/m,z5\.s,z35\.s'
+[^ :]+:[0-9]+: Error: p0-p7 expected at operand 2 -- `famax z5\.s,p9/m,z5\.s,z7\.s'
+[^ :]+:[0-9]+: Error: expected a register or register list at operand 1 -- `famin z35\.s,p2/m,z5\.s,z7\.s'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 3 -- `famin z5\.s,p2/m,z35\.s,z7\.s'
+[^ :]+:[0-9]+: Error: expected an SVE vector register at operand 4 -- `famin z5\.s,p2/m,z5\.s,z35\.s'
+[^ :]+:[0-9]+: Error: p0-p7 expected at operand 2 -- `famin z5\.s,p9/m,z5\.s,z7\.s'
+[^ :]+:[0-9]+: Warning: output register of preceding `movprfx' not used in current instruction at operand 1 -- `famax z5\.h,p7/m,z5\.h,z7\.h'
+[^ :]+:[0-9]+: Warning: predicate register differs from that in preceding `movprfx' at operand 2 -- `famax z5\.d,p7/m,z5\.d,z9\.d'
+[^ :]+:[0-9]+: Warning: output register of preceding `movprfx' not used in current instruction at operand 1 -- `famin z5\.h,p7/m,z5\.h,z7\.h'
+[^ :]+:[0-9]+: Warning: predicate register differs from that in preceding `movprfx' at operand 2 -- `famin z5\.d,p7/m,z5\.d,z9\.d'
diff --git a/gas/testsuite/gas/aarch64/sve2-faminmax-illegal.s b/gas/testsuite/gas/aarch64/sve2-faminmax-illegal.s
new file mode 100644
index 0000000..6dab665
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sve2-faminmax-illegal.s
@@ -0,0 +1,71 @@
+// Operand mismatch
+famax z5.h, p0/m, z5.h, z7.s
+famax z5.s, p2/m, z5.s, z7.h
+famin z5.h, p0/m, z5.h, z7.s
+famin z5.s, p2/m, z5.s, z7.h
+
+// Incorrect operands
+famax z5.h, p0/m, z7.h, z9.h
+famin z5.h, p0/m, z7.h, z9.h
+
+// Disallowed types
+famax z5.b, p2/m, z5.b, z5.b
+famin z5.b, p2/m, z5.b, z5.b
+
+// Incorrect number of arguments
+famax z5.h
+famax z5.h, p2/m
+famax z5.h, p2/m, z5.h
+famax z5.h, p2/m, z5.h, z6.h, z6.h
+famin z5.h
+famin z5.h, p2/m
+famin z5.h, p2/m, z5.h
+famin z5.h, p2/m, z5.h, z6.h, z6.h
+
+// Spelling mistakes
+famax z5.t, p2/m, z5.s, z7.s
+famax z5.s, p2/m, z5.t, z7.s
+famax z5.s, p2/m, z5.s, z7.t
+famax z5.s, j2/m, z5.s, z7.s
+famin z5.t, p2/m, z5.s, z7.s
+famin z5.s, p2/m, z5.t, z7.s
+famin z5.s, p2/m, z5.s, z7.t
+famin z5.s, j2/m, z5.s, z7.s
+
+// Missing qualifiers
+famax 5.h, p2/m, z5.h, z7.h
+famax z5.h, p2/m, 5.h, z7.h
+famax z5.h, p2/m, z5.h, 7.h
+famax z5.h, 2/m, z5.h, z7.h
+famax z5, p2/m, z5.h, z7.h
+famax z5.h, p2/m, z5, z7.h
+famax z5.h, p2/m, z5.h, z7
+famax z5.h, p2, z5.h, z7.h
+famin 5.h, p2/m, z5.h, z7.h
+famin z5.h, p2/m, 5.h, z7.h
+famin z5.h, p2/m, z5.h, 7.h
+famin z5.h, 2/m, z5.h, z7.h
+famin z5, p2/m, z5.h, z7.h
+famin z5.h, p2/m, z5, z7.h
+famin z5.h, p2/m, z5.h, z7
+famin z5.h, p2, z5.h, z7.h
+
+// Out of range numbers
+famax z35.s, p2/m, z5.s, z7.s
+famax z5.s, p2/m, z35.s, z7.s
+famax z5.s, p2/m, z5.s, z35.s
+famax z5.s, p9/m, z5.s, z7.s
+famin z35.s, p2/m, z5.s, z7.s
+famin z5.s, p2/m, z35.s, z7.s
+famin z5.s, p2/m, z5.s, z35.s
+famin z5.s, p9/m, z5.s, z7.s
+
+// movprfx mismatch
+movprfx z6, z9
+famax z5.h, p7/m, z5.h, z7.h
+movprfx z5.d, p6/m, z8.d
+famax z5.d, p7/m, z5.d, z9.d
+movprfx z6, z9
+famin z5.h, p7/m, z5.h, z7.h
+movprfx z5.d, p6/m, z8.d
+famin z5.d, p7/m, z5.d, z9.d
diff --git a/gas/testsuite/gas/aarch64/sve2-faminmax-warning.s b/gas/testsuite/gas/aarch64/sve2-faminmax-warning.s
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sve2-faminmax-warning.s
diff --git a/gas/testsuite/gas/aarch64/sve2-faminmax.d b/gas/testsuite/gas/aarch64/sve2-faminmax.d
new file mode 100644
index 0000000..d85019c
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sve2-faminmax.d
@@ -0,0 +1,90 @@
+#objdump: -dr
+#as: -march=armv8-a+faminmax+sve2
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+ <.*>:
+ 0: 654e8000 famax z0.h, p0/m, z0.h, z0.h
+ 4: 654e8800 famax z0.h, p2/m, z0.h, z0.h
+ 8: 654e9c00 famax z0.h, p7/m, z0.h, z0.h
+ c: 654e801f famax z31.h, p0/m, z31.h, z0.h
+ 10: 654e881f famax z31.h, p2/m, z31.h, z0.h
+ 14: 654e9c1f famax z31.h, p7/m, z31.h, z0.h
+ 18: 654e83e0 famax z0.h, p0/m, z0.h, z31.h
+ 1c: 654e8be0 famax z0.h, p2/m, z0.h, z31.h
+ 20: 654e9fe0 famax z0.h, p7/m, z0.h, z31.h
+ 24: 654e80e5 famax z5.h, p0/m, z5.h, z7.h
+ 28: 654e88e5 famax z5.h, p2/m, z5.h, z7.h
+ 2c: 654e9ce5 famax z5.h, p7/m, z5.h, z7.h
+ 30: 658e8000 famax z0.s, p0/m, z0.s, z0.s
+ 34: 658e8800 famax z0.s, p2/m, z0.s, z0.s
+ 38: 658e9c00 famax z0.s, p7/m, z0.s, z0.s
+ 3c: 658e801f famax z31.s, p0/m, z31.s, z0.s
+ 40: 658e881f famax z31.s, p2/m, z31.s, z0.s
+ 44: 658e9c1f famax z31.s, p7/m, z31.s, z0.s
+ 48: 658e83e0 famax z0.s, p0/m, z0.s, z31.s
+ 4c: 658e8be0 famax z0.s, p2/m, z0.s, z31.s
+ 50: 658e9fe0 famax z0.s, p7/m, z0.s, z31.s
+ 54: 658e80e5 famax z5.s, p0/m, z5.s, z7.s
+ 58: 658e88e5 famax z5.s, p2/m, z5.s, z7.s
+ 5c: 658e9ce5 famax z5.s, p7/m, z5.s, z7.s
+ 60: 65ce8000 famax z0.d, p0/m, z0.d, z0.d
+ 64: 65ce8800 famax z0.d, p2/m, z0.d, z0.d
+ 68: 65ce9c00 famax z0.d, p7/m, z0.d, z0.d
+ 6c: 65ce801f famax z31.d, p0/m, z31.d, z0.d
+ 70: 65ce881f famax z31.d, p2/m, z31.d, z0.d
+ 74: 65ce9c1f famax z31.d, p7/m, z31.d, z0.d
+ 78: 65ce83e0 famax z0.d, p0/m, z0.d, z31.d
+ 7c: 65ce8be0 famax z0.d, p2/m, z0.d, z31.d
+ 80: 65ce9fe0 famax z0.d, p7/m, z0.d, z31.d
+ 84: 65ce80e5 famax z5.d, p0/m, z5.d, z7.d
+ 88: 65ce88e5 famax z5.d, p2/m, z5.d, z7.d
+ 8c: 65ce9ce5 famax z5.d, p7/m, z5.d, z7.d
+ 90: 0420bd25 movprfx z5, z9
+ 94: 654e9ce5 famax z5.h, p7/m, z5.h, z7.h
+ 98: 04d13d05 movprfx z5.d, p7/m, z8.d
+ 9c: 65ce9d25 famax z5.d, p7/m, z5.d, z9.d
+ a0: 650e9d25 .inst 0x650e9d25 ; undefined
+ a4: 654f8000 famin z0.h, p0/m, z0.h, z0.h
+ a8: 654f8800 famin z0.h, p2/m, z0.h, z0.h
+ ac: 654f9c00 famin z0.h, p7/m, z0.h, z0.h
+ b0: 654f801f famin z31.h, p0/m, z31.h, z0.h
+ b4: 654f881f famin z31.h, p2/m, z31.h, z0.h
+ b8: 654f9c1f famin z31.h, p7/m, z31.h, z0.h
+ bc: 654f83e0 famin z0.h, p0/m, z0.h, z31.h
+ c0: 654f8be0 famin z0.h, p2/m, z0.h, z31.h
+ c4: 654f9fe0 famin z0.h, p7/m, z0.h, z31.h
+ c8: 654f80e5 famin z5.h, p0/m, z5.h, z7.h
+ cc: 654f88e5 famin z5.h, p2/m, z5.h, z7.h
+ d0: 654f9ce5 famin z5.h, p7/m, z5.h, z7.h
+ d4: 658f8000 famin z0.s, p0/m, z0.s, z0.s
+ d8: 658f8800 famin z0.s, p2/m, z0.s, z0.s
+ dc: 658f9c00 famin z0.s, p7/m, z0.s, z0.s
+ e0: 658f801f famin z31.s, p0/m, z31.s, z0.s
+ e4: 658f881f famin z31.s, p2/m, z31.s, z0.s
+ e8: 658f9c1f famin z31.s, p7/m, z31.s, z0.s
+ ec: 658f83e0 famin z0.s, p0/m, z0.s, z31.s
+ f0: 658f8be0 famin z0.s, p2/m, z0.s, z31.s
+ f4: 658f9fe0 famin z0.s, p7/m, z0.s, z31.s
+ f8: 658f80e5 famin z5.s, p0/m, z5.s, z7.s
+ fc: 658f88e5 famin z5.s, p2/m, z5.s, z7.s
+ 100: 658f9ce5 famin z5.s, p7/m, z5.s, z7.s
+ 104: 65cf8000 famin z0.d, p0/m, z0.d, z0.d
+ 108: 65cf8800 famin z0.d, p2/m, z0.d, z0.d
+ 10c: 65cf9c00 famin z0.d, p7/m, z0.d, z0.d
+ 110: 65cf801f famin z31.d, p0/m, z31.d, z0.d
+ 114: 65cf881f famin z31.d, p2/m, z31.d, z0.d
+ 118: 65cf9c1f famin z31.d, p7/m, z31.d, z0.d
+ 11c: 65cf83e0 famin z0.d, p0/m, z0.d, z31.d
+ 120: 65cf8be0 famin z0.d, p2/m, z0.d, z31.d
+ 124: 65cf9fe0 famin z0.d, p7/m, z0.d, z31.d
+ 128: 65cf80e5 famin z5.d, p0/m, z5.d, z7.d
+ 12c: 65cf88e5 famin z5.d, p2/m, z5.d, z7.d
+ 130: 65cf9ce5 famin z5.d, p7/m, z5.d, z7.d
+ 134: 0420bd25 movprfx z5, z9
+ 138: 654f9ce5 famin z5.h, p7/m, z5.h, z7.h
+ 13c: 04d13d05 movprfx z5.d, p7/m, z8.d
+ 140: 65cf9d25 famin z5.d, p7/m, z5.d, z9.d
+ 144: 650f9d25 .inst 0x650f9d25 ; undefined \ No newline at end of file
diff --git a/gas/testsuite/gas/aarch64/sve2-faminmax.s b/gas/testsuite/gas/aarch64/sve2-faminmax.s
new file mode 100644
index 0000000..ae00a9e
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/sve2-faminmax.s
@@ -0,0 +1,95 @@
+// Valid instructions
+famax z0.h, p0/m, z0.h, z0.h
+famax z0.h, p2/m, z0.h, z0.h
+famax z0.h, p7/m, z0.h, z0.h
+famax z31.h, p0/m, z31.h, z0.h
+famax z31.h, p2/m, z31.h, z0.h
+famax z31.h, p7/m, z31.h, z0.h
+famax z0.h, p0/m, z0.h, z31.h
+famax z0.h, p2/m, z0.h, z31.h
+famax z0.h, p7/m, z0.h, z31.h
+famax z5.h, p0/m, z5.h, z7.h
+famax z5.h, p2/m, z5.h, z7.h
+famax z5.h, p7/m, z5.h, z7.h
+
+famax z0.s, p0/m, z0.s, z0.s
+famax z0.s, p2/m, z0.s, z0.s
+famax z0.s, p7/m, z0.s, z0.s
+famax z31.s, p0/m, z31.s, z0.s
+famax z31.s, p2/m, z31.s, z0.s
+famax z31.s, p7/m, z31.s, z0.s
+famax z0.s, p0/m, z0.s, z31.s
+famax z0.s, p2/m, z0.s, z31.s
+famax z0.s, p7/m, z0.s, z31.s
+famax z5.s, p0/m, z5.s, z7.s
+famax z5.s, p2/m, z5.s, z7.s
+famax z5.s, p7/m, z5.s, z7.s
+
+famax z0.d, p0/m, z0.d, z0.d
+famax z0.d, p2/m, z0.d, z0.d
+famax z0.d, p7/m, z0.d, z0.d
+famax z31.d, p0/m, z31.d, z0.d
+famax z31.d, p2/m, z31.d, z0.d
+famax z31.d, p7/m, z31.d, z0.d
+famax z0.d, p0/m, z0.d, z31.d
+famax z0.d, p2/m, z0.d, z31.d
+famax z0.d, p7/m, z0.d, z31.d
+famax z5.d, p0/m, z5.d, z7.d
+famax z5.d, p2/m, z5.d, z7.d
+famax z5.d, p7/m, z5.d, z7.d
+
+movprfx z5, z9
+famax z5.h, p7/m, z5.h, z7.h
+movprfx z5.d, p7/m, z8.d
+famax z5.d, p7/m, z5.d, z9.d
+
+// Invalid instruction because sz is 00 which is reserved
+.inst 0x650e9d25
+
+// Valid instructions
+famin z0.h, p0/m, z0.h, z0.h
+famin z0.h, p2/m, z0.h, z0.h
+famin z0.h, p7/m, z0.h, z0.h
+famin z31.h, p0/m, z31.h, z0.h
+famin z31.h, p2/m, z31.h, z0.h
+famin z31.h, p7/m, z31.h, z0.h
+famin z0.h, p0/m, z0.h, z31.h
+famin z0.h, p2/m, z0.h, z31.h
+famin z0.h, p7/m, z0.h, z31.h
+famin z5.h, p0/m, z5.h, z7.h
+famin z5.h, p2/m, z5.h, z7.h
+famin z5.h, p7/m, z5.h, z7.h
+
+famin z0.s, p0/m, z0.s, z0.s
+famin z0.s, p2/m, z0.s, z0.s
+famin z0.s, p7/m, z0.s, z0.s
+famin z31.s, p0/m, z31.s, z0.s
+famin z31.s, p2/m, z31.s, z0.s
+famin z31.s, p7/m, z31.s, z0.s
+famin z0.s, p0/m, z0.s, z31.s
+famin z0.s, p2/m, z0.s, z31.s
+famin z0.s, p7/m, z0.s, z31.s
+famin z5.s, p0/m, z5.s, z7.s
+famin z5.s, p2/m, z5.s, z7.s
+famin z5.s, p7/m, z5.s, z7.s
+
+famin z0.d, p0/m, z0.d, z0.d
+famin z0.d, p2/m, z0.d, z0.d
+famin z0.d, p7/m, z0.d, z0.d
+famin z31.d, p0/m, z31.d, z0.d
+famin z31.d, p2/m, z31.d, z0.d
+famin z31.d, p7/m, z31.d, z0.d
+famin z0.d, p0/m, z0.d, z31.d
+famin z0.d, p2/m, z0.d, z31.d
+famin z0.d, p7/m, z0.d, z31.d
+famin z5.d, p0/m, z5.d, z7.d
+famin z5.d, p2/m, z5.d, z7.d
+famin z5.d, p7/m, z5.d, z7.d
+
+movprfx z5, z9
+famin z5.h, p7/m, z5.h, z7.h
+movprfx z5.d, p7/m, z8.d
+famin z5.d, p7/m, z5.d, z9.d
+
+// Invalid instruction because sz is 00 which is reserved
+.inst 0x650f9d25