From ca10274fe34abad64dcbb20569aa5899bbf4c585 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Wed, 15 Mar 2023 19:07:49 -0400 Subject: [PATCH] YJIT: Use assert_disasm! in an A64 test to avoid unused warning I kept getting unused warnings for this macro on A64 macOS. --- yjit/src/backend/arm64/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/yjit/src/backend/arm64/mod.rs b/yjit/src/backend/arm64/mod.rs index fc26b9d893..4e5748d231 100644 --- a/yjit/src/backend/arm64/mod.rs +++ b/yjit/src/backend/arm64/mod.rs @@ -1119,6 +1119,7 @@ impl Assembler #[cfg(test)] mod tests { use super::*; + use crate::disasm::*; fn setup_asm() -> (Assembler, CodeBlock) { (Assembler::new(), CodeBlock::new_dummy(1024)) @@ -1467,6 +1468,11 @@ mod tests { asm.store(Opnd::mem(64, Opnd::Reg(X2_REG), 0), opnd); asm.compile_with_num_regs(&mut cb, 1); + + assert_disasm!(cb, "0b0001ca4b0000f8", " + 0x0: eor x11, x0, x1 + 0x4: stur x11, [x2] + "); } #[test]