From a9ce9a8365eb66507b9bcacb4236af77bd33c620 Mon Sep 17 00:00:00 2001 From: Martin Fink Date: Tue, 25 Jun 2024 14:45:12 +0200 Subject: Add support for `udf` --- tests/armv8/a64.rs | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'tests/armv8') 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() { } -- cgit v1.1