aboutsummaryrefslogtreecommitdiff
path: root/tests/armv8
diff options
context:
space:
mode:
authorMartin Fink <martin@finkmartin.com>2024-06-25 14:45:12 +0200
committerMartin Fink <martin@finkmartin.com>2024-06-25 14:48:51 +0200
commita9ce9a8365eb66507b9bcacb4236af77bd33c620 (patch)
tree2721cdb53e84c2e3c223f58268c1458defb4d122 /tests/armv8
parenta29e738354b55c39d19b42838af2f091b2cc8973 (diff)
Add support for `udf`
Diffstat (limited to 'tests/armv8')
-rw-r--r--tests/armv8/a64.rs40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/armv8/a64.rs b/tests/armv8/a64.rs
index 0e76ef6..ae0f108 100644
--- a/tests/armv8/a64.rs
+++ b/tests/armv8/a64.rs
@@ -51,6 +51,12 @@ fn test_sve() {
}
#[test]
+fn test_sme() {
+ // SME outer product
+ test_err([0x00, 0x00, 0xc0, 0x80], DecodeError::IncompleteDecoder);
+}
+
+#[test]
fn test_unpredictable() {
// could be stx/ldx but Lo1 is `x1` and invalid.
test_err([0x00, 0x00, 0x20, 0x08], DecodeError::InvalidOperand);
@@ -305,6 +311,40 @@ fn test_decode_arithmetic() {
}
#[test]
+fn test_decode_udf() {
+ test_decode(
+ [0x00, 0x00, 0x00, 0x00],
+ Instruction {
+ opcode: Opcode::UDF,
+ operands: [
+ Operand::Imm16(0),
+ Operand::Nothing,
+ Operand::Nothing,
+ Operand::Nothing,
+ ]
+ }
+ );
+ test_decode(
+ [0xfe, 0xca, 0x00, 0x00],
+ Instruction {
+ opcode: Opcode::UDF,
+ operands: [
+ Operand::Imm16(0xcafe),
+ Operand::Nothing,
+ Operand::Nothing,
+ Operand::Nothing,
+ ]
+ }
+ );
+}
+
+#[test]
+fn test_display_udf() {
+ test_display([0x00, 0x00, 0x00, 0x00], "udf #0x0");
+ test_display([0xfe, 0xca, 0x00, 0x00], "udf #0xcafe");
+}
+
+#[test]
fn test_decode_mul() {
}