From 45ee41c13a67283ce99d7a16dd0ae68d54f598a8 Mon Sep 17 00:00:00 2001 From: James Barford-Evans Date: Fri, 25 Apr 2025 07:45:53 +0100 Subject: [PATCH] pr feedback - take the instruction count bump out of Dockerfile --- .../ci/docker/aarch64_be-unknown-linux-gnu/Dockerfile | 3 --- library/stdarch/crates/stdarch-test/src/lib.rs | 10 +++++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/library/stdarch/ci/docker/aarch64_be-unknown-linux-gnu/Dockerfile b/library/stdarch/ci/docker/aarch64_be-unknown-linux-gnu/Dockerfile index 16fd6d5744b9..74f770556dbe 100644 --- a/library/stdarch/ci/docker/aarch64_be-unknown-linux-gnu/Dockerfile +++ b/library/stdarch/ci/docker/aarch64_be-unknown-linux-gnu/Dockerfile @@ -28,6 +28,3 @@ ENV CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_LINKER="${AARCH64_BE_TOOLCHAIN}/bi ENV CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64_be -cpu max -L ${AARCH64_BE_LIBC}" ENV OBJDUMP="${AARCH64_BE_TOOLCHAIN}/bin/aarch64_be-none-linux-gnu-objdump" ENV STDARCH_TEST_SKIP_FEATURE=tme -# The table instructions, while correct, generate some rev64 instructions which -# increases the number of instructions generated -ENV STDARCH_ASSERT_INSTR_LIMIT=32 diff --git a/library/stdarch/crates/stdarch-test/src/lib.rs b/library/stdarch/crates/stdarch-test/src/lib.rs index 827a402e3a0a..977b4b46adbd 100644 --- a/library/stdarch/crates/stdarch-test/src/lib.rs +++ b/library/stdarch/crates/stdarch-test/src/lib.rs @@ -164,7 +164,15 @@ pub fn assert(shim_addr: usize, fnname: &str, expected: &str) { // Original limit was 20 instructions, but ARM DSP Intrinsics // are exactly 20 instructions long. So, bump the limit to 22 // instead of adding here a long list of exceptions. - _ => 22, + _ => { + // aarch64_be may add reverse instructions which increases + // the number of instructions generated. + if cfg!(all(target_endian = "big", target_arch = "aarch64")) { + 32 + } else { + 22 + } + } }, |v| v.parse().unwrap(), );